Livecd from ram
psusi at cfl.rr.com
Sat Dec 24 17:17:07 GMT 2005
I've been kicking this idea around for a while now in my head and now
I'd like to get some more opinions. I think that the livecd would
perform much better if the cloop/cramfs image is copied to a tmpfs at
boot time and mounted from there.
What about systems without enough ram to hold the whole image? The most
common use cases of the livecd will be in a system that has a hard drive
that already either has a linux system or windows installed. If the
system already has a linux system installed, there will be a linux swap
partition that can be used. If windows is installed, then I thought
hey, windows has a pagefile already on the disk, simply using that
shouldn't be too hard right?
The initramfs on the livecd could first probe for a linux swap
partition, and if not found, then check all fat and ntfs partitions for
a windows pagefile. Even if it is on an ntfs partition, you can still
get the block list that the existing file lives in and bypass the
filesystem to swap to the pagefile. You would need to skip the windows
pagefile header, but the rest of the file could be turned into linux
swap space. This could be done with a small utility to get the block
list and set up a kernel device mapper device mapping the pagefile, then
mkswap and swapon that dm device.
With some usable swap space, even mid to low memory systems could copy
the livecd image to the swap space and then running from there should be
much faster than from the cd. Of course, in the event that no swap is
found, the system will run like it does now, and the user can use a boot
parameter to force one way or the other. What do you guys think?
More information about the ubuntu-devel