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 )