Friday, September 12, 2008

Linux - fix ext3 file system

1) rebooting into a rescue CD environment (not allowing the rescue environmentto mount or fsck your filesystems).

2) Nuke the ext3 journal:

tune2fs -O ^has_journal /dev/(possibly doing the same for other problem partitions)

3) Do a fake fsck to see the extent of damage:

fsck -fn /dev/(after checking things out.. use "-fy" once you're sure that it's safe)

4) Rebuild the journal w, "

tune2fs -j /dev/(rerun at least once until "clean" result is repeatable)

5) Mount and check things out,

"mkdir /mnt/tmp && mount -t ext3 /dev/ /mnt/tmp"

6) Gracefully umount & reboot:

"umount /mnt/tmp && shutdown -rf now && exit"

No comments:

Post a Comment