I used ddrescue to copy /dev/md1 to a disk of sufficient size, and
re-ran e2fsck, and still get the error message that there's no root
file system (I've tried most every superblock):
# fsck -y -b 7962624 /dev/sdf
fsck 1.36 (05-Feb-2005)
e2fsck 1.36 (05-Feb-2005)
Superblock has a bad ext3 journal (inode 8).
Clear? yes
*** ext3 journal has been deleted - filesystem is now ext2 only ***
/dev/sdf was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Missing '..' in directory inode 1785876.
Fix? yes
Entry '..' in ... (1785876) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 1785969.
Fix? yes
Entry '..' in ... (1785969) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 11436033.
Fix? yes
Entry '..' in ... (11436033) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 23953409.
Fix? yes
Entry '..' in ... (23953409) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 24281345.
Fix? yes
Entry '..' in ... (24281345) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 24692015.
Fix? yes
Entry '..' in ... (24692015) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25214978.
Fix? yes
Entry '..' in ... (25214978) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25214995.
Fix? yes
Entry '..' in ... (25214995) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25214998.
Fix? yes
Entry '..' in ... (25214998) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215001.
Fix? yes
Entry '..' in ... (25215001) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215004.
Fix? yes
Entry '..' in ... (25215004) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215036.
Fix? yes
Entry '..' in ... (25215036) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215040.
Fix? yes
Entry '..' in ... (25215040) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215043.
Fix? yes
Entry '..' in ... (25215043) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215101.
Fix? yes
Entry '..' in ... (25215101) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215104.
Fix? yes
Entry '..' in ... (25215104) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215154.
Fix? yes
Entry '..' in ... (25215154) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215157.
Fix? yes
Entry '..' in ... (25215157) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215160.
Fix? yes
Entry '..' in ... (25215160) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215178.
Fix? yes
Entry '..' in ... (25215178) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215197.
Fix? yes
Entry '..' in ... (25215197) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215200.
Fix? yes
Entry '..' in ... (25215200) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215222.
Fix? yes
Entry '..' in ... (25215222) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215472.
Fix? yes
Entry '..' in ... (25215472) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215475.
Fix? yes
Entry '..' in ... (25215475) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215514.
Fix? yes
Entry '..' in ... (25215514) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215524.
Fix? yes
Entry '..' in ... (25215524) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25215528.
Fix? yes
Entry '..' in ... (25215528) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346149.
Fix? yes
Entry '..' in ... (25346149) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346160.
Fix? yes
Entry '..' in ... (25346160) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346163.
Fix? yes
Entry '..' in ... (25346163) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346173.
Fix? yes
Entry '..' in ... (25346173) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346190.
Fix? yes
Entry '..' in ... (25346190) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346197.
Fix? yes
Entry '..' in ... (25346197) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 25346205.
Fix? yes
Entry '..' in ... (25346205) points to inode (2) located in a bad block.
Clear? yes
Missing '..' in directory inode 26460281.
Fix? yes
Entry '..' in ... (26460281) points to inode (2) located in a bad block.
Clear? yes
Filesystem contains large files, but lacks LARGE_FILE flag in superblock.
Fix? yes
Pass 3: Checking directory connectivity
Root inode is not a directory; aborting.
e2fsck: aborted
fsck.ext2 /dev/sdf failed (status 0x8). Run manually!
Any ideas how to recover?
Thanks,
Chris
-----------------------------------------------
From: "Theodore Ts'o" <tytso mit edu>
To: Mike Moran <mhm austin ibm com>
Cc: ext3-users redhat com
Subject: Re: fixing a corrupt /dev/hdar .. debugfs assistance...
Date: Mon, 28 Jul 2003 16:53:07 -0400 ________________________________
On Mon, Jul 28, 2003 at 10:42:04AM -0500, Mike Moran
wrote:> Had a drive crash which a very critital inode. e2fshck
> returns a stream of :
>
> Entry '..' in ... (#######) points to inode (2) located in a bad
block
>
> Pass 3: Checking directory connectivity
> Root inode is not a directory: aborting
> e2fsck: aborted
>
> /dev/hda4: ***** FILE SYSTEM WAS MODIFIED *****
> Floating point exception
>
> I'm wondering if I can use debugfs to relocate (rebuild) inode (2) a
> good block. If so, how would I go about doing it
There is a bad block at the beginning of the inode table.
Reconstructing the root inode is easy, but the problem is that the
root inode must be at a fixed location, and you currently have a bad
block located there.
It might be possible to force the disk drive to use another block from
its spare pool, but very often one bad block is just a prelude to
another, and the value of the disk drive (< $200) is often in the
noise compared to the value of the data stored on the disk drive
(priceless).
So the safest approach would be get another disk, and use dd to copy
the filesystem to another partition:
dd if=/dev/hda4 of=/dev/hdb4 bs=1k conf=sync,noerror
Then run e2fsck on the new disk; it will create a new root and
lost+found directory, and move all of the inodes that were in the root
directory and home them in the lost+found directory. You should be
able to reconstruct the names of each of the directories in the
lost+found directory from their contents.
Good luck!
- Ted