[H-GEN] Partition table recovery

Stephen Thorne stephen at thorne.id.au
Mon Oct 25 20:51:41 EDT 2010


On 2010-10-25, gavin duley wrote:
> a friend recently managed to apparently kill their hard disc using
> gparted. It failed to finish writing the new partition table, and now
> gives the error "invalid partition table". Not sure of what
> distribution they're using yet, or what other OSes they have on the
> disc, but will find out soon hopefully.
> 
> Is there any way to recover or recreate the partition table without
> losing all the data on the drive?

Hi.

I managed to erase my partition table recently, and successfully
recovered all my data. Unfortunately it was a long, complicated
process fraught with danger, and a grue.

These are the first steps that should be done in and drive recovery:

 - Remove the disk from the machine where the problem occurred. It might
   be a problem with the machine that caused the drive to lose data.
 - Install the disk in another (perferably linux) machine either
   internally or using a USB caddy.
 - If you don't have a linux machine, use usb-creator and the ubuntu
   10.10 ISO to make a bootable live-usb key. Make sure to allocate
   512mb on the usb key for storage (default is 128mb, that's too
   small)
 - Do a block copy of the entire disk to another drive for safety, i.e.:
   dd if=/dev/sdc of=/path/to/backupfile.hdd

Once you've done these steps you'll have a full backup, and the
situation will not degrade further, and if it does, you can at least
restore the drive you're trying to recover to the state you started in.

At this point, you google for lots of nice sounding tools for recovering
partition tables, and find that most of them are really hard to use and
have poor documentation. Eventually you may find one that works for you.

Good luck.

-- 
Regards,
Stephen Thorne
Development Engineer
Netbox Blue



More information about the General mailing list