~juliank/grub/+git/ubuntu:resilient-boot

Last commit made on 2020-04-09
Get this branch:
git clone -b resilient-boot https://git.launchpad.net/~juliank/grub/+git/ubuntu
Only Julian Andres Klode can upload to this branch. If you are Julian Andres Klode please log in for upload directions.

Branch merges

Branch information

Name:
resilient-boot
Repository:
lp:~juliank/grub/+git/ubuntu

Recent commits

3398159... by Julian Andres Klode

Run debconf-updatepo

94afb5d... by Julian Andres Klode

Rename multi_ functions without multi_ prefix

Give them more meaningful names

88a3dea... by Julian Andres Klode

postinst.in: Adjust version check for /boot/efi transition code

331e9dd... by Julian Andres Klode

Add comment to postinst.in

4189361... by Julian Andres Klode

Use grub-efi/ instead of grub2/efi_

beb98c5... by Julian Andres Klode

merge patched-resilient-boot into resilient-boot

71f6ca0... by Julian Andres Klode

grub-multi-install: Re-ask if /boot/efi is an unknown device

If /boot/efi is not configured as an ESP in the grub database,
reprompt the user, so that changing the location of /boot/efi
in fstab (w/o deleting the old partition) is not silently ignored.

45fef0a... by Julian Andres Klode

Support installing to multiple ESPs

grub-multi-install runs grub-install over all (configured)
ESPs. The logic for configuration is copied from grub-pc,
including handling ESPs that have become absent.

On upgrade, we import the existing mounted /boot/efi into
our debconf setting, so as to avoid asking everyone this
question when they upgrade an existing installation.

On install, we want to do the same thing, to keep existing
installers working. However, we only do that if the option
is not yet set, thus allowing preseeding of the option, so
installers can configure multiple ESPs.

The ESP detection is copied from os-prober, with
ID_PART_ENTRY_SCHEME = msdos changed to dos, as that's
what udevadm info returns; os-prober has a wrapper around
udevadm info called udevinfo that probably changes that
to msdos to support older versions or whatever.

Avoid grub-mkdevicemap here, we do not need to (or can)
group the partitions by disk.

Set _UBUNTU_ALTERNATIVE_ESPS, the grub-installer will be
modified to read that variable and handle other ESPs it
is not currently working on.

647293d... by Julian Andres Klode

postinst: Check for /boot/grub/$target/core.efi instead of /boot/efi/EFI/$bootloader_id

We're switching to a model where we can have multiple ESPs, so
checking content of the ESP is not going to work reliably.

8c0357b... by Julian Andres Klode

UBUNTU: efivar: Correctly handle boot order of multiple ESPs

Modify the code to insert the ESP mounted to /boot/efi (the *primary*
ESP) as the first item, but any other ESP after any other of _our_
ESPs.

So assume we have three ESPs A, B, C (_ours_), and three other
boot entries X, Y, Z. We configure A, B, and C in that order,
though some might already be in it, some examples:

 XYZ -> ABCXYZ (A is added to front, B after it, C after B)
 BXCYZ -> ABXCYZ (A is added to front, B and C remain unchanged)
 AXCYZ -> AXCBYZ (the previously unconfigured ESP B is added after last ESP C)

Doing this requires us passing the path of the ESP directory down to
the code doing the install, so it can then check whether it was the
primary ESP - that is, mounted to /boot/efi - or not.

Patch-Name: ubuntu-resilient-boot-boot-order.patch