[lfs-dev] [PATCH] init.d/mountvirtfs: fix auto-mounting virtual filesystems

Bruce Dubbs bruce.dubbs at gmail.com
Sun Sep 7 10:51:59 PDT 2014


Dylan Cali wrote:
> On Sun, Sep 7, 2014 at 1:11 AM, Dylan Cali <calid1984 at gmail.com> wrote:
>> So it would probably be better to either remove the attempt entirely
>> and print a suitable error, or fully support it.
>
> It turns out the cryptic 'mount failed: No such file or directory'
> error is because /etc/mtab is a symlink to /proc/self/mounts instead
> of a regular file. Changing mtab to a regular file results in the much
> more user friendly:
>
>    mount: can't find /run in /etc/fstab
>    mount: can't find /proc in /etc/fstab
>    mount: can't find /sys in /etc/fstab
>
> Since you don't want to support auto-mounting the virtual filesystems,
> what about changing mtab to be a regular file in Section 6.6, so a
> clearer error is produced?  And then also remove the hardcoded mount
> options in the boot script:

I don't understand the desire to eliminate two lines in fstab that have 
probably been present since /proc and /sys were introduced.

I don't like the idea of some things auto-magically mounted at boot time.

As far as the error message goes, perhaps you should file a bug with 
util-linux.

   -- Bruce



More information about the lfs-dev mailing list