Ubuntu won't change itself to first boot option in UEFI Boot Order after installing Ubuntu22.04

Bug #1968145 reported by Jimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Description:
 Ubuntu won't change itself to first boot option in UEFI Boot Order after installing Ubuntu22.04.
Produce Steps:
 1.install Ubuntu 22.04 on NVMe SSD
 2.reboot and boot into bios,check the boot order.
 Current behaviors:
  After install os,it will create "ubuntu" boot option in UEFI. But now it always behind the "Network" option and as second option not the first option.
 Expected behaviros:
  "Ubuntu" option is the first boot option.

Configuration:
 OS:jammy-live-server20220405-amd64.iso
 CPU:AMD EPYC 7702 64-Core Processor
 UEFI Version:D8E119A
 BMC Version:D8BT19I
 SSD:Intel 1.60TB NVMe SSD

Tags: bot-comment
Revision history for this message
Jimmy (sujj5) wrote :

Does it work as design?

Revision history for this message
Jimmy (sujj5) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1968145/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Jimmy (sujj5)
affects: ubuntu → kernel-package (Ubuntu)
Jeff Lane  (bladernr)
affects: kernel-package (Ubuntu) → grub (Ubuntu)
Revision history for this message
Jeff Lane  (bladernr) wrote :

I'm pretty sure this is by design... a few years ago we hit issues where grub was setting Ubuntu as the primary boot device in EFI automatically, overriding user settings. For MAAS (for example, as this is where we were most impacted), MAAS works better if Network is always the first boot option.

What would happen is that we'd install via MAAS, then the Ubuntu option would be injected and rewrite the EFI boot order and the machine was not able to be PXE booted after that when you wanted to release and re-deploy, because from that point onwards the machine would always boot from HDD first due to the location of the Ubuntu option.

So I think this is probably by design, to avoid situations where installing ubuntu overrides user defined boot order. The presumption is that if you set PXE to be the first boot device in BIOS, you probably intend to always boot the machine via PXE, and if you want to vary that, you'll trigger the boot menu to choose a temporary alternative.

Conversely, if you plan to mostly boot from ISO, you wouldn't want to waste your time waiting on PXE to time out, so you'd have set the boot order so that HDD/SSD comes first anyway.

At least, that is my recollection, and as I said, I do think this is intended behaviour, but lets see if someone who manages Grub can comment on this. I'll escalate it to that team for visibility.

Revision history for this message
Steve Langasek (vorlon) wrote :

This looks like a firmware issue. If you install Ubuntu from our install images, it WILL register itself with the firmware as the first boot option. It never registers itself as the second option. If you are seeing it as the second option, this is because your firmware is overriding the setting and introducing another boot option that is invisible to Ubuntu from the firmware variables.

To change your system to not boot first from network, you will need to go into your firmware settings and disable it.

You can verify this by checking the output of the command 'efibootmgr -v' both after the install has completed but before you've rebooted, and after you've rebooted into the newly-installed system.

affects: grub (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Jimmy (sujj5) wrote :
Revision history for this message
Jimmy (sujj5) wrote :

I can reproduce it on Ubuntu 20.04.4

Revision history for this message
Jimmy (sujj5) wrote :

I also test it with rhel9.0 and it not be reproduced in RHEL9.0.

Revision history for this message
Jimmy (sujj5) wrote :

Hi,
According to Comments 6&7&8, it seems Ubuntu not change boot order.
Could you help to investigate and explain it?
Thanks.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Please run dpkg-reconfigure grub-efi-amd64-signed followed by efibootmgr and attach output.

Revision history for this message
Jimmy (sujj5) wrote :

Hi,
 root@len:~# efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0003,0000,0001,0002,0004
Boot0000* ubuntu
Boot0001* CD/DVD Rom
Boot0002* Hard Disk
Boot0003* Network
Boot0004* USB Storage
root@len:~# dpkg-reconfigure grub-efi-amd64-signed
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Installation finished. No error reported.
root@len:~# efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0001,0002,0004
Boot0000* ubuntu
Boot0001* CD/DVD Rom
Boot0002* Hard Disk
Boot0003* Network
Boot0004* USB Storage
root@len:~#

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.