/etc/mtab in a read-only medium

Guillermo Pereyra Irujo gpirujo at mdq.com
Mon Oct 8 11:14:45 PDT 2001


> > > If you make the CD the root then you will have problems with /tmp.
> > > You can remake /var in the start up script.
> >
> > But I make /tmp a link to a directory in the ramdisk. Is there any
> > problem with that?
> >
> Should be OK...

Why not just mount a tmpfs on /tmp?

In my cd I've done:

mount -t tmpfs -n tmpfs /tmp
mount -t tmpfs -f -o remount tmpfs /tmp
mount -t tmpfs tmpfs /usr/tmp
mount -t tmpfs tmpfs /var/lock
mount -t tmpfs tmpfs /var/log
mount -t tmpfs tmpfs /var/run
mount -t tmpfs tmpfs /root
mount -t tmpfs tmpfs /home/gpirujo
mount -t tmpfs tmpfs /config
cd / && tar xf /dev/floppy/0

Variable stuff like /etc/profile or /etc/hosts are links to /config/*, and
/config/*, /home/gpirujo/* and /root/* are all tarred to a diskette at
shutdown and untarred at startup. As tmpfs takes as much memory as its
contents need, I can mount as many as I want.

/etc/mtab is a symlink to /tmp/mtab in my case and that's why /tmp is
mounted twice.

> You can make a swap partition out of RAM, and put that into the fstab if
> you want.

This is useless. The memory freed by the swapping operation will be eaten
by the ramdisk.

-- 
Guillermo Pereyra Irujo
Mar del Plata, Argentina

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list