Ubuntu – Change boot order using efibootmgr

14.04dual-bootuefi

I recently installed Ubuntu 14.04 (First time linux user) on my HP Envy and have been trying to get the dual boot to work. I've looked around and have tried running the boot repair (here are the results) but it still says the boot files are far from the start of the disk. I also ran the efibootmgr and have this:

BootCurrent: 0000 
Timeout: 0 seconds
BootOrder: 3002,3000,3001,2001,2002,2003
Boot0000* ubuntu    HD(2,c8800,82000,a0d91f49-899b-46ac-8863-35f2d16774c4)File(\EFI\ubuntu\shimx64.efi)
Boot0001* Ubuntu    HD(2,c8800,82000,a0d91f49-899b-46ac-8863-35f2d16774c4)File(\EFI\ubuntu\grubx64.efi)RC
Boot0002* Windows Boot Manager  HD(2,c8800,82000,a0d91f49-899b-46ac-8863-35f2d16774c4)File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot2001* USB Drive (UEFI)  RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)  RC
Boot3000* Internal Hard Disk or Solid State Disk    RC
Boot3001* Internal Hard Disk or Solid State Disk    RC
Boot3002* Internal Hard Disk or Solid State Disk    RC
Boot3003* Internal Hard Disk or Solid State Disk    RC
Boot3004* Internal Hard Disk or Solid State Disk    RC
Boot3005* Internal Hard Disk or Solid State Disk    RC
Boot3006* Internal Hard Disk or Solid State Disk    RC
Boot3007* Internal Hard Disk or Solid State Disk    RC
Boot3008* Internal Hard Disk or Solid State Disk    RC
Boot3009* Internal Hard Disk or Solid State Disk    RC
Boot300A* Internal Hard Disk or Solid State Disk    RC

Which by the looks of it looks very messy and is not putting the efi files at the start.
Any suggestions as to how I should go about this issue?

Thanks.

Best Answer

  • First, a complaint that boot files are far from the start of the disk is irrelevant on an EFI-booting computer. There are limits under BIOS (which vary depending on how old the BIOS is), but even under a (modern) BIOS, your 750GB disk should pose no problems.

    Second, you can change the BootOrder variable with efibootmgr's -o option, as in:

    sudo efibootmgr -o 0,1,2
    

    This command will set the two ubuntu instances first, followed by the Windows Boot Manager entry. That should do the trick. Unfortunately, some EFIs are buggy, and "forget" the BootOrder entry or otherwise misbehave. If you have problems, I recommend trying the following command in a Windows Administrator Command Prompt window:

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

    (If you've disabled Secure Boot, you can replace shimx64.efi with grubx64.efi, although either should work with Secure Boot disabled.)

    If that fails, then your firmware is probably defective. There may be an update available from HP. If not, or if it doesn't help, and if you're within the return period for your computer, return it for a refund and get something that's not broken. If you can't do that, then you're into the territory of really ugly workarounds, like renaming GRUB so that it pretends to be the Windows boot loader. See here for some information on that topic, albeit written specifically for rEFInd. The basic principles apply to anything, though.

  • Related Question