[Bug 1714090] Re: grub2 upgrade doesn't preserve current boot order.

Blake Rouse blake.rouse at canonical.com
Thu Aug 31 19:12:17 UTC 2017


Comment I made on https://bugs.launchpad.net/maas/+bug/1642298. Was
requested to direct it here.

I think this is more of a GRUB issue overall instead of a MAAS issue
directly. True it affects MAAS and we can do the debconf selections to
work around this issue but overall for quality of Ubuntu I do not
believe this is the proper fix.

I will give an example without MAAS.

1. First the user installs Ubuntu on a partition on their local disk, EFI is updated so Ubuntu can boot.
2. Second the user installs Windows on another partition. EFI is updates so Windows can boot and its first.
3. User reboots into Ubuntu, runs apt-get, and grub updates changing the boot order so now that Ubuntu boots first.
4. User reboots their machine and Ubuntu boots but the user expected Windows to boot.

Overall this is a bad experience to the user.

I think the grub code should be smart about this:

First check if the grub.efi loader already exists in efibootmgr. If it
does not exists add it to the loader and set it to boot first. If it
does exist record its current place in the boot order, update the loader
and reset the boot order to its previous location.

That change would fix this for any user that uses Ubuntu as well as MAAS
users.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1714090

Title:
  grub2 upgrade doesn't preserve current boot order.

Status in grub2 package in Ubuntu:
  New

Bug description:
  This is a follow up discussion from #1642298 and filing this bug to
  keep a record.

  On a fresh Ubuntu install, grub2 overwrites the NVRAM and updates to
  boot order to have Ubuntu as the first boot device. This affects
  situations in which PXE had been set the first boot device in the boot
  order as it would overwrite it.

  However, every single time grub2 package upgrades, it will overwrite
  the NVRAM and completely override the boot order again. For example,
  consider that ubuntu is first in the boot order.

  efibootmgr -v
  BootCurrent: 0000
  Timeout: 2 seconds
  BootOrder: 0000,0001
  Boot0000* ubuntu
  Boot0001  PCI LAN

  But the administrator changed Network to be the first in the boot
  order.

  efibootmgr -v
  BootCurrent: 0001
  Timeout: 2 seconds
  BootOrder: 0001,0000
  Boot0001* PCI LAN
  Boot0000  ubuntu

  After a package upgrade, grub will overwrite the NVRAM and change this
  back to:

  
  efibootmgr -v
  BootCurrent: 0000
  Timeout: 2 seconds
  BootOrder: 0000,0001
  Boot0000* ubuntu
  Boot0001  PCI LAN

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1714090/+subscriptions



More information about the foundations-bugs mailing list