Don't want /etc/mtab to be linked to /proc/mounts

Nathan Coulson conathan at conet.dyndns.org
Fri Mar 26 18:42:08 PST 2004


> Hello,
>
> I was reading through the archives and I noticed that LFS didn't
> always make /etc/mtab a link to /proc/mounts.  I'd like to go back to
> that for my system.  Mainly I'd like df to output
>
>    Filesystem           1k-blocks      Used Available Use% Mounted on
>    /dev/hda9              5036316   1175684   3604800  25% /
>    /dev/hda1                15522      4712     10009  33% /boot
>
> instead of
>
>    Filesystem           1k-blocks      Used Available Use% Mounted on
>    rootfs                 5036316   1175684   3604800  25% /
>    /dev/root              5036316   1175684   3604800  25% /
>    /dev/hda1                15522      4712     10009  33% /boot
>
> Making mtab its own file does the trick (if anyone has an alternative,
> I'd love to hear it), but now I have problems after an unclean
> shutdown.  The startup scripts don't mount the filesystems that
> weren't cleanly unmounted, and all hell breaks loose when everything
> tries to run with an empty /usr directory.
>
> How can I fix this?
>
>
> TIA,
>
> R
>
>
> --
> Robert S Conde
> Department of Linguistics
> University of California, Santa Cruz
> elconde at ucsc.edu
> PGP Key -> http://people.ucsc.edu/~elconde/key.asc
> --

If you edit /etc/rc.d/init.d/mountfs

after you mount / readwrite, put a
 > /etc/mtab

it will replace the contents of /etc/mtab with a empty file.  This is
found in the latest bootscripts.



More information about the lfs-support mailing list