Tuesday, October 17, 2006

A wonderful disk partition recover tool, TestDisk

My laptop is Thinkpad R51E and it had a 5GB HPA partition. I recently installed ubuntu in it with splitting the hidden partition to a ext3 partition and a linux swap partition by gparted tool that was used in ubuntu installation procedure. Then I used gparted to decrease size of original C:, then created a extended partition and created 3 logical partitions in it, including a FAT32 partition and two NTFS partitions.

Monday I tried to reinstall WindowsXP on the laptop. But it seemed that GRUB can't recognized the XP's boot record. I has to clear GRUB by FreeDOS "fdisk /mbr" command. Then disaster came. I lost the second partition and the third partition.

Fortunately I could boot into XP. I downloaded a popular recovery tool "Partition Table Doctor" to resolve the disaster. It found my lost partitions soon but after I applied the recovery operation I got another terrible disaster -- these partitions was not be recovered and my two Linux partitions were disappeared!

(After the disaster I found a reason that maybe cause "PTD" recovery failed. WinXP recognizes my hard disk as 240 Heads , but Ubuntu, include FreeDOS fdisk perhaps, recognizes it as 16 Heads).

At last I found TestDisk. It hasn't a cool GUI front end but it is powerful. TestDisk scan all possible boot sectors and display all recovery options and let user to choose the right partition operation. Finally I recovered all partitions under ubuntu Live CD environment.

Tips: Teskdisk doesn't scan all sectors in the default analyse process. Maybe you wouldn't get all lost partition information after the default process end. Then you should execute "[Search! ]" option to scan all sectors.

Besides it save my data successfully twice(I recovered a FreeBSD system last year with it), TestDisk is a opensource software and it support many OSs and filesytems. I recommend TeskDisk as the first recovery tool of partition damage.

No comments: