Windows 8 changes boot order

6

8

I installed Windows 8 and Ubuntu 12.10 on a 3TB GPT disk in UEFI mode.

Both can boot up OK.

Both operating systems created their ntries in the UEFI boot menu, there's an "ubuntu" and a "Windows 8" entry.

The boot order can be altered in the motherboard's UEFI setup.

I'd like to boot "ubuntu" first, because I set up GRUB 2 to be able to boot both systems.

But whenever I boot Windows 8, it changes the boot order so that it boots up first.

How can I prevent this?

Thanks a lot.

-- UPDATE --

I learned that bcdedit.exe can be used to manipulate the Boot Configuration Data in windows.

This is important because Windows synchronizes the BCD with the boot NVRAM, that stores the boot order.

Every time the {fwbootmgr} entry in the BCD is touched, the NVRAM is overwritten.

I modified this entry to load GRUB 2 first, and it did. However, after booting Windows 8, both the NVRAM and the {fwbootmgr} in the BCD reverted to the original order, that is, to boot Windows 8 first.

I'm really puzzled by this.

-- UPDATE 2 --

I managed to kinda fix the problem by creating a startup script at the group policy editor in Windows. The startup script issues a "bcdedit /set {fwbootmgr} DEFAULT {appropriate UUID}" command. This is BIG hack, and definitely NOT the soulution I want. I'd like Windows to feel OK at the second place after GRUB in the NVRAM.

So how can I do that?

netom

Posted 2012-12-30T13:50:19.340

Reputation: 253

Answers

5

A Microsoft representative answered my question on their official forum. They said that this is indeed the normal behaviour.

I solved the problem by running a .bat file at every system startup. The file does this:

bcdedit /set {fwbootmgr} DEFAULT {appropriate UUID}

Where "appropriate UUID" is the UUID in GRUB, and can be read from the list that "bcedit /enum firmware".

The bat files can be edited by opening the group policy editor (look it up in metro).

I wrote an article on the dual-boot issue at: http://tlfabian.blogspot.hu/2013/01/converting-dual-boot-mbr-partitioned.html

netom

Posted 2012-12-30T13:50:19.340

Reputation: 253

3"Normal behaviour?", seriously? – RogUE – 2015-07-05T12:44:22.333

Yes. My reaction was similar. – netom – 2015-07-08T08:21:38.607

1

No promises, but try this in Windows:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

If you haven't disabled Secure Boot, you'll need to change grubx64.efi to shim.efi.

If that doesn't work, complain to Microsoft, or remove it from dual-boot status and run it in a virtual machine.

Rod Smith

Posted 2012-12-30T13:50:19.340

Reputation: 18 427

Thanks Rod, I'll try this soon. I don't use secure boot, so this won't be a problem. Unfortunately I can't put Windows in a VM. I play hardware-demanding games on it, and it would run slowly in a VM if at all. I also don't want to 'box' the Linux install either. – netom – 2013-01-02T08:23:14.873