[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [e2fsprogs-1.24] "fsck -A -a" fails on reboot

On Fri, Sep 07, 2001 at 09:23:05PM -0400, Theodore Tso wrote:
> The problem is knowing where the filesystem has been mounted;
> /etc/fstab only tells you where a filesystem will normally be mounted,
> not where it is currently mounted.  In order to get that information
> reliably we need an accurate-and-up-to-date version of /etc/mtab, or
> via /proc/mounts!
> So the right, safe thing for a distribution's boot scripts to do is:
> (a)  Boot the kernel with the root filesystem mounted read-only.
> (b)  Run fsck on the root filesystem.

One update/correction to this flowchart --- if after (b), the exit
code from fsck reports that it needed to make changes to the root
filesystem, the distribution should force a reboot at this point, for
safety's sake.

> (c) Remount the root read-write, and initialize /etc/mtab, and/or 
> 	(especially if the distribution is one that likes to symlink
> 	/etc/mtab to /proc/mounts), mount /proc.
> (e)  Run fsck on the rest of the filesystems
> (f)  Mount the rest of the local filesystems
> If Slackware is doing something else, it's arguably broken.

						- Ted

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]