[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Preserving boot order in EFI partition

Hello Experts.

When I boot from live Ubuntu 16 USB and set a boot order

ubuntu@ubuntu:~$ sudo efibootmgr -o 0000,0001,0002,2001,2002,2003

and reboot a PC, then the first entry is lost.
How to preserve the first entry which referes to Ubuntu on HD?

Here is the "damaged" order after reboot:

ubuntu@ubuntu:~$ sudo efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0001,0002,2001,2002,2003
Boot0000* ubuntu
Boot0001* Windows Boot Manager
Boot0002* Linpus lite
Boot0003* Unknown Device:
Boot0004* Unknown Device:
Boot0005* Unknown Device:
Boot0006* Unknown Device:
Boot0007* Unknown Device:
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
ubuntu@ubuntu:~$ sudo efibootmgr -v

More details are in question:
https://www.experts-exchange.com/questions/28979795/Dual-boot-of-Ubuntu-16-on-Acer-E-15-E5-575G.html

On top of this, efibootmgr does not work properly
   ubuntu@ubuntu:~$ sudo efibootmgr -t 10  
   efibootmgr: Could not set Timeout: Invalid argument

It can be a vendor (Acer)  problem or broken version of
ubuntu@ubuntu:~$ sudo efibootmgr --version
version 0.12

I recall that version 0.24 is good.

Thank you.
0
Bitlab
Asked:
Bitlab
  • 5
  • 3
2 Solutions
 
marsiliesCommented:
From what I can tell, UEFI is limited to 5 entries in boot order. So you're losing the first one because you're trying to add 6.

https://linux.dell.com/files/efibootmgr/efibootmgr-0.5.4/efibootmgr.txt
https://linux.die.net/man/8/efibootmgr
https://wiki.mageia.org/en/Efibootmgr
0
 
BitlabAuthor Commented:
Thank you.

But making number of options less does not work:
if I set
ubuntu@ubuntu:~$ sudo efibootmgr -o 0000,0001,,2001,2002

and reboot there is still one menu-option when clicking F12 at boot, the option:
Windows Boot Manager.

Moreover, when to boot to Live Ubuntu USB, the boot options are returned to
previous 5-options case:

ubuntu@ubuntu:~$ sudo efibootmgr -o 0000,0001,0002,2001,2002,2003

like something erased a desired 0000 option.

Moreover, why setting -t brings invalid argument?
0
 
marsiliesCommented:
BootOrder isn't a boot selection menu, it's a list of the order the UEFI tries automatically for boot. That's why the options are limited. The list of entries after BootOrder is the list that should be shown when selecting a boot option, which the timeout is necessary to do.

Are you sure your PC is set for UEFI boot? This is an Acer E5-575G-76YK laptop, right? It's also possible that model laptop does not support all UEFI boot features.

It sounds like you might need a different boot manager, so you can pic the OS you want at every boot from a list. You probably want to mess with either GRUB2 in Ubuntu, or BCD in Windows:
http://www.howtogeek.com/196520/grub2-101-how-to-access-and-use-your-linux-distributions-boot-loader/
https://www.boyans.net/
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BitlabAuthor Commented:
Thank you.

Is there something less scaring than boyans.net ?
They do scare by offering "Windows Drivers update". Windows does not need drivers update, it does it nearly every day or weak.
This offer sounds like malware or bloatware. Why just not to install this visual too? And where is the link to this visual tool? All the links lead to "Drivers update".

I also tried
EasyUEFI_Free.exe
but it apparently does not see ubuntu partition loader.

Thank you.
0
 
BitlabAuthor Commented:
PS. Correction.
Yes, I found the link to VisualBCD.msi

But, why just command line bcd cannot help? What's the benefit of using VisualBCD ?
Then command line gives the following info: it says there is a 30 seconds timeout of running
Windows Boot Manager as a shim. Why there is no such delay ? The boot sequence goes instantly.

C:\Windows\system32>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\ubuntu\shimx64.efi
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {43c23f66-6bc7-11e6-b740-54ab3ac2c2b9}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.efi
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {43c23f6f-6bc7-11e6-b740-54ab3ac2c2b9}
recoveryenabled         Yes
isolatedcontext         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {43c23f66-6bc7-11e6-b740-54ab3ac2c2b9}
nx                      OptIn
bootmenupolicy          Standard

C:\Windows\system32>

Thank you.
0
 
marsiliesCommented:
You can use bcdedit, but I tend to prefer to recommend a GUI, especially for novices.

The booting is instant because there's only one boot entry in BCD, the one for Windows 10. The timeout could be any amount and BCD ignores it until there's 2 or more boot entries to choose from.
0
 
BitlabAuthor Commented:
Solution final step was aka:

...Power on PC
......F2 to go to EFI screen
.........Enable security
.........Enable Security password
.........Go to tab Security
............Select an UEFI file as trusted
...............Single Security tab appears
...................<EFI>
.......................\EFI\ubuntu\shimx64.efi
...........................give it a name: ShimUbuntu and confirm
...Reboot
...This enables ShimUbuntu in F12 menu

Ubuntu dual boots. Time will tell how stable this architecture will work.

Credit belongs to:
...http://askubuntu.com/questions/627416/acer-aspire-e15-will-not-dual-boot                        
......https://forum.ubuntuusers.de/topic/efi-dualboot-mit-acer-aspire-es-15-geht-nicht/
0
 
BitlabAuthor Commented:
Other comments did not expose the problem.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now