Toward Recovering Data from a Dead Disk
This is placed here in the hopes that Google indexes it and others can benefit from my pain. Erm, Experience.
So your disk is dead. Getting IO errors and junk like that when you try to mount it, and your superblock is bad.
- Back up the partition. Do this for each partition you care about:
- dd if=[device] of=[filename] bs=[block size, probably 1024] conv=noerror,sync,notrunc
- chattr +i [filename] (makes the file immutable; ext2/3 only)
- Copy the backup. Use the same method as before, but with another filename. DON'T make it immutable!.
- Bind the copy to a loopback device: losetup /dev/loop1 [file]
- fsck the loopback'ed copy, using a backup block:
- mkfs.ext3 -n -b [blocksize of your fs, probably 4096] [device]
- fsck.ext3 -n -b [backup superblock]
- Mount the repaired copied filesystem: mount -t ext3 -o ro /dev/loop1 [mountpoint]
More when I've actually tried all this and gotten it to work. ;)
Page last modified Wednesday, 10-May-2006 21:04:14 EDT