[H-GEN] Partition table recovery.

Gmail 52midnight at gmail.com
Tue Oct 26 17:42:42 EDT 2010


> 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".

The first thing to point out is that the hard disk has NOT been killed,  
and that a mising or faulty partition table is a very simple SOFTWARE  
(type) fault that is easily repaired. It's only a problem if the disk  
contains unrecovered data. Even then, if it's  Windows disk, it probably  
had a single partition, and rewriting the part-tab with the default values  
(i.e. cylinder numbers) will very likely work.

I emphasize this because most non-tech Users are paranoid about this sort  
of thing simply because they don't understand it. Calming them down is the  
first step to successful recovery.

> Attempting to format to ext2 (?) fails.

Yep. There must be a valid part-tab before a filesystem can be written.

> .. boot a livecd .. use a program like gpart or fdisk .. to recover or  
> .. start again.

This is standard operating procedure.

> Boot from a live CD, use dd to wipe the first few blocks, then fdisk to  
> create new partitions.

Excellent advice and often essential to get past the M$ "protection"  
schemes which often stop you doing things that are LEGAL. I use:

> # dd if=/dev/zero of=/dev/hda bs=512 count=10000

This may be a bit premature, but I'm in process of putting some pages on  
my site covering this sort of thing. If any of this is useful:

http://52midnight.com/linux/installation/index.html

you're welcome to point your friend to it.

Carl Adams.




More information about the General mailing list