~juliank/grub/+git/ubuntu:fix-esp-debconf-migration

Last commit made on 2020-04-14
Get this branch:
git clone -b fix-esp-debconf-migration 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:
fix-esp-debconf-migration
Repository:
lp:~juliank/grub/+git/ubuntu

Recent commits

40ed88e... by Julian Andres Klode

Display disk name and size again in ESP prompts

This was lost during cleanup of the branch, where the usage
of grub-mkdevicemap was dropped - original code created a
list of disks, and then iterated over those disks, and all
partitions, finding the ones matching belonging to the disk;
it did that because it was grouping partitions by disk - which
does not make sense here, as disks are not suitable install
devices by themselves.

Looking at postinst.in, it matched a parition to a disk by
doing:

  if [ "${partition_id#$disk_id-part}" != "$partition_id" ]; then

aka, it stripped the disk id and "-part" from the partition and
checked that this did something.

This means we can still easily get the device ($disk-id): we
just strip of "-part*" at the end.

cf1c830... by Julian Andres Klode

Move /boot/efi -> debconf migration into wrapper

We also run grub-multi-install from shim-signed and
grub-efi-amd64-signed, but duplicating the logic everywhere
would get slightly nasty.

So, let's rework this so that it does not rely on a version
we are upgrading from and instead checks if grub-efi/install_devices
is empty _AND_ we have not seen the question yet, which should
prompt in the same instances.

Then move the whole thing into grub-multi-install, so that
all postinst make use of it automatically.

LP: #1872077

5ac7a93... by Didier Roche-Tolomelli

releasing package grub2 version 2.04-1ubuntu25

6c5bbbb... by Didier Roche-Tolomelli

merge patched-ubuntu into ubuntu

4c7457b... by Didier Roche-Tolomelli

UBUNTU: Improve performance in bootmenu for zsys

In case there are a lot of zfs snapshots, we end up with a huge delay
when navigating grub (eg 80 seconds, displaying a black screen, for 100
system snapshots).
Reduce the grub.cfg file size by moving the entries in a single
function with parameter instead of duplicating each entry.
Ensure the user can still easily edit them easily by naming the
parameters.

Patch-Name: ubuntu-speed-zsys-history.patch

dcd3536... 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

9418925... by Julian Andres Klode

UBUNTU: efivar: Ignore alternative ESPs

This is an ugly hack to get resilient boot somewhat working:
We pass in a list of all ESPS in _UBUNTU_ALTERNATIVE_ESPS, and
then we ignore those when looking for entries to change/remove.

Patch-Name: ubuntu-resilient-boot-ignore-alternative-esps.patch

05c8349... by Chris Coulson

ubuntu: Update the linux boot protocol version check.

The EFI implementation of grub_cmd_linux makes use of xloadflags which was
introduced in to version 2.12 of the kernel's boot protocol, so update the
check accordingly.

3004e78... by Chris Coulson

ubuntu: Make the linux command in EFI grub always try EFI handover

The previous implementation only boots via the EFI handover protocol when
secure boot is enabled. This means that disabling secure boot breaks some
features that depend on the kernel being booted via the EFI handover entry
point, such as retrieval of the TCG event log.

Update the linux command to always attempt to defer to linuxefi in EFI grub
builds, regardless of whether secure boot is enabled or not. This also allows
a fallback to the non-EFI handover path on kernels that don't support it, but
only if secure boot is disabled.

b7ae50d... by Julian Andres Klode

smbios: Add a --linux argument to apply linux modalias-like filtering

Linux creates modalias strings by filtering out non-ASCII, space,
and colon characters. Provide an option that does the same filtering
so people can create a modalias string in GRUB, and then match their
modalias patterns against it.

Signed-off-by: Julian Andres Klode <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=87049f9716fb095aecb595fb8f45497bbbb1b4a2