Solved

Preserving boot order in EFI partition

Posted on 2016-10-30
8
93 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 19

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 19

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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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 19

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
open source backup solution 1 29
centos commands 6 54
"Video DataSource is Offline or not responding"  - why? 1 35
Problem to App source 6 41
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

831 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