Installation of Ubuntu 10.04

In the recent past I have installed a number of new releases of Ubuntu onto my development machine with no problems. Now, that I have decided to install a new version to my production machine, and explain in a blog just how easy this is, I immediately experience a glitch! Interestingly, the glitch isn’t with Ubuntu itself, rather it’s a problem with dual-booting into Windows. But, more on the details later. At least, the problem has the benefit of demonstrating how such issues can readily be solved by accessing information readily available on the Internet.

I downloaded Ubuntu 10.04 LTS as an ISO file, burned this to a CD-ROM, booted the resulting disk, and installed Ubuntu into an area of unallocated space on my hard drive. As usual, I answered the few questions regarding the desired set up, and the installation process went smoothly. The new version of Ubuntu loaded and ran just fine. The problems started when I looked at my options for dual-booting into Windows.

In particular, the GRUB2 menu listed my Vista partition, which I expected, but it also showed the Windows recovery partition on my hard disk, which I hadn’t seen before as a boot menu entry. The problem was that the Vista entry wouldn’t boot. The system took me to a screen with “System Recovery Options”. On the other hand, the entry labelled Windows Recovery Environment booted into Vista! Clearly, GRUB2 had confused the two Windows’ partitions and it was up to me to straighten things out.

The boot menu can be found in the file /boot/grub/grub.cfg. Inspection of this file in the gedit text editor quickly identified the problem. The two relevant menu entries were:

menuentry "Windows Vista (loader) (on /dev/sda1)" {
	insmod ntfs
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 86126bf0126be421
	chainloader +1
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" {
	insmod ntfs
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set a4ece7522c7981cf
	drivemap -s (hd0) ${root}
	chainloader +1

The problem is essentially related to the line set root='(hd0,1)’, where hd0 refers to the first hard disk in the system, and the subsequent 1 refers to the first partition. However, the first partition on the first hard disk is actually the Windows recovery partition. Vista is loaded on the second partition (hd0,2) of the disk (which in Windows is the C: drive). Note that this is the designator for the second menu entry which is why this latter item boots Vista.

Since I don’t use the recovery partition, the quick fix is to edit the boot file by changing the label on the second menu entry from “Windows Recovery Environment (loader)” to “Windows Vista (loader)” and deleting the first menu entry entirely.

Now, I glibly say “quick fix”. The file grub.cfg is clearly marked “# DO NOT EDIT THIS FILE”. Unfortunately, there is no further information as to how to change the file’s contents, so this is where the Internet comes in. Detailed instructions are available at: Menu Entries

The process is somewhat convoluted, requiring a series of terminal commands, and edits on a couple of files, in order to create a custom menu. However, carefully following the customization process allows the main menu to be successfully modified. So, now we have the best of all worlds – the ability to boot into Ubuntu 8.04, Ubuntu 10.04 and – yes – even Vista!

This entry was posted in Installation. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s