symlink to /proc/mounts

Andries.Brouwer at cwi.nl Andries.Brouwer at cwi.nl
Wed Jan 1 10:41:11 PST 2003


In LFS-BOOK-4.0.txt it says:

------------------------------------------------------------------------
Creating the mtab symlink

   The next thing to do is to create a symlink pointing from /etc/mtab to
   /proc/mounts. This is done using the following command:

   ln -sf /proc/mounts /etc/mtab

   Creating this symlink avoids problems which can occur if / is mounted
   read-only and the information in /etc/mtab is stale (i.e. out of
   date). By creating the symlink to /proc/mounts, we ensure that the
   information on currently mounted devices is always up-to-date.
------------------------------------------------------------------------

However, having this symlink has disadvantages as well.
Mount writes information to /etc/mtab. Some, but not all
of this information is found in /proc/mounts.
Everything that depends on the additional information will fail
if one uses this symlink. This includes the automatic use of
losetup when working with the loop device, the use of the "user"
option in /etc/fstab, and the visibility of NFS mount options.

Andries

[not subscribed]
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list