Thursday, November 12, 2009

Grub error 15 on a 2 HDD box[solved]

Do you get Error 15(file not found) while loading Grub on your 2 HDD box?
Then here is the solution.

Grub Error 15 is commonly found when Grub is unable to find vmlinuz(the kernel image). In such a case just boot from a live cd and do the following

$sudo grub

this command enters grub,once that is done,enter

find /boot/grub/stage1

This will return the location of the root ex: (hd0,4)

Now you need to edit the Grub's menu.lst
if running through a Ubuntu Live cd then the command:

$sudo gedit /media/disk/boot/grub/menu.lst

menu.lst may look like this:

title Ubuntu 9.04, kernel 2.6.28-11-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda5 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic


if this is the case then ,just replace the (hdx,y) with device UUID.

to get the UUID:

$blkid

will give you the uuid of all the partitions on the disk.

search for the partition with ext3/4 and copy it(in my case (hd0,4) /dev/sda5 uuid=.....)

now replace the line in menu.lst where (hdx,y) appears

ex: root (hd0,4)

the entry in menu.lst should look like this after the edit

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid ee9fd0b7-29c5-42a4-a606-9342fae9523a
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=ee9fd0b7-29c5-42a4-a606-9342fae9523a ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic


observe that even the line with 'kernel' has been replaced with the respective uuid.

now save it and reboot.

and voila! tell me what happens!