DS.rs = [[an error occurred while processing this directive]]

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.

  1. Back up the partition. Do this for each partition you care about:
    1. dd if=[device] of=[filename] bs=[block size, probably 1024] conv=noerror,sync,notrunc
    2. chattr +i [filename] (makes the file immutable; ext2/3 only)
  2. Copy the backup. Use the same method as before, but with another filename. DON'T make it immutable!.
  3. Bind the copy to a loopback device: losetup /dev/loop1 [file]
  4. fsck the loopback'ed copy, using a backup block:
    1. mkfs.ext3 -n -b [blocksize of your fs, probably 4096] [device]
    2. fsck.ext3 -n -b [backup superblock]
    Keep trying until a superblock works. If none do, you probably have the wrong blocksize (or you're really completely hosed)
  5. Mount the repaired copied filesystem: mount -t ext3 -o ro /dev/loop1 [mountpoint]
  6. More when I've actually tried all this and gotten it to work. ;)

    Page last modified Wednesday, 10-May-2006 21:04:14 EDT