the Undernet #linux channel faq
previous contents next

My system won't boot: it asks me to run fsck manually

This happens either because you shut down linux improperly (ie, without unmounting the discs) or your disc is corrupted, perhaps by age.

When this happens to you, don't panic.

Type in your root password and at the prompt, run fsck over the affected volumes like this:

    # e2fsck -y /dev/device

where /dev/device is the affected volume. Which volume is affected? The previous few lines on the display probably look similar to this:

Checking rootfilesystems
Parallelizing fsck version 1.10 (24-Apr-97)
[/sbin/fsck.ext2] fsck.ext2 -a /dev/hda5
/dev/hda5 contains a file system with errors, check forced

The device containing affected filesystem in this case is /dev/hda5.

One of several things will happen. If you're lucky, the volume will be repaired and you can continue to boot normally. Be more careful next time. Press control-d to continue booting.

If you are unlucky, the filesystem will be repaired and you will have lost data. Hopefully, you will not have lost anything vital. Chances are only the files accessed recently will have been damaged.

If you are really unlucky you will have lost some file required to boot, such as inittab or an rc script. In this case you can repair your install manually, but it probably is more effort than reinstalling from scratch.

If you are exceptionally unlucky, you might get a message such as this:

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 

Try again, this time following that advice by including the -b parameter. Hold your breath. You either got the wrong device name, or if it really is an ext2 filesystem and you are having to resort to backup superblocks, the filesystem has been severely damaged.


previous contents next
questions, comments? email PolarWolf | (c) - 2002 undernet #linux