Changing Boot Order on Dual Boot Windows 8 and Ubuntu (12472 Views)
Reply
Tutor
GarrieM
Posts: 7
Member Since: ‎03-11-2013
Message 1 of 9 (12,472 Views)

Changing Boot Order on Dual Boot Windows 8 and Ubuntu

Hi there,

Recently got a HP Pavilion g6 2213sa which came with Windows 8 (spit!) and this disgusting UEFI BIOS replacement (double spit!).

Anyway, I need to dual boot Ubuntu on my system, so I installed Ubuntu. Normally, on a non UEFI system, a "Grub" bootloader installed by Linux would take over the startup process, and allow you to choose between either Windows 8 or Ubuntu on startup.

 

However, on this computer, startup is just booting straight to Windows 8 despite the fact that Ubuntu and Grub IS installed.

Now, upon startup, if I press F9, then I get to change the boot-device on a one-time basis. I can either select "OS Boot Manager", which loads Windows 8, or "Ubuntu" which loads the Grub bootloader which allows me to select Windows 8 or Ubuntu.

However, when I press F10 to enter the Bios Setup with the intention of changing the boot order permanently, the Ubuntu option isn't there. Instead it has OS Manager, USB Disk, CD Rom, USB CD Rom and Network Card.

Thanks, HP for, the crappily designed BIOS.

Anyway, can anyone PLEASE provide me a way of changing the boot order so that GRUB is loaded first and NOT this crap Windows 8 rubbish (that I would happily bin if I didn't need it for work). 

Tutor
GarrieM
Posts: 7
Member Since: ‎03-11-2013
Message 2 of 9 (12,450 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

Looks like HP forums are just as useful as HP customer service and HP computers - i.e., not very useful at all.

Problem solved though. Took the piece of crap back for a full refund and won't be buying HP again.

Happy days.

Bye.

Honor Student
Amin_123456
Posts: 2
Member Since: ‎07-30-2013
Message 3 of 9 (11,982 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

[ Edited ]

Hi,

 

i have the same Problem :smileysad:

 

try

# efibootmgr -v

look for \EFI\Microsoft\Boot\bootmgfw.efi

then replace this file:

# cd /boot/efi/EFI/Microsoft/Boot/

# mv bootmgfw.efi bootmgfwB.efi

# cp ../../ubuntu/grubx64.efi bootmgfw.efi

u can still boot to windows, if u select the efi-File bootmgfwB.efi

u may need to disable secure boot

Honor Student
Amin_123456
Posts: 2
Member Since: ‎07-30-2013
Message 4 of 9 (11,980 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

u may need to disable secure boot

Top Student
SteveAlismi
Posts: 3
Member Since: ‎12-26-2013
Message 5 of 9 (11,173 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

Hi!

 

I've this problem too!

 

I tried to do as you told but, althought giving the command efibootmgr -v  "EFI\Microsoft\Boo\bootmgfw.efi" is displayed, I've no Microsoft folder in /boot/efi/EFI !!!

 

Any suggestion?

Top Student
GreatEmerald
Posts: 2
Member Since: ‎01-18-2014
Message 6 of 9 (9,225 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

There is the same problem in HP 2000 laptops (in my case specifically, HP 2000-2D22DX). I did some investigation using trial and error, and this is what I found out:

 

There is some sort of a "recovery feature" or so that on every boot sets the very first UEFI load option to point to one of the two locations, in this order:

  1. \EFI\Microsoft\Boot\bootmgfw.efi
  2. \EFI\Boot\bootx64.efi

This option is displayed as "OS boot Manager" (for the first path) and something akin to "UEFI partition" for the second path, completely ignoring the actual name given to it (when you look at the EFI variables through efibootmgr, you can see that what is displayed as "OS boot Manager" actually is set to the name "Windows Boot Manager"; why anyone would do such renaming is beyond me). If you try to change the boot order so that this slot isn't the first, the UEFI will overwrite the BootOrder variable on next boot and reset it to point to "OS boot Manager" anyway.

 

By default, both of the paths above contain the same Microsoft bootloader (if you check the md5sum of both, you'll see they match).

 

So, until HP releases an updated UEFI that allows turning this "feature" off or rearranging boot options through the F10 UEFI setup, this is what you can do to get dual boot with the least amount of hackiness:

  1. In Windows, mount the UEFI partition (mountvol S: /S mounts it as the S: drive) and copy the file \EFI\Microsoft\Boot\bootmgfw.efi to use some other name (for example, I copied it to "\EFI\Microsoft\Boot\bootmgfw.efi~", but you can change the name to anything else).
  2. In the Windows command prompt, update the Windows UEFI entry to point to the new name: bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi~ (adapt to your set name accordingly).
  3. Optionally, change the name of the Windows boot loader so that you would be certain that it points to the new file location: bcdedit /set {bootmgr} description "Fixed Windows path"
  4. Install the other OS. In my case the bootloader was installed into \EFI\opensuse\grubx64.efi.
  5. Delete the two files, \EFI\Microsoft\Boot\bootmgfw.efi and \EFI\Boot\bootx64.efi.
  6. Use efibootmgr to delete the "OS boot Manager" entry: sudo efibootmgr -b 0000 -B
  7. Set the new OS bootloader to be the default bootloader by using efibootmgr with the -o option. In my case, I had an entry called "opensuse" in slot Boot0001 and the updated path Windows entry in slot Boot0002, so I had to do sudo efibootmgr -o 0001,0002
  8. Update GRUB to point the Windows entry to your renamed file (you'll have to create a new file in /etc/grub.d and rerun grub-mkconfig).

And that's it, now the UEFI will boot GRUB by default (it won't regenerate the "OS boot Manager" entry since it won't be able to find either of the two hardcoded paths and will "fall back" to properly reading the BootOrder variable), and the F9 menu will still allow choosing to boot Windows directly.

 

Top Student
SteveAlismi
Posts: 3
Member Since: ‎12-26-2013
Message 7 of 9 (9,096 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

[ Edited ]

HI, I mounted the S: Voulme but when I try to open it i get: "you don't currently have permission to access this folder. Click Contnue to permanently get access to this folder."
If I Click "Contunue" I get: "You have been denied permission to access this folder. To gain access to this folder you will need to use the security tab". Unfortunately the security tab is not shown!! I tried to right click on S: and then on "Properties" but there are only "General" "Tools" "Hardware" "Sharing" and "Customise" tabs!

How can I access to S: ?

Top Student
GreatEmerald
Posts: 2
Member Since: ‎01-18-2014
Message 8 of 9 (9,072 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

[ Edited ]

You don't need access to the S: volume through Windows Explorer, you need to do everything from the command line (with administrator privileges, of course):

C: > S:

S: > cd \EFI\Microsoft\Boot\

S:\EFI\Microsoft\Boot\ > copy bootmgfw.efi windowsefifilename.efi

Student
Artificer
Posts: 1
Member Since: ‎03-18-2014
Message 9 of 9 (4,202 Views)

Re: Changing Boot Order on Dual Boot Windows 8 and Ubuntu

@GreatEmerald thank you! After struggling with this issue all day on my HP Envy, your instructions were the solution. I'll be researching the next laptop I buy more carefully, and will avoid ones with this "feature".

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation