LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Partition table toast (https://www.linuxquestions.org/questions/linux-hardware-18/partition-table-toast-458587/)

locrian 06-26-2006 07:31 PM

Partition table toast
 
While installing MEPIS6 I made a terrible error - I sought help from the microsoft windows xp disk. Now my harddrive is toast.

Linux is on hda, while windows was on a FAT32 hdb. To make a long and silly story short, I tried to use windows to get hdb to boot striaght to windows, while having Grub on hda. Fixmbr killed hdb.

I think its just the partition table thats toast. Here's fdisk:

Disk /dev/hdb: 30.7 GB, 30735581184 bytes
255 heads, 63 sectors/track, 3736 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 3735 30001356 c W95 FAT32 (LBA)

In the past there was one primary partition on hdb, and a tiny hidden one on hdb I don't know much about.

Is there a way I can fix this without losing all that data?

Thanks in advance for your help. I'd like to tell the world I didn't kill my files installing linux. It's an ego thing! Doing so without spending $70 on partition magic would be mighty nice.

Kyle

CroMagnon 06-27-2006 02:35 AM

I am confused - you say FIXMBR messed up hdb, but the partition output from fdisk looks fine. What are the actual symptoms? If XP doesn't boot, did you try the FIXBOOT command?

mickyg 06-27-2006 03:10 AM

I'm also confused, what exactly happens when you boot your system? Do you get the Grub/Lilo bootloaders or the Windows XP bootloader?

Have you tried booting from a LiveCD to see if you can access your partitions?

P.S.
If you're after a cheap/free alternative to Partition Magic then try qtparted on Knoppix (I think it's actually on SimplyMEPIS too).

locrian 06-27-2006 07:57 AM

Well, while fdisk tells me the drive is good, chkdsk (from windows disk) tells me it has one or more unrepairable errors. Booting from the windows disk shows no files on the drive, and lists the wrong size for the drive. From linux the drive looks okay from fdisk, but "ls" shows nothing, and viewing through konqueror shows lots of junk files.

I have done fixboot and fixmbr, and I believe, after reading online, that I've done them correctly. However, I'm also certain fixmbr messed up the partition table.

I'm familiar with qtparted, but unfamiliar with how to use it to repair the partition table. Should I just repartition the drive?

Thank you both for your responses. I really appreciate any help I can get here!

CroMagnon 06-27-2006 02:52 PM

That does sound hosed... I doubt FIXMBR is the culprit though, as it doesn't even touch the partition table (it writes known bytes to the start of the MBR, leaving the partition table as-is). Has anything else changed on the system recently? Is it possible the BIOS access method for the drive wasn't LBA previously? Are there any errors relating to hdb or the IDE controller in your Linux system logs?

locrian 06-27-2006 07:09 PM

I don't know how to look and see if there are errors for the drive with linux. However, this happened with my only having logged onto linux maybe twice, which is one a different hd, and I never mounted the one that's corrupted. So i doubt there's much in the way of logs.

The ONLY thing that happened to that drive between when it worked and when it didn't:

1) I accidently installed GRUB on it
2) I tried to use the windows disk to undo that through the use of fixmbr

Now its fuggered.

Am I really out of luck? This seems so much like something that should be fixable.


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