LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   partition table recovery (https://www.linuxquestions.org/questions/linux-software-2/partition-table-recovery-764408/)

kkv1 10-25-2009 06:35 PM

partition table recovery
 
Ok - i kind of was over ambitious and stupid but can somebidy help me recover from this ? Thanks in advance

I had a nice desktop dual booting vista and fedora 8. Now I got a few extra hours and thought I can upgrade to fedora 11. Then learnt that there is no upgrade but only a new install.

So I burnt the iso and tried to update the ext3 partitions only. The question was like 'update all linux partitions' and I said yes. Then it seems to have deleted the entire partition. I subsequently didnt proceed as I could see the entire 500 GB as one partition in the advanced menu. Usually it shows up the NT partitions and the linux partitions.

So now I have a missing OS error on bootup. The recovery CDs all tell that there is no partition and partition tools say that disk doesnt have partition table at all.

I have not formatted the disk yet and can see some files using some free recovery tools.

The big question is how can I get back the original paritions ? Is there a way to get back my original vista/fedora 8 ? I think the question is only to get the right partition markers. even if i do how is that updated. I remember i partitioned as 50GB/100GB/200GB/50GB/rest
but dont have exact cylinder info.

Anybody that can help .....

thorkelljarl 10-25-2009 08:03 PM

What tools...

What exactly have you tried and what were those free tools you used? Have you searched this forum for prior threads? You are not the first.

One of the first things that is recommended when working with such a problem is to make a clone copy of the HDD. This can be done with a Clonezilla live-cd or with the command "dd" using a live-cd.

You do not want to do anything that writes data to the HDD, and some of the recovery procedures may make changes as they function, so working on a copy is advised.

Recovering partitions is nothing I have tried, but this advice is a basic beginning, and might draw in posters with more experience.

These criteria will also help with that.

http://www.linuxquestions.org/linux/...Ask_a_Question

Elv13 10-25-2009 08:32 PM

Try with the Ultimate boot CD, but if I remember it use a demo version or the apps, but the complete one.

kkv1 10-26-2009 10:55 AM

Not sure what thorkelljarl is geting to. The question and situation is different from others and hence the question. Words may be common but situation isnt. Anyway if you are sure there is somebody who has it - can u post a link. I wont go through the effort of creating a login and posting if I had found one.

I have not written to any part of the disk after live cd.

i have tried to read with demo version of 'data recovery wizard' - the tool !

1) Is there some tool that can rebuild the partition table ?

2) Can I assume that live cd has deleted only the partition table ? Could it have reformatted/deleted the NTFS partitions ? Anybody who knows how live cd works ?

thorkelljarl 10-26-2009 11:43 AM

At your own risk...

What many use when they have this problem is TestDisk, which can be found on several live-cds. It is not foolproof, therefor the suggestion about cloning.

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

The idea is that, if you cloned a copy of the HDD or its partitions and worked on the copy, any difficulties encountered or mistakes made do not effect the original data, and you can clone again and try again.

If you only boot a live-cd, the live-cd should not change anything on the HDD, but a live-cd partitioning tool can certainly make changes.

The problem is that the partitioning tool you used has done something, but it is not clear exactly what, and you have not given enough information such that someone can begin to help. The details are important.

Can you use a live-cd to open a terminal as root and use the command "fdisk -l" and get any result?

kkv1 10-26-2009 10:39 PM

Thanks for the TestDisk link - will try that and let you know. I was trying the demo version of a comercial one - but this one sounds better.

I dont have another identical disk yet - is that something I can get if this doesnt work ? I think for some reason the live CD just deleted the partition table !

I thought I gave all the info. I tried to install fedora 11 - and went past the screen where I say remvoe all linux partitions - next page showed a gui of disks and I clicked cancel as I saw the whole thing as one disk - 470GB and I sensed trouble.

I had done fdisk before posting - it lists the entire disk as hda 470GB as if nothing is there. The demo tool above at least recognized my 50GB primary partition.

Hope TestDisk works !!

kkv1 10-26-2009 11:08 PM

Question on TestDisk :

Got this in quick search :

Partition Start End Size in sectors
1 * HPFS - NTFS 0 32 33 6814 254 63 109480927 [SATA2]

Got this in deep search :
HPFS - NTFS 0 32 33 6814 237 7 109479800 [SATA2]

Which one should I use ? The difference seems to be only in the end 254 Vs 237 and reflects in the size.

Any thoughts ?

kkv1 10-27-2009 05:44 PM

OK Finally got it all working.

For some reason, fedora 11 live cd deleted my partition table !

Cant believe it, but that is the case. So goes the dual boot thing since fedora 11 I think.

TestDisk is commandline and a simple tool to rebuild partition table. keep up the good work. Thanks

For those not so familiar with TestDisk:

deep search actually reports all previously created/deleted file system so multiple partitions/overlapping may be reported. just ignore that and look into what the files are in that partition - if it looks good then its fine.

thorkelljarl 10-27-2009 06:49 PM

We didn't learn...

Congratulations on the recovery. You have not, however, really described what you tried and what worked. Notice the last admonition in the guide.

http://www.linuxquestions.org/linux/...Ask_a_Question

markush 10-28-2009 03:00 AM

Hello together,

I once had a similar issue with a damaged partition-table. Since then I have a (up to date) printed version of my partition tables. For example on my desktop-PC there are two disks hda and hdb.
Code:

echo "partitiontable of hda" > partitiontable.txt
fdisk -l /dev/hda >> partitiontable.txt
echo "partitiontable of hdb" >> partitiontable.txt
fdisk -l /dev/hdb >> partitiontable.txt

this produces a textfile with the output of fdisk -l. It is important to create a printed version of the table because you'll not have access to the file if you once need it in a case of emergency.
One may restore a damaged partitiontable with exactly the same data as for the old table. If there have been no changes of the filesystems or data on the disk, the disk will be in the same state as before.

Markus

kkv1 10-31-2009 09:30 AM

but given this info, how can we update the partition table ?

In any case the tool TestDisk seems to do exactly that - read and write without storing anything.

As before, I dont seem to understand thorkelljarl - what details are you looking for ? I just burn fedora 11 and boot from the cd andthen try to install and select all linux partitions as I dont want anything from past. Was lucky to have selected advanced checkbox. When it didnt show me my nt partition I cancelled and lo and behold when I reboot without cd - cant get into my original fedora 8 and vista ! Think this should be fixed in fedora 11 install cd.

markush 10-31-2009 01:23 PM

Hello kkv1,

note that the partition-table is only a table of contents of the harddrive and changing the partition-table doesn't change anything at the data on the drive.

Changes at the date take place only if you create a new filesystem on the partition. This we call "formatting" the partition.

Such a tool like TestDisk does nothing else than to read the raw data of a drive and "estimate" how the partition-table for such a drive should look like. So it can help you to get access to data which itself are not changed.

If you have a printed version of your partitiontable, it would be easy, to use for example fdisk and create new partitions using the same data like for the original partition-table.

Markus

Markus


All times are GMT -5. The time now is 06:14 AM.