Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

The gparted feature "Attempt Data Rescue" yielded no results, no filesystems were identified.

@Colin According to disc utility, the device is unpartitioned, I can only deal with devices at the moment. It's the question if the partition table or the filesystem is damaged. Running fsck with partition gives

fsck.ext2: No such file or directory while trying to open /dev/sdb1
Possibly non-existent device?


# sudo dd if=/dev/sdb bs=512 count=1 | hd

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00307007 s, 167 kB/s

Since all are zeros, this means no remains of MBR?

The result was there quite quick.

sudo hd /dev/sdb | less

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

It's all zero. I guess the pendrive broke down lying in a drawer in a magical, unexplainable way.

share|improve this question

closed as not constructive by phineas, maythux, Mitch, Stephen Myall, devav2 Oct 12 '12 at 12:13

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Create a new partition table. –  Naveen Oct 10 '12 at 10:31
How can I do it? Will I possibly keep the data? –  phineas Oct 10 '12 at 10:42
Sorry you will loose your data if you create a new partition table. As I know, unlike NTFS, ext4 doesn't get damage unless your device is. ext4 is not focused as a filesystem for pen drivers. Most pen drivers are optimized to support FAT. You can create a new partition table using the Disk Utility in Ubuntu...but I can't confirm it will fix your issue. For me, it did. –  Naveen Oct 10 '12 at 11:13
If you think it had been partitioned to begin with, utilities aren't going to make up for the lack of partitioning now. In that case I suggest you include in your question a link to the output of sudo dd if=/dev/sdb bs=512 count=1 | hd to see if there is a remnant of an MBR there. –  John S Gruber Oct 10 '12 at 19:52
It definitely sounds like a hardware problem to me. –  nfirvine Oct 11 '12 at 17:35

1 Answer 1

Are you sure the ext4 file system isn't on a partition, such as /dev/sdb1 rather than /dev/sdb?

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. –  Mitch Oct 10 '12 at 17:33
I edited the question for you. You may leave the "answer" as a comment. –  phineas Oct 10 '12 at 17:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.