0

Just had a power failure and am just going through my 4 USB disks to remount them and found that 1 (the most important one) is coming back as 'doesn't contain a valid partition table'.

What can I do to try to repair the disk and hopefully retrieve the partition? Luckily, I do nightly backups. but would like to get what was there today if possible.

This is a Linux computer and I'm using ext3 partition type.

dmesg is giving me the following:

SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
sda: Write Protect is off
sda: Mode Sense: 34 00 00 00
sda: assuming drive cache: write through
 sda: unknown partition table
sd 5:0:0:0: Attached scsi disk sda
sd 5:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
EXT3-fs error (device sda): ext3_check_descriptors: Block bitmap for group 880 not in group (block 0)!
EXT3-fs: group descriptors corrupted!
HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
David
  • 841
  • 3
  • 14
  • 31

4 Answers4

1

Try booting with a Linux boot disk and running Testdisk. It will scan for and recover many partition errors. I use Rescue Is Possible (RIP) Linux to do that with systems...you might have to google for the disc download location, or maybe the Ubuntu live CD or other tools have it also.

Bart Silverstrim
  • 31,172
  • 9
  • 67
  • 87
0

You need a tool that will scan the disk, looking for partitions. The only one I've heard of is gpart. According to the Wikipedia entry you can find more recently updated versions in the package repositories of the major distros, as the original author seems to have stopped working on the project.

EDIT: Apparently I've forgotten much of my old Windows lore. It's worth trying fdisk /mbr from DOS or Windows. Also on Windows you can try fixmbr from the recovery console.

Insyte
  • 9,394
  • 3
  • 28
  • 45
0

If at all possible (if you have the storage space available), backup the whole drive to an image using something like ddrescue. Then...

Try creating a new partition just like you created one initially. Chances are you just need to run (from memory, might be slightly incorrect) fdisk /dev/sda, and then n, 1, 82 (or whatever number a linux filesystem is), return a few times to set default start and size, and then w to save. I think fdisk should force a partition rescan on exit (if not, run apropos scsi and find the right command to rescan the scsi bus), then try mounting the partition /dev/sda1 with -t ext3

Either way, you're not too badly off if you have nightly backups.

Good luck :)

Lee B
  • 3,460
  • 1
  • 17
  • 15
0

What's likely happening is the filesystem is corrupt. If you run an fdisk -l on the drive, do you see a partition there? If so, the partition is likely intact, but the filesystem is corrupt.

Boot into Rescue mode and run fsck.ext3 on that partition and let it do it's thing. It'll likely find lots of corruption, but hopefully it's recoverable.

vmfarms
  • 3,117
  • 20
  • 17