LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   how to recover partition table using gpart (http://www.linuxquestions.org/questions/showthread.php?t=4175459375)

rupeshforu 04-24-2013 12:10 AM

how to recover partition table using gpart
 
Sir yesterday while I was operating suse12.2 power failure occurred at that time I was accessing another internal harddisk finally I opened gparted and found no partitions. In gparted I have selected the option create partition table and also I ran the tool testdisk but no use.After that I ran the command gpart /dev/sda and found four partitions. Can you please describe how to recover partition table using gpart.

Actually I am having two harddisks one 500GB on which I have installed suse and another harddisk of size 160GB on which I have installed Windows7.

Regards,
Rupesh.

heinblöd 04-24-2013 02:38 AM

Hello,
I would use testdisk to restore partitions.

If it didn't find anything it's maybe because you created a new partition table which logically DELETED your old one.

Never write anything to a disk you want to restore sth on .

But you migth be able to still find it with testdisk using the deep (or long) scan .
You may have to switch testdisk to expert mode

Also if you have a copy of the partitioning scheme and if you know exactly the partition boundaries, you could simply recreate the old settings manually

rupeshforu 04-24-2013 03:01 AM

Sir yesterday I have ran testdisk three to four times on opensuse12.2 and each and every time it is showing errors like cylinders are not in correct position etc., so can I trust that tool and also I think it has destroyed my disk completely. At present I have gparted live disk.If you don't mind can you please describe the procedure of recovering mbr using testdisk.

heinblöd 04-24-2013 03:15 AM

I think it is telling you that the partition is not ending on cylinder boundaries which often happens when you partition disks with windows.

the manual says:
Quote:

How to find the correct number of heads?

If the HD geometry mismatches the geometry used when creating the partition table, warning messages such as: Bad sector count, Bad relative sector or Bad ending head are displayed when Analyse is selected from the main menu. If you see such errors, you may need to use the Geometry menu to change the logical number of heads. Try 255, 16, 32, 64, 128 and 240 heads until TestDisk finds all your partitions. 255 and 240 are the most common head values. If you installed Linux as the only OS on your hard drive, it tends to default to only 16 heads.
Everything else you need to know is described here:

http://www.cgsecurity.org/wiki/TestDisk

look into the "Documentation" section in the middle of the page, they even have a step by step tutorial

Quote:

Originally Posted by rupeshforu (Post 4937792)
and also I think it has destroyed my disk completely

Sorry to say,but if sth has destroyed anything then it was gparted when creating a new Partition table ...

heinblöd 04-24-2013 03:28 AM

Maybe save the present mbr before doing anything , so you have a copy of the situation :

dd if=/dev/sda of=/somewhere/on/a/usb/stick bs=512 count=1

rupeshforu 04-24-2013 04:32 AM

gpart main functionality is to find lost partitions. So kindly can you give suggestions on how to use gpart.

heinblöd 04-25-2013 03:16 AM

Sorry I can't help with gpart, never used it

TobiSGD 04-27-2013 10:06 AM

All the info you need can be found on the Gpart website: http://www.brzitwa.de/mb/gpart/index.html

TB0ne 04-28-2013 10:41 AM

Quote:

Originally Posted by rupeshforu (Post 4937862)
gpart main functionality is to find lost partitions. So kindly can you give suggestions on how to use gpart.

You may also want to try the replies in your other, very similar, thread:
http://www.linuxquestions.org/questi...fs-4175452092/


All times are GMT -5. The time now is 08:47 PM.