[unknown filesystem. grub rescue>] How to Re-install Grub due to: error ?

Asked by Mike

Due to a graphics card incompatibility issue I recently tried to disinstall Ubuntu 10.04 LTS and have now been left without access to WIndows XP which is the other OS which I have running on my Inspiron 1300. This is what I did:

I booted Ubuntu 10.04 LTS from my pen drive and accessed GParted to try and delete the partition allocated to Ubuntu 10.04.

As I wasn't able to delete de partition I reformated it to ntfs hoping that i would regain this space for Windows.

That hasn't happened.

When I boot I no longer get the option of choosing between Ubuntu 10.04 and WIndows XP, I get the following message:

error: unknown filesystem
gnub rescue>

I've tried refomatting the partiion to the file type I think it was, but have had no luck.

This is what I get on screen when I open GParted:

Partition FIle System SIze Used Unused Flags
/dev/sda1 ntfs 29.01GiB 21.83GiB 7.18GiB boot
- /dev/sda2 extended 8.25GiB
/dev/sda5 ext3 7.85GiB 272.12MiB 7.59GiB
unallocated unallocated 1.00MiB
/dev/sda6 linux-swap 409.00MiB

Partition /dev/sda5 is the one causing the trouble which I refomatted. I tried refomatting it to ext2 which didn't work and to ext3 which also hasn't worked.

Any ideas? Many thanks

Question information

English Edit question
Ubuntu grub Edit question
No assignee Edit question
Solved by:
Marc Stewart
Last query:
Last reply:
Revision history for this message
Best Marc Stewart (marc.stewart) said :

The step-by-step instructions for restoring GRUB with the live CD are on this page:
That covers just about every possibility; the actual process is only 2 or 3 lines long.

Revision history for this message
Mike (mike-envisiondd) said :

But how do you "boot into a live session"? and how do you mount a partition? and what if the Ubuntu partition is not showing?

Revision history for this message
Mike (mike-envisiondd) said :
Revision history for this message
Marc Stewart (marc.stewart) said :

You've already booted into a live session. That's what you were doing when you booted using the CD and selected "Try Ubuntu". A "live" OS, in this sense of the word, is one that can be used without installing (though it's not quite as fast as when it is installed).

When that's up and running, go to System > Administration > Disk Utility
In the left pane click on the hard disk option (something like "320 GB Hard Disk" though the size will obviously be different probably). That should show you a partition map of your hard drive in the right-hand pane.

Look for the first partition with a type of "ext4". This is probably your Ubuntu root partition. Click on it to select it. Among the options underneath should be "Mount Volume". Click that. Then look for:
Mount Point: Mounted at [SOME_RANDOM_MOUNT_POINT], which should be underlined. Clicking on that should open the partition in a file browser window. Verify that contains a directory named "boot". (If it doesn't, click Unmount Volume and try another partition.)

Once you've located and mounted the right partition, make note of the mount point (usually something like /media/0d104aff-ec8c-44c8-b811-92b993823444) and open a terminal (Applications > Accessories > Terminal)

Look for the line that matches your mount point. It should begin /dev/sdaX where X is a number that you can ignore; the letter "a" is the important bit. (If you have more than one hard drive in your PC it could be /dev/sdbX.)

Now type:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda
substituting the appropriate name for the root directory mount point (and /dev/sdb if you had two hard drives and your root partition turned out to be on the second one.)

If you get BIOS warnings try:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck

When that completes successfully you should be able to reboot without the CD in the drive.

According to the help page I mentioned, Super GRUB disk is for older versions of GRUB. Recent versions of Ubuntu use Grub2, so it won't work.

Revision history for this message
Mike (mike-envisiondd) said :

Thanks Marc Stewart, that solved my question.