Load kernel and boot your system with GRUB2

I installed a new verison of Ubuntu Lucid Lynx the other day on a brand new formatted hard drive.  Installation went smoothly as you’d expect, but when I rebooted the server I was stuck on GRUB menu (my worst nightmare).  The server just wouldn’t load the operating system and typing ‘boot’ in GRUB gave me a No Loded Kernel error.

I tried re-installing, re-formating, various GRUB commands and nothing worked.  Thankfully, I found a solution on a lengthy GRUB2 documentation page.  In summary, I had to tell GRUB to boot from the most recent kernel and this is the way to do it:

set root=(hdX,Y)
linux /vmlinuz root=/dev/sdXY ro
initrd /initrd.img

Remember to specify correct X,Y values. For example, GRUB counts the first hard drive as 0, the first partition as 1. If your Ubuntu system is on sda1, enter set root=(hd0,1). You can list your partitions in GRUB2 using “ls” command.


  • Tom

    Ty for share, but please enter the path and the name of file you edited :)

  • Marko Tomic

    Hi Tom. I wrote this back in 2010 and from memory I didn’t edit any files. You would enter the commands from this post directly in grub prompt. This happens when GRUB fails to find usable grub.cfg for some reason.

  • Tito Velez

    Can someone help me that code is not working for me and Ubuntu will not boot. I need help I am new to this.

  • ltony

    Thank U so much ! Saved my day =D