?
Solved

Preserving boot order in EFI partition

Posted on 2016-10-30
8
Medium Priority
?
220 Views
Last Modified: 2016-11-11
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
Comment
Question by:Bitlab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 20

Expert Comment

by:marsilies
ID: 41866202
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
 
LVL 2

Author Comment

by:Bitlab
ID: 41866432
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
 
LVL 20

Expert Comment

by:marsilies
ID: 41866764
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!

 
LVL 2

Author Comment

by:Bitlab
ID: 41875740
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
 
LVL 2

Author Comment

by:Bitlab
ID: 41875741
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
 
LVL 20

Assisted Solution

by:marsilies
marsilies earned 2000 total points
ID: 41875787
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
 
LVL 2

Accepted Solution

by:
Bitlab earned 0 total points
ID: 41876264
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
 
LVL 2

Author Closing Comment

by:Bitlab
ID: 41883577
Other comments did not expose the problem.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question