Solved

Preserving boot order in EFI partition

Posted on 2016-10-30
8
117 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
  • 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Issues cloning my HDD to SSD 12 92
Cannot take ownership of a folder 8 47
how to copy files based on a file to a locaiton 12 22
open links in firefox browser 2 12
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
Fine Tune your automatic Updates for Ubuntu / Debian
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

821 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