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

Miles Bader
2003-02-27T09:48:46Z

Kasper Dupont <kasperd@daimi.au.dk> writes:
> > > But AFAIK fsck uses mtab.
> >
> > It uses /etc/fstab.
>
> [kasperd:pts/0:~] grep /etc/mtab /sbin/fsck*
> Binary file /sbin/fsck.ext2 matches
> Binary file /sbin/fsck.ext3 matches
> Binary file /sbin/fsck.minix matches
> [kasperd:pts/0:~]

God know why; the versions (e2fsprogs 1.32) on my system don't, so it's
probably not something very important. fsck should still work fine.

> > 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.
>
> Of course the -n flag can be used to some extent, but that doesn't
> solve all our problems. Current rc.sysinit implementations does use
> -n to mount a few filesystems, and later uses -f to initialize the
> mtab. But all that happens before running fsck, so if /var is mounted
> that early, we are going to fsck it mounted.

So the init scripts are badly written, what can I say? `Don't do that.'

-Miles
--
"Most attacks seem to take place at night, during a rainstorm, uphill,
where four map sheets join." -- Anon. British Officer in WW I