Ask Your Question
0

Recurring corruption of /dev/sda1; what do?

asked 2013-01-01 02:50:23 -0500

wasH2so4 gravatar image

Following shut down or power loss, Fedora fails to boot and prints the following (transcribed to the best of my ability):

Cannot open font file True

_Fedora-17-i686-: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
dracut Warning: e2fsck returned with 4
dracut Warning: -Fedora-17-i686- contains a file with errors, check forced.
dracut Warning: -Fedora-17-i686-: Inodes that were part of corrupted orphan linked list found.
dracut Warning: *** An error occurred during the file system check.
dracut Warning: *** Dropping you to a shell; the system will try
dracut Warning: *** to mount the filesystem(s), when you leave the shell.

dracut Warning:

Dropping to a debug shell.

(Repair filesystem):/#

Naturally, I tried fsck and the magic words seemed to be "fsck -f /dev/sda1". That printed the following:

fsck from util-linux 2.21.1
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 397/128016 files (0.5% non-contiguous), 113179/512000 blocks

And then, upon exiting, Fedora boots up fine. However, the problem continues to occur every time I power off (obviously, this occurs upon powering back on) or after my battery dies (whether that occurs during suspension or while still running).

df -h /dev/sda1 returns the following:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       485M   95M  365M  21% /boot

Therefore, I guess sda1 is mounted on boot. I don't know if that's normal.

The problem seems to have begun a few months ago after I removed the battery briefly during a stalled boot which I interpreted as a freeze (during which the power button wasn't having any effect). Once I turned it back on, the headache started.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-01 14:00:09 -0500

Run an fsck on all of your filesystems; the dracut warning doesn't seem to declare /dev/sda1 or any other filesystem as the problem. Be careful using -f ! Make sure the filesystems are not mounted, and don't force unless you have to.

Chronic filesystem corruption can also be caused by memory errors. You may want to run memtest overnight.

edit flag offensive delete link more

Comments

1

There are a few different ways. fdisk -l should give you your partition layout. blkid shows filesystems. If you are using LVM - fdisk output should make this obvious - you might have to scan for and activate your volumes with something like lvm vgscanlvm vgchange -ay

randomuser gravatar imagerandomuser ( 2013-01-01 14:51:26 -0500 )edit

man is your friend; man fsck shows that if you don't specify a filesystem, it will check everything in /etc/fstab, serially. Just to be sure, run the command "touch /forcefsck" as root (without the quotation marks) just before shutting down or rebooting as that will make sure everything gets fscked the next time you boot.

sideburns gravatar imagesideburns ( 2013-01-01 15:17:49 -0500 )edit

Swap space can be thought of as sort of a slush pile of runtime data; there's no filesystem there. We could speculate that your root filesystem was corrupted when a number of writes were started, but not committed to the disk before power loss. Glad you were able to resolve!

randomuser gravatar imagerandomuser ( 2013-01-01 19:37:49 -0500 )edit

Question Tools

Stats

Asked: 2013-01-01 02:50:23 -0500

Seen: 3,612 times

Last updated: Jan 01 '13