[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 12:35:44PM -0400, Theodore Tso wrote:
> 
> This check is happening in lib/ext2fs/ismounted.c, so the code in
> e2fsck is duplicated (which is why I removed it)
> 
> > > 
> > It is a slackware box. Slackware doesnt mount /proc first, as redhat does.
> > This caused the problem, since newer versions of e2fsck changed its
> > assumption of /etc/mtab.
> 
> That shouldn't be a problem, because we fall back to checking
> /etc/mtab if /proc/mounts isn't available.  So the right thing should
> happen if /proc isn't mounted.
> 
I think I did not make myself clear. e2fsck has no problem in checking /
after a system crash. It fails to check other *unmounted* filesystems,
because 1. /proc hasn't been mounted yet, and 2. mtab shows they are
already mounted. This problem is Slackware specific, since it neither
checks / fisrt, nor mount /proc before running "fsck -A". So there are
two possible solutions to this problem:

1. Change slackware's /etc/rc.d/rc.S so as to either mount /proc first
(redhat style), or fsck / first and then clear /etc/mtab (debian style).

2.  Add the /etc/mtab sanity checking code back to e2fsck/unix.c.

> However, there *is* a problem if /etc/mtab is a symlink to
> /proc/mounts, and /proc/mounts isn't available.  In this case e2fsck
> should print an error about bail (as tst_ismounted does).
> 
> So I've unmounted /proc, mounted my root filesystem read-only, and I
> still can't reproduce your problem, it works just fine for me....
> 
It won't reproduce the problem, 'cause /etc/mtab is always in a sane
state if the system did not crash previously.

-- 
Wenzhuo





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