Fucked up hard drive

So I needed a 300G hard drive to store results from my research, and I asked for an external one so that I could take the results home with me if I wanted to work at home. ITS got me one (after trying to convince to get an internal one, claiming they are more of a risk for data loss) but they got a really crappy no name brand USB enclosure. It generally works okay, but if I start doing heavy amounts of data transfer it dies. And then I can’t actually access the hard drive properly until I turn it on and off again (IT crowd anyone?).

After I switch it back on and try and mount it I get:

mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or other error

How does one fix this? Well…

After a bit of google-fu one can fix this by first finding the backup superblocks:

# dumpe2fs /dev/sdb1 | grep Backup
dumpe2fs 1.40-WIP (14-Nov-2006)
  Backup superblock at 32768, Group descriptors at 32769-32787
  Backup superblock at 98304, Group descriptors at 98305-98323
  Backup superblock at 163840, Group descriptors at 163841-163859
  Backup superblock at 229376, Group descriptors at 229377-229395
  Backup superblock at 294912, Group descriptors at 294913-294931
  Backup superblock at 819200, Group descriptors at 819201-819219
  Backup superblock at 884736, Group descriptors at 884737-884755
  Backup superblock at 1605632, Group descriptors at 1605633-1605651
  Backup superblock at 2654208, Group descriptors at 2654209-2654227
  Backup superblock at 4096000, Group descriptors at 4096001-4096019
  Backup superblock at 7962624, Group descriptors at 7962625-7962643
  Backup superblock at 11239424, Group descriptors at 11239425-11239443
  Backup superblock at 20480000, Group descriptors at 20480001-20480019
  Backup superblock at 23887872, Group descriptors at 23887873-23887891
  Backup superblock at 71663616, Group descriptors at 71663617-71663635

Select a backup superblock, and then run fsck with it:

# e2fsck -b 32768 /dev/sdb1

You might have a bunch of things to fix, but it should get your hard drive back in a usable state. I’m going to go bitch at ITS and get them to either install the HDD internally or get a decent enclosure. I know it isn’t linux because it did the same thing while I was transferring some of my mp3 collection on to it (not something I should be doing with a school HDD but hey).

1 comment so far ↓

#1   Hamish Twaddle on 04.09.07 at 1:50 pm

Had the same thing happen. I think bob did it, or something. But did the same thing the only thing I the did not work completely was I lost a whole lot of file names. but hte files where fine. so just a matter of going through them all the renaming them


Leave a Comment