Tuesday, October 27, 2009

How to make manual entry in Grub2 on Ubuntu.

I installed Ubuntu 9.10 Karmic Koala RC today on one partition using Desktop CD. This version of Ubuntu has Grub2 which is under development. The Grub did not detect Ubuntu 9.04 Jaunty Jackalope and I could not boot into it till I studied the problem and resolved it.

As suggested on Ubuntu Wiki I tried the following workaround:

$ sudo apt-get install --reinstall libdebian-installer4
$ sudo os-prober
$ sudo update-grub

The above commands detected the Jaunty installation and updated /boot/grub/grub.cfg file (equivalent of /boot/grub/menu.lst file) but put wrote wrong partition #.


After reading Grub2 documentation on Ubuntu Wiki I made following manual entry in the file /etc/grub.d/40_custom

menuentry "Ubuntu 9.04" {
set root=(hd0,8)
linux /vmlinuz-2.6.28-16-generic root=UUID=5fdb796b-96c0-49f1-80ec-9455e337625c ro xforcevesa quiet splash
initrd /initrd.img-2.6.28-16-generic
}

The partition numbering system has changed on Grub2 and (hd0,8) now means sda8 partition. After writing the above file I had to run:
$ sudo update-grub

to add the entry in grub.cfg file.

No comments:

Air India direct flight to San Fransisco has flown through China today.

 My sister in law left for San Fransisco by AI 173 flight which flows over North Pole. I tracked that flight on flightstats.com till it land...