Repair ext4 filesystem on USB drive

Posted by phineas on Ask Ubuntu See other posts from Ask Ubuntu or by phineas
Published on 2012-10-10T09:24:06Z Indexed on 2012/10/10 9:52 UTC
Read the original article Hit count: 237

Yet another filesystem question. I wanted to use a USB drive that I hadn't mounted for a month or so and was surprised by the fact Ubuntu was unable to mount it. I looked it up in the disk utility and it said it discovered a device with 17 MB instead of 2 GB. The hardware looks intact, I hope for the best for repairing the ext4 filesystem.
I followed the instructions from HOWTO: Repair a broken Ext4 Superblock in Ubuntu, but I wasn't successful.

# fsck.ext4 -v /dev/sdb

e2fsck 1.42.5 (29-Jul-2012)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193

Filesystem blocks are invalid, however when I run the recommended solution to try the alternate superblock, I get the following output:

# e2fsck -b 8193 /dev/sdb

e2fsck 1.42.5 (29-Jul-2012)
e2fsck: Invalid argument while trying to open /dev/sdb

plus the same error message as in the last paragraph above.
Any ideas how to recover the drive?
Thank you very much!


Edit: testdisk won't help. I'm still stunned why the tools only discover 17 MB.

© Ask Ubuntu or respective owner

Related posts about filesystem

Related posts about recovery