[Solved] Help to understand how to change boot order with efibootmgr

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

[Solved] Help to understand how to change boot order with efibootmgr

Post by newmint »

Hi all,

I have a question in relation how to use efibootmgr to change boot order. I have read some comments and searched on internet but could not figure out why changing bootorder does not work the way it is in the docos I read. May me I read wrong/obsolete doco?

Anyway, here is the example for dual boot after I run efibootmgr. I boot from Mint 20.1 USB.

1. So the issue is that Windows Boot Manager is before ubuntu and therefore Windows just starts instead of Mint Boot Menu

Code: Select all

mint@mint:~$ sudo efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 2001,0000,0001,0002,2002,2003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002* Ubuntu
Boot0003* EFI USB Device (USB     Flash Disk)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
2. To fix this issue I need to change boot order and in the doco i read i can use "sudo efibootmgr --bootorder" folowed by boot order so here is the command :

Code: Select all

sudo efibootmgr --bootorder 0001,0000,0002,2001,2002,2003
After execution command prints out new correct boot order but after restart nothing changes and it starts Windows. After i boot from usb and run efibootmgr it prints out the same order as in the p1. Basically, boot order has not changed.

3. However if I execute the following command to change boot order then everything works fine and after restart boot order has changed and Mint Boot Menu starts, etc...

Code: Select all

sudo efibootmgr --bootorder 0001,0000

So I am really confused. Why command in p2 does not work and then "short one" from p3 works fine.
What I read in doco on efibootmgr --bootorder should follow by complete list of all boot numbers.


As i mentioned everything fine on my system now i am just trying to understand how efibootmgr supposed to work or where can I read to find explanation to the described behaviour.

Thank you all a lot :)
Last edited by newmint on Fri Apr 09, 2021 2:00 am, edited 1 time in total.
deepakdeshp
Level 19
Level 19
Posts: 9160
Joined: Sun Aug 09, 2015 10:00 am

Re: Help to understand hot to change boot order with efibootmgr

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

Mint 20.1 Cinnamon 64 bit with AMD A8/7410 / 8GB
Mint 20.1 Cinnamon AMD Ryzen3500U/8gb
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

Re: Help to understand how to change boot order with efibootmgr

Post by newmint »

thank you for response and the link.

Yes, that is the doco i read and it does not work this way.
below is the example i run on my system but it did not change the boot order.
In this example below I on purpose wanted to set it to boot Windows boot Manager instead of ubuntu, but after restart the order was not changed and ubuntu booted.
Any pointer why it did not changed the order?
Thanks again

Code: Select all

mint@mint:~$ sudo efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 2001,0001,0000,0002,2002,2003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002* Ubuntu
Boot0003* EFI USB Device (USB     Flash Disk)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

mint@mint:~$ sudo efibootmgr -o 2001,0000,0001,0002,2002,2003
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 2001,0000,0001,0002,2002,2003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002* Ubuntu
Boot0003* EFI USB Device (USB     Flash Disk)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
mint@mint:~$ 
deepakdeshp
Level 19
Level 19
Posts: 9160
Joined: Sun Aug 09, 2015 10:00 am

Re: Help to understand how to change boot order with efibootmgr

Post by deepakdeshp »

Don't you get grub and can you not boot all the oss from grub?
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

Mint 20.1 Cinnamon 64 bit with AMD A8/7410 / 8GB
Mint 20.1 Cinnamon AMD Ryzen3500U/8gb
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

Re: Help to understand how to change boot order with efibootmgr

Post by newmint »

I have no issues on my system.

I do not understand why efibootmgr does not work as described in the doco and why it does not change boot order as in my example.

thank you again.
User avatar
Pierre
Level 20
Level 20
Posts: 11574
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Help to understand how to change boot order with efibootmgr

Post by Pierre »

that cli command didn't work on my HP g6 pavilion .. either.
:?
despite the cli giving the same feedback, that it had succeeded.
:roll:
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Reddog1
Level 4
Level 4
Posts: 307
Joined: Wed Jun 01, 2011 2:12 pm

Re: Help to understand how to change boot order with efibootmgr

Post by Reddog1 »

efibootmgr is a waste of space. I've never had a single instance where it worked. If the bios only allows changing of the boot manager via the bios, then that's what you are going to have to do. Your Linux installation needs to be first in the boot order so that grub can load the Windows boot manager. If Windows is first, then Windows will boot and you won't see grub and cannot load Linux.
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

Re: Help to understand how to change boot order with efibootmgr

Post by newmint »

Thank you Reddog1.

Yes, I understand the potential issues is the order of boot.

So if it is not efibootmgr then what to use to fix boot order, any pointers on that?

Thank you and all.
linux-rox
Level 6
Level 6
Posts: 1200
Joined: Sun Jul 19, 2020 9:17 pm

Re: Help to understand how to change boot order with efibootmgr

Post by linux-rox »

newmint wrote:
Mon Apr 05, 2021 3:31 am
... i am just trying to understand how efibootmgr supposed to work
I think you have asked a very good question. For what it's worth, efibootmgr generally works as described, but there can be issues with certain computers (because their firmware doesn't comply precisely with the UEFI specifications) and/or certain configurations.

I suspect the latter was the problem here. Notice that several of the NVRAM entries are for devices. Perhaps efibootmgr was confused. Was one or more of those not attached when you ran the command? Just a hunch, but a possible solution to the mystery.
deepakdeshp
Level 19
Level 19
Posts: 9160
Joined: Sun Aug 09, 2015 10:00 am

Re: Help to understand how to change boot order with efibootmgr

Post by deepakdeshp »

I suspect that efibootmgr will not work on a purely Bios system. The version should be latest. I couldn't get how to install the latest version.https://zoomadmin.com/HowToInstall/Ubun ... efibootmgr
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

Mint 20.1 Cinnamon 64 bit with AMD A8/7410 / 8GB
Mint 20.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
JOPETA
Level 17
Level 17
Posts: 7674
Joined: Thu Nov 20, 2014 6:10 am
Location: En un lugar de cuyo nombre no quiero acordarme

Re: Help to understand how to change boot order with efibootmgr

Post by JOPETA »

newmint wrote:
Tue Apr 06, 2021 6:50 am
So if it is not efibootmgr then what to use to fix boot order, any pointers on that?
You can try BCD or EASYUEFI in Windows, Refind,.. but, as linux-ox said if the problem is that UEFI implementation, w/o warrants.

Also, depending on your PC brand&model (you didn't say) or UEFI maker you can (or not) change certain UEFI settings in your UEFI/BIOS Setup. If no Ubuntu option is offered there (boot order) you can hardly put in first place..
Ni cola de león ni cabeza de ratón, prefiero ser diente de ajo.(Javier Krahe)
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

Re: Help to understand how to change boot order with efibootmgr

Post by newmint »

Thank you all again!

I will try to have a look at those link you sent to me.
And I guess from your comments that mean there is no one single simple answer and have to live with that :)
I figured out how to fix boot order on my Sony viao but I was trying to understand "why" as I have not thought that efibootmgr might work differently on different hardware as well...
linux-rox
Level 6
Level 6
Posts: 1200
Joined: Sun Jul 19, 2020 9:17 pm

Re: Help to understand how to change boot order with efibootmgr

Post by linux-rox »

newmint wrote:
Thu Apr 08, 2021 6:39 am
... no one single simple answer ...
... is a perfect summary of the situation. For an overview of how complicated the problem, you could look at this explanation by Rod Smith, developer of the rEFInd boot manager Jopeta mentions. In a nutshell, UEFI was a good idea which, alas, hasn't been implemented well. And there's no simple way to fix it, as there's no central body with authority to enforce the specifications.
newmint
Level 1
Level 1
Posts: 21
Joined: Sat Mar 20, 2021 11:03 pm

Re: Help to understand how to change boot order with efibootmgr

Post by newmint »

thanks again,
and mark it solved, well, considering there is no other option on this one anyway ;)
Post Reply

Return to “Installation & Boot”