LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to undo an fdisk? "No volume groups found" (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-undo-an-fdisk-no-volume-groups-found-507116/)

stickyc 12-03-2006 11:34 AM

How to undo an fdisk? "No volume groups found"
 
I was trying to repurpose a USB external disk with my Fedora FC4 machine. After setting up a partition table with fdisk, it said that I needed to reboot to apply the partition table (that should have set off the red sirens). After rebooting, I get the "No volume groups found" error and a kernel panic. I'm guessing I accidentally did an fdisk on /dev/hdc instead of /dev/sdc. Running fdisk now from a rescue CD reports /dev/hdc has type 83 partition, I seem to remember it was type 8e before (LVM?). The tiny bit of good news is that the partition should be the identical size as before, so I would think that all the data would still be intact...

Is there a way to re-do the partition table so I can see my old data again?

[update] I took a look at the HD with TestDisk - TestDisk reports there is a 100mb root partition and the rest of the disk is type 8e. Fedora's rescue CD still reports the one large type 83 partition...

chadl 12-03-2006 12:55 PM

As long as you did not run any programs to create a file system (ie mkfs) you should be able to restore everything by running fdisk again, and changing the partition table back to the way that it was. However, this does require that you know what the layout of your disk was before, as the old partition table has been overwritten.

fdisk does not touch your data, it only edits the part of the disk that tells your system what the layout of your disk is. Running mkfs is what actually changes the data portion of the disk.

stickyc 12-03-2006 01:02 PM

Thanks for the info... So I guess the next question is, do I just make the one big partition as fdisk sees it as an 83 and set it to 83? Or to I go with what TestDisk saw as the smaller boot partition then the large type 8e? This was a stock Fedora FC4 install.


All times are GMT -5. The time now is 09:43 AM.