[H-GEN] Partition table recovery.

Snowy Angelique Maslov snowy at snowy.org
Tue Oct 26 18:39:21 EDT 2010


On 27/10/2010 7:42 AM, Gmail wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and     ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
>
>> 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.
>
>

I would also be one to suggest testdisk as well; I have used it recently 
and it is very good at detecting partitions and filesystems.  We were 
able to recover a RAID5 LVM2 setup which had corrupted the partition 
tables on a couple of drives without issue.   The interface for testdisk 
does take some getting use to however.



-- 
Snowy Angelique Maslov<snowy at snowy.org>




More information about the General mailing list