[PLUG] grub and fdisk problems mean what?

Piet van Weel pmvw at outwardfocus.net
Mon Sep 25 11:08:11 UTC 2006


Interesting problem. Judging from what you are seeing and have told us I 
hope your backups are in order. *Just in case*

The superblock probably got corrupted, but have faith all is not lost. *yet*

To see how to fix this we need to take the view that your hard drive is 
like a library. Each spot on your hard drive is like a book on the shelf 
in this library.  Fortunately for the library it has several areas; 
unfortunately, they are cryptically named hda1, hda2, and hda3. Down at 
the front reference desk, the superblock, there is a reference area 
telling you which area to look in.

In your case someone erased or altered your reference area!! The books 
are still there, and so are the areas. So we need to change it back to 
what it was!!

You mentioned in your e-mail that there were supposed to be three 
partitions on your system.
  hda1 is 15 Gig (ext2)
  hda2 is 10 Gig (fat-32)
  hda3 is 15 Gig (ext2)

So in order to fix your reference area, I would boot with a live CD. 
This will enable you to alter your boot record without having the hard 
drive being the primary boot device.

Then I would bring up fdisk and delete hda1. After that I would create a 
new partition hda1 of 15 gigs, hda2 at 10 gigs, and hda3 at 15 gigs. 
Then I would change the types on those three partitions to match their 
respective formats. Remember to set the boot flag and write it to disk. 
Then quit out of fdisk.

Because you didn't boot with the hard drive you can go directly to 
mounting the hard drive without a reboot. :) At this point I would go 
through and mount hda1 and run a e2fsck on it.

* WARNING * WARNING *
Only run it to scan the partition, not to fix the partition. Once it 
gets the ability to write to the partition, it has the potential to ruin 
other data if the partition information was not correct.

If everything you said about the hard drive allocation was correct, it 
should come back like a champ. :) Of course once it is recovered and 
you're assured that all three partitions are good-to-go; then I would 
definitely make a backup of your hard drive.

Personally, I have done this method before and it worked. *thankfully*

I would be interested in hearing what the rest of PLUG has to say about 
this method.

Piet







More information about the PLUG mailing list