fsck fails on /dev/root under SCO (was Re: fsck Recovery From Crashes)

bill bill at franklin.com
Wed Jun 5 01:10:11 AEST 1991


When fsck'ing the root file system, you must always reboot your
system immediately after the fsck, if fsck changes anything, and
you must do so without syncing. (There are some exceptions, but
why bother?)

There is probably an option on your fsck that will cause it to do
the necessary reboot automatically. You should use it if it is
there. If fsck won't do an automatic reboot but will return an
indication that it has changed the file system, you should have
your startup script immediately bring your system down when fsck
indicates a change. NB: the shutdown script will do the sync, so
you can't use it. You may have a command like uadmin or something.

In article <3206 at artcom0.north.de> pf at artcom0.north.de (Peter Funk) writes:
: The superblock or the free list header (I not familar enough with the
: internals) is NOT correctly rewritten from fsck, leaving the whole file
: system somehow corrupt under certain circumstances.

What happens is this: fsck is doing I/O directly to the disk. When
it updates the superblock, it writes the correct thing to the
disk. However, there is a copy of the superblock sitting in the
kernel somewhere, which is *not* updated (for what may have been
an adequate reason way back when but for what is now no good
reason at all). If anything causes that old copy of the superblock
to be written to the disk, you lose.

: Since I've discovered this problem, we instruct our customers to use
: a specially prepared "emergency boot"-floppydisk, which automatically runs
: 'fsck' from floppy on /dev/hd0root.  This workaround solves the problem,
: but the manual handling is ... uh.... cumbersome ? In german I would
: call it "nervig" ;-)

If you don't have some way with fsck to force a reboot, what you
want to do is this: make sure that your systems come up in single
user mode. Instruct your customers to run fsck on the root
manually, reboot without *any* other commands being entered after
the fsck, and then enter the normal operating mode (via init 3 or
whatever).

: P.S.: Excuse my awful english grammar and spelling

Actually, it is quite good. There are many supposedly literate
natives who don't do as well. The only glaring things were those
extra capital letters. We're nowhere near as consistent as you
Germans on what we capitalize. :-)



More information about the Comp.unix.xenix.sco mailing list