-
Senior Member
registered user
Possible
Hi,
I'm somewhat familiar with knoppix and its associated technologies and I believe what you want to do is possible. 
Btw. KNOPPIX / LiveCDs (especially with cloop) can be and are faster on my computer from cdrom then from harddisk.
I've looked a fairly long time at the code and think I have found a "solution" (it is no real problem).
You only need to alter the boot.img/miniroot.gz/linuxrc
Just mount the image, gunzip miniroot.gz, mount miniroot, change linuxrc according to idea below, unmount miniroot, gzip miniroot again, copy it back to boot.img, unmount boot.img and then most important step: syslinux boot.img to make it boot again.
Ok, so much for the instructions here is the idea: (Just search for cloop in linuxrc, and you'll find soon, what you seek)
if test -n "$FOUND_KNOPPIX" -a -f /cdrom/KNOPPIX/KNOPPIX; then
# DEBUG
# echo "6" > /proc/sys/kernel/printk
insmod -f /modules/cloop.o file=/cdrom/KNOPPIX/KNOPPIX
mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
fi
ok, before the insmod we need to insert our code to copy it to Ramdisk (perhaps check if some parameter is missing, but thats just future, when it could be available as cheat code)
but, we don't have all necessary commands to do what we want to do cp, mv, mkdir ... all missing) .. so we let it mountit first from cdrom ...
Not tested (don't have so much ram, just the idea)
Code:
insmod -f /modules/cloop.o file=/cdrom/KNOPPIX/KNOPPIX
mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
fi
COPYTORAM="yes" # yes we want to copy it
# CopyToRam ?
if test -n "$COPYTORAM";
then
# Pre-test if everything succeeded.
if test -n "$FOUND_KNOPPIX"
then
# copy library cache
cat /KNOPPIX/etc/ld.so.cache > /etc/ld.so.cache
echo ""
# Enable kernel messages
echo "6" > /proc/sys/kernel/printk
# Set paths
echo -n "${CRE}${BLUE}Setting paths...${NORMAL}"
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:."
export PATH
# Debian weirdness
/bin/cp -a /KNOPPIX/etc/alternatives /etc/ 2>/dev/null
# From here, we should have all essential commands available.
hash -r
echo "Copying /cdrom to RamDisk, this will take a while ..." # Hey, we could use some fancy dialog skript here :-))
mkdir /cdrom2
mount -t tmpfs -o size=800M /dev/shm /cdrom2
cp -a /cdrom/* /cdrom2 # Copy everything to /cdrom2; yes we need more things then only the KNOPPIX image, we don't want to produce problems we hadn't before, do we ?
export PATH= # reset path
umount /KNOPPIX # unmount it
umount /dev/cloop # release CD
umount /cdrom # unmount CD
insmod -f /modules/cloop.o file=/cdrom2/KNOPPIX/KNOPPIX
mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX="" # if everything else did suceeded so far, this will hopefully succeed too
# lets again do the initial stuff :-))
fi
fi
# Final test if everything succeeded.
if test -n "$FOUND_KNOPPIX"
then
# copy library cache
cat /KNOPPIX/etc/ld.so.cache > /etc/ld.so.cache
echo ""
# Enable kernel messages
echo "6" > /proc/sys/kernel/printk
# Set paths
echo -n "${CRE}${BLUE}Setting paths...${NORMAL}"
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:."
export PATH
# Debian weirdness
/bin/cp -a /KNOPPIX/etc/alternatives /etc/ 2>/dev/null
# From here, we should have all essential commands available.
hash -r
# Did we copy from ram ?
if test -n "$COPYTORAM";
then
rmdir /cdrom
ln -s /cdrom /cdrom2 # make a symlink and go on to normal boot
fi
Thats it! Only thing, that could make problems now is that there is another ramdisk for /home and /var mounted and there is not enough memory left to do so effiecently ...
Perhaps also in syslinux.cfg the size of the initial ramdisk has to be made bigger!
Then you can rewrite cdrom or boot from floppy!
And it "should" work!
Best Regards,
Fabian Franz
PS: Hope to hear from your efforts soon. If it wokrs successful maybe I can talk to Klaus to include it in official distribution (in 2005
)
Similar Threads
-
By colin stewart in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 03-23-2004, 02:18 AM
-
By desire in forum The Lounge
Replies: 5
Last Post: 02-19-2004, 05:06 AM
-
By Pierscoe1 in forum General Support
Replies: 3
Last Post: 12-16-2003, 05:18 PM
-
By smurfy__ in forum Customising & Remastering
Replies: 1
Last Post: 08-18-2003, 01:40 PM
-
By fingers99 in forum Hardware & Booting
Replies: 1
Last Post: 03-01-2003, 08:12 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

KNOPPIX 9.1 Linux Install & Live DVD 32bit & 64bit
$19.99

Windows XP, Vista, 8.1, Linux Knoppix, Office XP, (6 CDS)
$10.00

Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive
$5.99

KNOPPIX USB DVD OS , BEST OF ALL HIGHLY RECOMENDED
$11.99

VINTAGE SOFTWARE | KNOPPIX STD 0.1 (SECURITY TOOLS DISTRIBUTION)
$7.57

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 16G USB Stick
$20.85

Knoppix NSM 1.2
$8.00

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 32G USB Stick
$21.42

Hamshack Live DVD-ROM
$7.00

Knoppix 5.0.1 ULTRA RARE Linux DVD - Linux Pro Extra August 2006
$33.98