Monday, August 25, 2008

Grub Error 17: Cannot mount selected partition ! --> The Solution!

I recently had the misfortune of having to re-install Windows XP on my dual-boot PC. After the Windows installation I repaired GRUB and tried booting into my Ubuntu Installation but had this error pop on to the screen :

Error 17: Cannot mount selected partition
Press any key to continue ...


This happens because sometimes Windows can do funny things with your computer without you knowing!!

Here's a way to make everything normal -

First, at the GRUB screen, press 'c' to get into the GRUB CLI.
At the CLI, type
find /vmlinuz

You will get an output similar to
(hdx,y)

Note x and y

Next, insert your LiveCD and boot from the CD

Open a terminal, mount your "root" ( / ) of your Linux installation somewhere
and open the file :
/boot/grub/menu.lst

with admin privileges (" sudo" if you are working with Ubuntu )

Go to the section where u see something similar to :

## ## End Default Options ##

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hdx1,y1)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=ef9d3ff9-0f14-4eab-879b-11c517ab26c1 ro splash quiet
initrd /boot/initrd.img-2.6.24-21-generic
quiet


Replace the x1,y1 with the x,y pair we just found above, save the file and you are done! :)

(Note : "title" can be different and depends on your distro. That is not the important part, the "root" part is! :) )

Now you can reboot your system and happily boot into your Linux installation :)

1 comment:

Anonymous said...

thanks.very helpful.