Dual Boot With Windows 8.1, UEFI

Home » CentOS » Dual Boot With Windows 8.1, UEFI
CentOS 2 Comments

(apologies for the length – there are questions at the end…)

I’ve been running Linux for 20 years, and done a lot of dual-boots. I know that’s old-school now, but I run Linux 95% of the time yet don’t want to lose a Windows system I’ve paid for – but I’ve never tried removing it from a system and reinstalling the same licenced copy inside a virtual machine.

I bought a new laptop back in April this year, after trying to check online for Linux certification to match what was in the local stores. There’s so many models and variants that’s almost impossible, but I found various “HP Pavilion 14” in www.ubuntu.com/certification and a couple of “HP EliteBook” in hardware.redhat.com/laptop. So I bought an “HP Pavilion 14-n228ca TouchSmart Notebook”, which came with Windows 8.1 installed.

So I start off doing what I’ve done on previous occasions – get into the BIOS, change the boot order, boot a CentOS 6 installation CD as used on my desktop, go into rescue mode and look at the partitions. Normally I’d use fdisk, but that says it doesn’t understand GPT and I should use parted. There’s 5 partitions, so I use resizefs to shrink the main NTFS
data partition, then delete the partition and recreate it shorter at the same start location. Then reboot the CD into install mode, create a Linux partition in the free space, and install CentOS, which adds a choice of “Other” in grub.conf to boot Windows.

Then I boot CentOS and finish the install – a couple of glitches; it needs a kernel parameter “iommu=soft” to get the USB mouse to work
(“nommu_map_single overflow” messages), and it needs a firmware file rt3290.bin for the RT3290 WiFi chip to work (submitted bug 1133288).

Then I try to boot into Windows. From GRUB, I get a screen “windows boot manager” with an error message “file \Boot\BCD – missing or contains errors”.

The boot sequence is a bit weird compared to what I’m used to – this is my first machine with UEFI. The BIOS has a UEFI boot order and a legacy boot order, which has to be enabled. UEFI takes precedence. With legacy enabled, F9 gives a boot menu with
OS boot Manager
Boot from EFI file
Notebook hard drive
Internal CD/DVD ROM Drive
“Notebook hard drive” takes me to GRUB.
“EFI file” takes me walkabout on a Windows file system with folders like
“HP”, “Boot”, Windows” and what looks like hundreds of locale files –
maybe I can boot in Turkish.
“OS boot Manager” takes me to an HP/Windows system recovery screen with various options – continue, troubleshoot, turn off.
“continue” goes to a splash screen like “attempting to repair” which fails. “troubleshoot” has a command prompt option. That’s running Windows cmd.exe in one of the other partitions, mounted as X:
In that, I find commands “chkdsk”, “diskpart”, “bootrec”, “bcdedit” etc. To cut an even longer story short, I did something like:
X:\ diskpart diskpart> select disk 0
diskpart> select partition 4 (the NTFS system one)
diskpart> set id

2 thoughts on - Dual Boot With Windows 8.1, UEFI