Thursday, February 25, 2010

zenwalk - corrupted disk

Links: helpful command explanations

A couple of Christmases ago I installed Zenwalk 6.0 on one of my parents' HP systems. It remained mostly reliable until this week, when it froze and subsequently stopped booting properly. Ultimately, we found that their system contained one or more inode conflicts. We fixed these cross-links with two commands and a great number, roughly 1,000, confirmation keystrokes. All this via an hour-long telephone call. My mother is a patient and persistent soul.

Part one
My folks told me they recalled being online arranging bookmarks in Iceweasel (Zenwalk's rebranded Mozilla-Firefox). While arranging, the system froze entirely, apparently remaining unresponsive to the last-resort X11 Ctrl+Backspace exit. Mom said she next attempted a hard reboot but this also failed. During the attempt, error messages describing cross-indexed inodes and a corrupt superblock were scrolling. This was no doubt fsck scanning /dev/sda1. Following fsck, the script eventually exited to a single-user root login. No action was taken at the root login, and the system eventually rebooted itself and again initiated fsck. And so on. Then my phone rang ;)

Part two
It appeared the most direct route was to reboot the system and let it exit to the point where it allowed the single-user root login. From that point, we could enter commands directly, such as to locate back-up copies of the superblock on /dev/sda1. With a back-up copy located, we could run a clean fsck and resolve any doubly referenced inodes. Accordingly, the first step was to retrieve a list of the backup superblocks.

# dumpe2fs /dev/sda1 | grep superblock

This provided us with a list of about 12 back-up superblock locations. The first of these was "32768".

Part three
Used the back-up superblock to reestablish order in the system files and clear-up the multiply- referenced inode conflict.

# fsck -b 32768 /dev/sda1

Fsck eventually resolved the inode conflicts and some directory problems. During the process, my mother had to enter confirming "yes"'s nearly 1,000 times.

success
The problem was solved for the time being. Since I could not access the system, it remains unclear whether the problem was related to Iceweasel, to a possible hard drive problem, or to some combination of these.

No comments: