Re: About /etc/mtab and /proc/mounts

Miles Bader
2003-02-27T08:32:21Z

Kasper Dupont <kasperd@daimi.au.dk> writes:
> > Yes. On some systems, /var and /tmp are the _only_ read-write filesystems.
>
> OK, but then on such a system with my approach it would be possible to
> make /mtab.d a symlink pointing to somewhere under /var.

... you could do the same with /etc/mtab.

In fact since /etc is almost guaranteed to be on the same filesystem as
/, it seems like "/mtab.d" offers zero advantages over just /etc/mtab --
the case where /etc/mtab is the most annoying is when /etc is R/O, but
this almost always means that / will be R/O, making /mtab.d useless too.

> But AFAIK fsck uses mtab.

It uses /etc/fstab.

> If mtab does not exist mount will attempt to create a new one with
> only the root listed.

Unless you use the `-n' flag, which an init-script should do if it
knows there's something wierd required to get /var mounted or something.

-Miles
--
80% of success is just showing up. --Woody Allen