November 15th, 2005, 01:20 PM #1
Corrupted filesystem (Linux ext2)
Was: Fedora Core 4
I had a 120 gig hdd partitioned into a ~20 gig fat32 Windows partition (never used), a 60 gig fat32 storage partition, 100mb ext3 /boot, 1.5gb /swap, and the rest was the / partition (ext3), which for some reason FC4 puts in lvm2 even though it's a single disk.
/ is MIA. When the system boots, the kernel finds that there is lvm2 with 2 logical partitions, then panics after it tries to read the actual root and says it's corrupted. I tried booting the rescuecd, but it just says "no linux partitions found" then dumps me to a console.
If I try "fsck /dev/hda" it tells me that no ext2 partitions are found or there's a bad magic number.
Is there some kind of recovery program/script that I can use to fix this?
November 15th, 2005, 01:36 PM #2
Try fsck /dev/hdaX where X is where you actually partitioned the / partition. 2 words of caution. It is likely you will get a LOT of double or orphaned inodes, fsck will require a few passes to resolve these issues. Be patient
1 word of optimism though, I power cycled the machine DURING this process and still had no data loss (corrupted /). If it gives you trouble about not detecting the fs type, run fsck.ext3
edit: despite the thread title, I am assuming / is ext3 as that is what you posted above. If it is ext2 then good luck
Last edited by krohnjw; November 15th, 2005 at 01:39 PM.
November 15th, 2005, 05:48 PM #3
Actually, fsck will not run (/dev/hda4), complaining about a bad superblock and to try the alternative with the switch -b 8139, which also says bad superblock.
Does it make a difference that fedora uses LVM for this partition? Also, it is, of course, ext3 .
November 15th, 2005, 06:54 PM #4
bleh. I will take a look when I get home. No options off the top of my head right now (outside of finding another superblock to use, possibly tricky).
A quick poke aorund google suggests using /dev/system/LVNAME for fsck w/ LVM. Take a look here:
I will look more when I get home.
November 16th, 2005, 10:04 AM #5
November 16th, 2005, 09:26 PM #6
Sorry, I'm a grad student, my work doesn't end till my advisor says so... I just got home. Starting now.
November 17th, 2005, 01:19 AM #7
I couldn't get fsck to run on /dev/Volgroup00/LogVol00, which is where Fedora apparently sticks it.
Addrescue seemed like it could work, but you have to know the block locations of the files... I think it would take less time to redo the work and just take more photos and such than to do that (unless I'm misunderstanding the purpose).
However, I found a closed source freeware (free, but not Free) program for windows called R-Tools-Linux. It's disappointing I ended up using closed source windows-only software to do the job, but I have to say, you all might bookmark that site, because the software was able to recover about 96% of my files and was very easy to use. Props to them for offering the ext2 version for free.
November 21st, 2005, 06:35 PM #8
Just a thought... Any chance you could put a journalized fs for your / on your next install? ext3 or reiserfs? (I dont think fedora supports reiserfs, could be wrong though) Ext2 is the linux equivalent to fat32-- very breakable (imho)
There is a way to convert ext2 to ext3 and then set it up to mount that way in fstab. Could save ya lots of greef.
Glad you found a solution.
danIf you believe it is important for future generations to learn about computers. Please help--- http://computer4kids.us
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By krohnjw in forum Linux and UnixReplies: 3Last Post: October 4th, 2005, 03:46 PM
By Redwolf in forum Linux and UnixReplies: 22Last Post: September 16th, 2004, 12:10 PM
By Anteater in forum Linux and UnixReplies: 3Last Post: September 14th, 2004, 01:55 PM
By storm2k in forum Applications and Operating SystemsReplies: 15Last Post: August 1st, 2002, 12:37 PM
By lynchmob in forum Applications and Operating SystemsReplies: 5Last Post: July 27th, 2002, 02:56 PM