[Bootcd-user] A Different RAM Disk Approach + Using Mozilla Firefox

Vlado Plaga news@vlado-do.de
Thu, 03 Jun 2004 22:42:46 +0200


Hi everyone,

searching for a way to make our flat's router + 'internet terminal' 
system run from CD (mainly to stop the old HDD's noise and avoid having 
to buy a new one) I was happy to have found the bootcd package in 
Debian. Having looked at Knoppix[1] and the various re-mastering howtos 
I was expecting a lot more work. But the first quick attempt with bootcd 
already brought me a bootable system with my custom kernel (necessary 
for the Teledat USB ISDN adapter) and in the second attempt (with less 
kernel modules and all necessary drivers included) I had full network 
support, too.

Still I had some problems with Mozilla Firefox depending on files in 
/var that were not in the ramdisk, but I solved it by making use of the 
"execute" file on the bootcd "floppy" (a usb smart media card reader in 
my case):
cp -rps /var.ro/lib/ /var.ro/local/ /var.ro/opt/ /var
cp -rp /var.ro/mail /var.ro/spool /var

I'm also using a permanent /home partition on the bigger second 
partition of the 64 MB smart media card by having a modified /etc/fstab 
in change.tgz on the "floppy" (that's what bootcdflopcp is for - but 
modify it not to look for changes in "home"):

# /etc/fstab
/dev/scd0 / iso9660 defaults,ro 0 0
proc /proc proc defaults 0 0
/dev/ram0       /ram1/tmp       tmpfs   defaults        0       2
/dev/sda2       /ram1/home      ext2    defaults,usrquota       1      1
platypus:/home/daten/mp3 /mp3   nfs     defaults,noauto,user 0  0
/dev/cdrom      /cdrom          auto    ro,user,noauto  0       0

In that fstab file you see that I'm using a RAM disk with file system 
type tmpfs. That's something I've learned from Knoppix and it is the 
solution to a question from the faq, I think:

Q: Why can't I define a different ramdisk_size for each of the two
    ramdisk filesystems that are created by bootcd?
A: The kernel can only handle ramdisks /dev/ram0, /dev/ram1, /dev/ram2,
    ... with the same size. [...]. Please tell me if you know a better
    way to solve the problem.

Unfortunately the whole ram disk issue seems poorly documented, the 
ramdisk.txt in the kernel sources' documentation starts with "as of 
kernel 1.3.48" and does not mention the tmpfs/ramfs/memfs options at 
all. But there is an enlightening mail in the kernel archive:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0104.3/0578.html

This way you create a dynamic ramdisk and don't have to worry about it's 
size or inodes in advance. The last sentence of that abovementioned 
eMail is:

<quote>
ramfs has all the bells and whistles you need except size limiting. and
obviously its faster than simulating a harddisk in ram and using ext2 on
it..
</quote>

So although my system has enough RAM to work well with bootcd as it is 
now, I'm always keen on improving things and, last but not least, it 
might help others a lot.

But as I know only little about shell programming or the Linux boot 
process, I feel not in a position to make such heavy modifications to 
bootcd myself. So I hope someone else will do it one day.

So long and thanks a lot, Bernd Schumacher, for having made bootcd,

Vlado Plaga

[1] http://www.knopper.net/knoppix/index-en.html