/etc/mtab in a read-only medium

Guillermo Pereyra Irujo gpirujo at mdq.com
Mon Oct 8 08:54:53 PDT 2001

> I burned a bootable CD in order to build the LFS from it. But I didn't
> remember that mount need to write into /etc/mtab which now has
> read-only permissions. The CD refused to boot (so I didn't get an
> useful CD, I get a little silver frisbee). Now, I have to choose among
> three diferent alternatives before burning another CD:
> ·Create /etc/mtab as a symbolic link to a file in ramdisk. Should I
> mount the ramdisk with the '-n' flag?
> ·Create /etc/mtab as a symbolic link to /proc/mounts and mounting
> every filesystem with the -n flag. But, from 'man mount':
> 		'It is possible to replace /etc/mtab by a symbolic link
> to /proc/mounts, but some information is lost that way, and  in  par­
> ticular  working  with the loop device will be less convenient. Also,
> pathnames containing spaces are handled correctly  by  /etc/mtab  but
> not (yet) by /proc/mounts.'

If you are going to use the cd just as an LFS builder, then I guess you
will never use the loop device or spaced pathnames.

> ·Mount every filesystem with the -n flag. Is there any problem if I
> mount all the filesystems this way (losing all the information
> /etc/mtab provides)?

At least mount reads /etc/mtab.

> Could somebody help me, please? Which is the better alternative?

I think it would be ok to ln -s /tmp/mtab /etc/mtab. Also, I would use
tmpfs for memory use; it takes all the memory that it needs and no more.

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