Re: fsck fails (then succeeds)

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

 



Geoff wrote:
... The fsck ran and at about 95% complete I got a big red "errors have been found which cannot be fixed" warning and the system halted "pending manual intervention" (fat chance). I rebooted and the system came up just fine. I hit the reset button. This time I did see the "errors were found and fixed ... " message. I shut down again
"-r -F". This time the fsck completed without problems.

Depending on which LFS version you're using (which version is this, anyway?), these messages ("errors have been found that cannot be fixed", and then "waiting for manual intervention") were probably both printed by the init script that runs fsck. The LFS init scripts, as of LFS about 4.0 or 4.1 or so, no longer start /sbin/sulogin on failure of things like this (the reason is that sulogin will apparently accept any password if it can't read /etc/passwd or /etc/shadow), they just print (in red) that "errors have been found" message, and stop. I've modified my LFS init scripts to start sulogin anyway, because I want to be able to fix the problems if that ever happens to me, but whatever. Your choice.

The rest of the messages quoted are also printed by the init script,
depending on the return value of the fsck binary.  If it returns 1, then
the script prints the "errors were found and fixed" warning message.  If
it returns anything between 4 and 15, inclusive, then the script prints
the big red "I failed, halting system" message.  This corresponds to the
description of the return value of e2fsck in its manpage (and probably
other fsck's).

Ted is right, though -- fsck should have displayed its own errors before
it returned 1.  When the script runs fsck after a shutdown -r -F, it
runs it with the -f -a -A -C -T options, so it's not like it's
suppressing the errors.

If you know a bit of bash, take a look at /etc/rc.d/init.d/checkfs (and
the scripts sourced by that file) to see what's going on.  And you
probably don't remember what got printed anymore, but if it happens
again, look before the big red error message to find out what actually
happened.

In the future, too, you can pass "init=/bin/bash" to the kernel at boot
time using your bootloader (lilo is still the LFS loader, right?), and
that way you can run fsck -f yourself, interactively, to see (and fix)
what all it thinks is wrong with the filesystem.

Bryan


_______________________________________________ Ext3-users@redhat.com https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux