Mythbusters – UEFI and Linux (Part 2)

Following up on my earlier post on UEFI and Linux, I got access to an identical system to the one with the original problem (an HP S5-1110) this week to do some install testing with various scenarios:

1) When I run through the standard install process with the Kubuntu 11.10 amd64 CD, I get exactly the same problem as James: I end up with a machine that has Kubuntu installed on a partition, but will still only boot into Windows. (I also get an explicit error message during the install saying “The ‘grub-efi’ package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.”)

2) Installing from the Kubuntu CD and wiping the HD has the same problem as (1), and the same error message.

3) Installing from the Ubuntu 11.10 amd64 CD into the same dual-boot configuration as (1) also won’t boot the Ubuntu partition, but it gives no explicit error message about the grub install failure.

4) When I install from the Ubuntu 11.10 amd64 CD and completely wipe the HD and replace it with Ubuntu, the install works perfectly, and the machine boots into Ubuntu afterwards with no problems. I can also install the ‘kubuntu-desktop’ package on the working system, and get a working Kubuntu desktop. This tells me that we’re not dealing with a UEFI or hardware compatibility issue here, just an issue with partitioning and the bootloader. Which is what James and I suspected last week, but it’s nice to have explicit confirmation (without wiping his friend’s machine).

5) Back to the Windows/Ubuntu dual-boot scenario in 3. Installing EasyBCD doesn’t quite work. It does give me a prompt in the “Windows Boot Manager” to choose between Windows and Ubuntu, but when I choose Ubuntu it just takes me to the grub prompt. That’s progress anyway. At the grub prompt, I type:

grub> root (hd0, 4)
grub> kernel /boot/vmlinuz-3.0.0-12-generic root=/dev/sda5
grub> initrd /boot/initrd.img-3.0.0-12-generic
grub> boot

And, it boots fine from the Ubuntu partition.

That’s all the time I had so far. A few observations about the system as it shipped from the factory. Windows is booting using a custom bootloader, the Windows Boot Manager which bypasses UEFI. In the dual-boot configuration that doesn’t work, the UEFI “BIOS” configuration and the efibootmgr command-line utility both recognize that the machine has a UEFI boot option for “ubuntu”, but choosing that during startup from the boot options still diverts straight to Windows. The machine didn’t ship with GPT partitions (which are one of the advantages of UEFI), instead it shipped with an old-fashioned MBR partition scheme (limited to 4 physical partitions). The working Ubuntu configuration (total machine wipe) does set up proper GPT partitions.

One thought on “Mythbusters – UEFI and Linux (Part 2)

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