LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   recovering lost partition (https://www.linuxquestions.org/questions/linux-general-1/recovering-lost-partition-882546/)

segieif03 05-24-2011 08:40 PM

recovering lost partition
 
hey Guys need some hand here. I am trying to create a partition using gparted for my centos installation but I accidentally deleted my partition table.
my partition was created on windows7 and dual boot with ubuntu.
I am trying to recover it using test disk with ubuntu live cd
but after I recover it still I neither can't boot on windows or Ubuntu

here is the result of patition quick seart
Quote:

Disk /dev/sda - 320 GB / 298 GiB - CHS 38914 255 63
Partition Start End Size in sectors
>D HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved]
D HPFS - NTFS 12 223 20 10694 23 17 171593728
D HPFS - NTFS 10694 23 18 21150 44 14 167976960 [Fussion]
D HPFS - NTFS 21150 44 15 38913 37 36 285362176 [FileHouse]
I tried to set up my partition characteristic like this

Quote:

Disk /dev/sda - 320 GB / 298 GiB - CHS 38914 255 63
Partition Start End Size in sectors
1 * HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved
2 P HPFS - NTFS 12 223 20 10694 23 17 171593728
3 E extended LBA 21150 44 1 38913 254 63 285375888
5 L HPFS - NTFS 21150 44 15 38913 37 36 285362176 [FileHouse]
and still can't reboot on my win7 or ubuntu

please someone help me I really need to recover my partiotions
thank you!

gentisle 05-24-2011 09:36 PM

I'm not quite sure what you meant, but gparted is for creating/deleting/resizing partitions. If you want to recover your partition table, the command is gpart which is "guess partition". If the code you posted is from gpart as opposed to gpartED, then you are using the right program.

You will want to back up your mbr before doing any of this. BTW, you might have better luck using the gpart from SystemRescueCD. Just add ".com" to that, download and burn to disc from another machine. It's a quick booting live Linux for rescuing problem computers.

Backup your mbr by doing this:

Code:

sudo dd if=/dev/xxx of=/dev/yyy/myTrashedHDD.mbr bs=512 count=1
Where xxx = something like hda or sda or sdb for 1st IDE HDD, 1st or 2nd sata HDD respectively, and yyy = a USB flash drive or some other HDD that doesn't have partition problems. And of course, you have to save this info in a file or it will wipe the mbr of the drive where you put it. Hence the filename myTrashedHDD.mbr or whatever you like. If you ever need to restore the mbr from that file, you simply switch the devices on the if and of parameters.

If you don't know what the device name is for your HDD, just type:

Code:

sudo fdisk -l
And that will list your hard drives.


All times are GMT -5. The time now is 04:02 PM.