Merge ~ubuntu-core-dev/grub/+git/ubuntu:focal-devel into ~ubuntu-core-dev/grub/+git/ubuntu:focal-security

Proposed by Dimitri John Ledkov
Status: Superseded
Proposed branch: ~ubuntu-core-dev/grub/+git/ubuntu:focal-devel
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:focal-security
Diff against target: 3473 lines (+630/-381) (has conflicts)
92 files modified
debian/.git-dpm (+5/-0)
debian/changelog (+27/-0)
debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch (+2/-2)
debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch (+2/-2)
debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch (+3/-3)
debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch (+2/-2)
debian/patches/at_keyboard-module-init.patch (+2/-2)
debian/patches/bash-completion-drop-have-checks.patch (+2/-2)
debian/patches/blacklist-1440x900x32.patch (+2/-2)
debian/patches/bootp-new-net_bootp6-command.patch (+4/-4)
debian/patches/bootp-process-dhcpack-http-boot.patch (+3/-3)
debian/patches/cherrypick-lsefisystab-define-smbios3.patch (+3/-3)
debian/patches/cherrypick-lsefisystab-show-dtb.patch (+2/-2)
debian/patches/cherrypick-smbios-module.patch (+8/-8)
debian/patches/core-in-fs.patch (+1/-1)
debian/patches/default-grub-d.patch (+3/-3)
debian/patches/disable-floppies.patch (+1/-1)
debian/patches/dpkg-version-comparison.patch (+1/-1)
debian/patches/efi-variable-storage-minimise-writes.patch (+9/-9)
debian/patches/efinet-set-dns-from-uefi-proto.patch (+3/-3)
debian/patches/efinet-set-network-from-uefi-devpath.patch (+3/-3)
debian/patches/efinet-uefi-ipv6-pxe-support.patch (+3/-3)
debian/patches/gettext-quiet.patch (+2/-2)
debian/patches/gfxpayload-dynamic.patch (+10/-10)
debian/patches/gfxpayload-keep-default.patch (+4/-4)
debian/patches/grub-install-pvxen-paths.patch (+2/-2)
debian/patches/grub-legacy-0-based-partitions.patch (+1/-1)
debian/patches/grub.cfg-400.patch (+1/-1)
debian/patches/ieee1275-clear-reset.patch (+2/-2)
debian/patches/ignore-grub_func_test-failures.patch (+2/-2)
debian/patches/insmod-xzio-and-lzopio-on-xen.patch (+4/-4)
debian/patches/install-efi-fallback.patch (+2/-2)
debian/patches/install-efi-ubuntu-flavours.patch (+2/-2)
debian/patches/install-locale-langpack.patch (+2/-2)
debian/patches/install-powerpc-machtypes.patch (+7/-7)
debian/patches/install-stage2-confusion.patch (+2/-2)
debian/patches/maybe-quiet.patch (+13/-13)
debian/patches/mkconfig-loopback.patch (+4/-4)
debian/patches/mkconfig-mid-upgrade.patch (+2/-2)
debian/patches/mkconfig-nonexistent-loopback.patch (+3/-3)
debian/patches/mkconfig-other-inits.patch (+3/-3)
debian/patches/mkconfig-recovery-title.patch (+12/-12)
debian/patches/mkconfig-signed-kernel.patch (+4/-4)
debian/patches/mkconfig-ubuntu-distributor.patch (+4/-4)
debian/patches/mkconfig-ubuntu-recovery.patch (+8/-8)
debian/patches/mkrescue-efi-modules.patch (+2/-2)
debian/patches/net-read-bracketed-ipv6-addr.patch (+5/-5)
debian/patches/no-devicetree-if-secure-boot.patch (+3/-3)
debian/patches/no-insmod-on-sb.patch (+4/-4)
debian/patches/olpc-prefix-hack.patch (+1/-1)
debian/patches/ppc64el-disable-vsx.patch (+2/-2)
debian/patches/probe-fusionio.patch (+3/-3)
debian/patches/quick-boot-lvm.patch (+2/-2)
debian/patches/quick-boot.patch (+10/-10)
debian/patches/restore-mkdevicemap.patch (+7/-7)
debian/patches/series (+10/-5)
debian/patches/skip-grub_cmd_set_date.patch (+2/-2)
debian/patches/sleep-shift.patch (+3/-3)
debian/patches/ubuntu-add-devicetree-command-support.patch (+4/-4)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch (+29/-16)
debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch (+2/-2)
debian/patches/ubuntu-dont-verify-loopback-images.patch (+37/-0)
debian/patches/ubuntu-efi-allow-loopmount-chainload.patch (+4/-4)
debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch (+2/-2)
debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch (+2/-2)
debian/patches/ubuntu-flavour-order.patch (+61/-0)
debian/patches/ubuntu-grub-install-extra-removable.patch (+2/-2)
debian/patches/ubuntu-install-signed.patch (+2/-2)
debian/patches/ubuntu-linuxefi.patch (+31/-31)
debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch (+2/-2)
debian/patches/ubuntu-recovery-dis_ucode_ldr.patch (+84/-0)
debian/patches/ubuntu-resilient-boot-boot-order.patch (+7/-7)
debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch (+2/-2)
debian/patches/ubuntu-shorter-version-info.patch (+2/-2)
debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch (+2/-2)
debian/patches/ubuntu-speed-zsys-history.patch (+8/-8)
debian/patches/ubuntu-support-initrd-less-boot.patch (+5/-5)
debian/patches/ubuntu-temp-keep-auto-nvram.patch (+2/-2)
debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch (+2/-2)
debian/patches/ubuntu-zfs-enhance-support.patch (+15/-12)
debian/patches/uefi-firmware-setup.patch (+3/-3)
debian/patches/uefi-secure-boot-cryptomount.patch (+2/-2)
debian/patches/vsnprintf-upper-case-hex.patch (+2/-2)
debian/patches/vt-handoff.patch (+7/-7)
debian/patches/wubi-no-windows.patch (+2/-2)
debian/patches/zpool-full-device-name.patch (+2/-2)
dev/null (+0/-27)
grub-core/disk/loopback.c (+2/-1)
util/grub-mkconfig.in (+2/-1)
util/grub-mkconfig_lib.in (+15/-0)
util/grub.d/10_linux.in (+22/-7)
util/grub.d/10_linux_zfs.in (+23/-14)
Conflict in debian/.git-dpm
Conflict in debian/changelog
Conflict in debian/patches/series
Reviewer Review Type Date Requested Status
Julian Andres Klode Pending
Review via email: mp+388381@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

No idea if this makes any sense, but let's try.

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

I want to rebase atop the security upload really, I think, otherwise it will just get super confusing

Unmerged commits

e972ed2... by Julian Andres Klode

releasing package grub2 version 2.04-1ubuntu26.2

ab1d190... by Julian Andres Klode

Merge branch 'ubuntu' into focal

d3c4b3f... by Julian Andres Klode

releasing package grub2 version 2.04-1ubuntu29

caea9bc... by Julian Andres Klode

change version to 2.04-1ubuntu29 (UNRELEASED)
debian/patches/ubuntu-flavour-order.patch: Remove debugging message and
export the variable so it actually works from /etc/default/grub.

3eb630e... by Julian Andres Klode

Pass dis_ucode_ldr to kernel for recovery mode

In case of a botched microcode update, this allows people to
easily roll back.

It will of course break in the more unlikely event that you are
missing a microcode update in your firmware that is needed to boot
the system, but editing the entry to remove an option is easier than
having to figure out the option and add it.

LP: #1831789
Patch-Name: ubuntu-recovery-dis_ucode_ldr.patch

696a85a... by Chris Coulson

UBUNTU: disk/loopback: Don't verify loopback images

When a file is verified, the entire contents of the verified file are
loaded in to memory and retained until the file handle is closed. A
consequence of this is that opening a loopback image can incur a
significant memory cost.

As loopback devices are just another disk implementation, don't treat
loopback images any differently to physical disk images, and skip
verification of them. Files opened from the filesystem within a loopback
image will still be passed to verifier modules where required.

Signed-off-by: Chris Coulson <email address hidden>
LP: #1878541
Forwarded: yes, https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00002.html
Patch-Name: ubuntu-dont-verify-loopback-images.patch

2d23673... by Julian Andres Klode

UBUNTU: Add GRUB_FLAVOUR_ORDER configuration item

This allows you to specify flavours that will be preferred
over other ones, and the order in which they are preferred
- items in the list win over items not in the list, and items
earlier in the list win over later ones.

We still have to sort out storage of this, as we need to
inject that from packages or the UA client and similar,
and we can't just modify /etc/default/grub for that.

LP: #1882663
Patch-Name: ubuntu-flavour-order.patch

8e1a6d7... by Julian Andres Klode

releasing package grub2 version 2.04-1ubuntu26.1

23e4dc8... by Julian Andres Klode

Merge branch 'ubuntu' into focal

7aa17ff... by Julian Andres Klode

releasing package grub2 version 2.04-1ubuntu28

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/.git-dpm b/debian/.git-dpm
index 19c2663..3314490 100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@ -1,6 +1,11 @@
1# see git-dpm(1) from git-dpm package1# see git-dpm(1) from git-dpm package
2<<<<<<< debian/.git-dpm
2ec83738b990d5008c23fa820edbfd9580df95e513ec83738b990d5008c23fa820edbfd9580df95e51
3ec83738b990d5008c23fa820edbfd9580df95e514ec83738b990d5008c23fa820edbfd9580df95e51
5=======
63eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b
73eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b
8>>>>>>> debian/.git-dpm
4578bb115fbd47e1c464696f1f8d6183e5443975d9578bb115fbd47e1c464696f1f8d6183e5443975d
5578bb115fbd47e1c464696f1f8d6183e5443975d10578bb115fbd47e1c464696f1f8d6183e5443975d
6grub2_2.04.orig.tar.xz11grub2_2.04.orig.tar.xz
diff --git a/debian/changelog b/debian/changelog
index 4d388c9..c8c3d77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,4 @@
1<<<<<<< debian/changelog
1grub2 (2.04-1ubuntu26.1) focal; urgency=medium2grub2 (2.04-1ubuntu26.1) focal; urgency=medium
23
3 [ Julian Andres Klode ]4 [ Julian Andres Klode ]
@@ -68,6 +69,32 @@ grub2 (2.04-1ubuntu26.1) focal; urgency=medium
68 - Fail kernel validation if the shim protocol isn't available69 - Fail kernel validation if the shim protocol isn't available
6970
70 -- Chris Coulson <chris.coulson@canonical.com> Mon, 20 Jul 2020 19:19:08 +010071 -- Chris Coulson <chris.coulson@canonical.com> Mon, 20 Jul 2020 19:19:08 +0100
72=======
73grub2 (2.04-1ubuntu26.2) focal; urgency=medium
74
75 * debian/patches/ubuntu-flavour-order.patch: Remove debugging message and
76 export the variable so it actually works from /etc/default/grub.
77
78 -- Julian Andres Klode <juliank@ubuntu.com> Fri, 26 Jun 2020 12:43:20 +0200
79
80grub2 (2.04-1ubuntu26.1) focal; urgency=medium
81
82 * Move gettext patches out of git-dpm's way, so it does not delete them
83 * debian/patches/ubuntu-flavour-order.patch:
84 - Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
85 flavours as preferred, and specify an order between those preferred
86 flavours (LP: #1882663)
87 * debian/patches/ubuntu-zfs-enhance-support.patch:
88 - Use version_find_latest for ordering kernels, so it also supports
89 the GRUB_FLAVOUR_ORDER setting.
90 * debian/patches/ubuntu-dont-verify-loopback-images.patch:
91 - disk/loopback: Don't verify loopback images (LP: #1878541),
92 Thanks to Chris Coulson for the patch
93 * Merge changes from xnox to fix multiple initrds support (LP: #1878705)
94 * Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)
95
96 -- Julian Andres Klode <juliank@ubuntu.com> Mon, 22 Jun 2020 13:30:46 +0200
97>>>>>>> debian/changelog
7198
72grub2 (2.04-1ubuntu26) focal; urgency=medium99grub2 (2.04-1ubuntu26) focal; urgency=medium
73100
diff --git a/debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch b/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
74similarity index 90%101similarity index 90%
75rename from debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch102rename from debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
76rename to debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch103rename to debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
index 0bab37b..a05249e 100644
--- a/debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
+++ b/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
@@ -1,4 +1,4 @@
1From 4d3c59dd378362f4e0e30aaaf77068bea97ebd24 Mon Sep 17 00:00:00 20011From c4966fe70800e0b8740bf45b02d63b51383d16ce Mon Sep 17 00:00:00 2001
2From: Dimitri John Ledkov <xnox@ubuntu.com>2From: Dimitri John Ledkov <xnox@ubuntu.com>
3Date: Mon, 24 Feb 2020 20:29:53 +00003Date: Mon, 24 Feb 2020 20:29:53 +0000
4Subject: uefi-firmware: rename fwsetup menuentry to UEFI Firmware Settings4Subject: uefi-firmware: rename fwsetup menuentry to UEFI Firmware Settings
@@ -9,7 +9,7 @@ LP: #1864547
9 1 file changed, 2 insertions(+), 2 deletions(-)9 1 file changed, 2 insertions(+), 2 deletions(-)
1010
11diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in11diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
12index 3c9f533d8..b072d219f 10064412index 3c9f533d8c..b072d219f6 100644
13--- a/util/grub.d/30_uefi-firmware.in13--- a/util/grub.d/30_uefi-firmware.in
14+++ b/util/grub.d/30_uefi-firmware.in14+++ b/util/grub.d/30_uefi-firmware.in
15@@ -32,9 +32,9 @@ OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"15@@ -32,9 +32,9 @@ OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
diff --git a/debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch b/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
16similarity index 97%16similarity index 97%
17rename from debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch17rename from debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
18rename to debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch18rename to debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
index c1bbac6..1b8e6eb 100644
--- a/debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
+++ b/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
@@ -1,4 +1,4 @@
1From b7ae50d78035e0e73f5ea212fab7b728353c988b Mon Sep 17 00:00:00 20011From cd73cd59b7e210a3e66af073c649c162930989ad Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Tue, 3 Mar 2020 16:06:34 +01003Date: Tue, 3 Mar 2020 16:06:34 +0100
4Subject: smbios: Add a --linux argument to apply linux modalias-like filtering4Subject: smbios: Add a --linux argument to apply linux modalias-like filtering
@@ -16,7 +16,7 @@ Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=87049f97
16 1 file changed, 24 insertions(+)16 1 file changed, 24 insertions(+)
1717
18diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c18diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
19index 7a6a391fc..1a9086ddd 10064419index 7a6a391fc1..1a9086ddd4 100644
20--- a/grub-core/commands/smbios.c20--- a/grub-core/commands/smbios.c
21+++ b/grub-core/commands/smbios.c21+++ b/grub-core/commands/smbios.c
22@@ -64,6 +64,21 @@ grub_smbios_get_eps3 (void)22@@ -64,6 +64,21 @@ grub_smbios_get_eps3 (void)
diff --git a/debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch b/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
23similarity index 97%23similarity index 97%
24rename from debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch24rename from debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
25rename to debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch25rename to debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
index 13e098e..5c44c1d 100644
--- a/debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
+++ b/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
@@ -1,4 +1,4 @@
1From 3004e78bbfe6acb5e38290b2e5c7fff277ea1628 Mon Sep 17 00:00:00 20011From 9a93d0f5a9216f71c4b9cbd041805911f476089e Mon Sep 17 00:00:00 2001
2From: Chris Coulson <chris.coulson@canonical.com>2From: Chris Coulson <chris.coulson@canonical.com>
3Date: Wed, 11 Mar 2020 16:46:00 +01003Date: Wed, 11 Mar 2020 16:46:00 +0100
4Subject: ubuntu: Make the linux command in EFI grub always try EFI handover4Subject: ubuntu: Make the linux command in EFI grub always try EFI handover
@@ -18,7 +18,7 @@ only if secure boot is disabled.
18 2 files changed, 35 insertions(+), 26 deletions(-)18 2 files changed, 35 insertions(+), 26 deletions(-)
1919
20diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c20diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
21index 6b6aef87f..fe3ca2c59 10064421index 6b6aef87f7..fe3ca2c596 100644
22--- a/grub-core/loader/i386/efi/linux.c22--- a/grub-core/loader/i386/efi/linux.c
23+++ b/grub-core/loader/i386/efi/linux.c23+++ b/grub-core/loader/i386/efi/linux.c
24@@ -27,6 +27,7 @@24@@ -27,6 +27,7 @@
@@ -51,7 +51,7 @@ index 6b6aef87f..fe3ca2c59 100644
51 51
52 params = grub_efi_allocate_pages_max (0x3fffffff,52 params = grub_efi_allocate_pages_max (0x3fffffff,
53diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c53diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
54index 4328bcbdb..991eb29db 10064454index 4328bcbdb0..991eb29db9 100644
55--- a/grub-core/loader/i386/linux.c55--- a/grub-core/loader/i386/linux.c
56+++ b/grub-core/loader/i386/linux.c56+++ b/grub-core/loader/i386/linux.c
57@@ -658,35 +658,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),57@@ -658,35 +658,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
diff --git a/debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch b/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
58similarity index 91%58similarity index 91%
59rename from debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch59rename from debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch
60rename to debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch60rename to debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
index 07e93a4..4727ee1 100644
--- a/debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch
+++ b/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
@@ -1,4 +1,4 @@
1From 05c83490bed811e5dd5cde7c59bb56cc2db751d6 Mon Sep 17 00:00:00 20011From b2c861f6f5da96ecda0ef8d962bb0fa804a56825 Mon Sep 17 00:00:00 2001
2From: Chris Coulson <chris.coulson@canonical.com>2From: Chris Coulson <chris.coulson@canonical.com>
3Date: Wed, 11 Mar 2020 16:46:41 +01003Date: Wed, 11 Mar 2020 16:46:41 +0100
4Subject: ubuntu: Update the linux boot protocol version check.4Subject: ubuntu: Update the linux boot protocol version check.
@@ -11,7 +11,7 @@ check accordingly.
11 1 file changed, 1 insertion(+), 1 deletion(-)11 1 file changed, 1 insertion(+), 1 deletion(-)
1212
13diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c13diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
14index fe3ca2c59..2929da7a2 10064414index fe3ca2c596..2929da7a29 100644
15--- a/grub-core/loader/i386/efi/linux.c15--- a/grub-core/loader/i386/efi/linux.c
16+++ b/grub-core/loader/i386/efi/linux.c16+++ b/grub-core/loader/i386/efi/linux.c
17@@ -245,7 +245,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),17@@ -245,7 +245,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
diff --git a/debian/patches/at_keyboard-module-init.patch b/debian/patches/at_keyboard-module-init.patch
index faafb46..5f504c8 100644
--- a/debian/patches/at_keyboard-module-init.patch
+++ b/debian/patches/at_keyboard-module-init.patch
@@ -1,4 +1,4 @@
1From 2fa183df8ec4037976444a92810672b0fa3f75b4 Mon Sep 17 00:00:00 20011From fd386a087b6c64b28f1b80d03b35d7dcf552b143 Mon Sep 17 00:00:00 2001
2From: Jeroen Dekkers <jeroen@dekkers.ch>2From: Jeroen Dekkers <jeroen@dekkers.ch>
3Date: Sat, 12 Jan 2019 21:02:18 +01003Date: Sat, 12 Jan 2019 21:02:18 +0100
4Subject: at_keyboard: initialize keyboard in module init if keyboard is ready4Subject: at_keyboard: initialize keyboard in module init if keyboard is ready
@@ -16,7 +16,7 @@ Patch-Name: at_keyboard-module-init.patch
16 1 file changed, 9 insertions(+)16 1 file changed, 9 insertions(+)
1717
18diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c18diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
19index f0a986eb1..d4395c201 10064419index f0a986eb17..d4395c2019 100644
20--- a/grub-core/term/at_keyboard.c20--- a/grub-core/term/at_keyboard.c
21+++ b/grub-core/term/at_keyboard.c21+++ b/grub-core/term/at_keyboard.c
22@@ -244,6 +244,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))22@@ -244,6 +244,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
diff --git a/debian/patches/bash-completion-drop-have-checks.patch b/debian/patches/bash-completion-drop-have-checks.patch
index acb2021..e7eaa80 100644
--- a/debian/patches/bash-completion-drop-have-checks.patch
+++ b/debian/patches/bash-completion-drop-have-checks.patch
@@ -1,4 +1,4 @@
1From 1eee32e5a695ce788c97203f0fba724bf5dc3a19 Mon Sep 17 00:00:00 20011From b4b380c0cbec13b3797a570e651e94cdc349bb2f Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Fri, 16 Nov 2018 16:37:02 +00003Date: Fri, 16 Nov 2018 16:37:02 +0000
4Subject: bash-completion: Drop "have" checks4Subject: bash-completion: Drop "have" checks
@@ -16,7 +16,7 @@ Patch-Name: bash-completion-drop-have-checks.patch
16 1 file changed, 13 insertions(+), 26 deletions(-)16 1 file changed, 13 insertions(+), 26 deletions(-)
1717
18diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in18diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
19index 44bf135b9..d4235e7ef 10064419index 44bf135b9f..d4235e7ef8 100644
20--- a/util/bash-completion.d/grub-completion.bash.in20--- a/util/bash-completion.d/grub-completion.bash.in
21+++ b/util/bash-completion.d/grub-completion.bash.in21+++ b/util/bash-completion.d/grub-completion.bash.in
22@@ -166,13 +166,11 @@ _grub_set_entry () {22@@ -166,13 +166,11 @@ _grub_set_entry () {
diff --git a/debian/patches/blacklist-1440x900x32.patch b/debian/patches/blacklist-1440x900x32.patch
index 5043cf4..10062b6 100644
--- a/debian/patches/blacklist-1440x900x32.patch
+++ b/debian/patches/blacklist-1440x900x32.patch
@@ -1,4 +1,4 @@
1From a7d121953a5158ccd4e8789a475cd43b83c2b779 Mon Sep 17 00:00:00 20011From 9633a0226ecad133582225d7d5decd7f344b376d Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:11 +00003Date: Mon, 13 Jan 2014 12:13:11 +0000
4Subject: Blacklist 1440x900x32 from VBE preferred mode handling4Subject: Blacklist 1440x900x32 from VBE preferred mode handling
@@ -13,7 +13,7 @@ Patch-Name: blacklist-1440x900x32.patch
13 1 file changed, 9 insertions(+)13 1 file changed, 9 insertions(+)
1414
15diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c15diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c
16index b7f911926..4b1bd7d5e 10064416index b7f911926d..4b1bd7d5ea 100644
17--- a/grub-core/video/i386/pc/vbe.c17--- a/grub-core/video/i386/pc/vbe.c
18+++ b/grub-core/video/i386/pc/vbe.c18+++ b/grub-core/video/i386/pc/vbe.c
19@@ -1054,6 +1054,15 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,19@@ -1054,6 +1054,15 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,
diff --git a/debian/patches/bootp-new-net_bootp6-command.patch b/debian/patches/bootp-new-net_bootp6-command.patch
index d53a2f2..dd56826 100644
--- a/debian/patches/bootp-new-net_bootp6-command.patch
+++ b/debian/patches/bootp-new-net_bootp6-command.patch
@@ -1,4 +1,4 @@
1From 8624974d81aaa8eabd6328c99ec5c7d204c80638 Mon Sep 17 00:00:00 20011From 5376a44e70409088670de36d2ec82a1b48259cbd Mon Sep 17 00:00:00 2001
2From: Michael Chang <mchang@suse.com>2From: Michael Chang <mchang@suse.com>
3Date: Thu, 27 Oct 2016 17:41:04 -04003Date: Thu, 27 Oct 2016 17:41:04 -0400
4Subject: bootp: New net_bootp6 command4Subject: bootp: New net_bootp6 command
@@ -17,7 +17,7 @@ Patch-Name: bootp-new-net_bootp6-command.patch
17 3 files changed, 1018 insertions(+), 1 deletion(-)17 3 files changed, 1018 insertions(+), 1 deletion(-)
1818
19diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c19diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
20index 04cfbb045..21c1824ef 10064420index 04cfbb0450..21c1824efb 100644
21--- a/grub-core/net/bootp.c21--- a/grub-core/net/bootp.c
22+++ b/grub-core/net/bootp.c22+++ b/grub-core/net/bootp.c
23@@ -24,6 +24,98 @@23@@ -24,6 +24,98 @@
@@ -969,7 +969,7 @@ index 04cfbb045..21c1824ef 100644
969+ grub_unregister_command (cmd_bootp6);969+ grub_unregister_command (cmd_bootp6);
970 }970 }
971diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c971diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
972index ea5edf8f1..01410798b 100644972index ea5edf8f1f..01410798b3 100644
973--- a/grub-core/net/ip.c973--- a/grub-core/net/ip.c
974+++ b/grub-core/net/ip.c974+++ b/grub-core/net/ip.c
975@@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb,975@@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb,
@@ -1019,7 +1019,7 @@ index ea5edf8f1..01410798b 100644
1019 {1019 {
1020 const struct grub_net_bootp_packet *bootp;1020 const struct grub_net_bootp_packet *bootp;
1021diff --git a/include/grub/net.h b/include/grub/net.h1021diff --git a/include/grub/net.h b/include/grub/net.h
1022index cc114286e..58cff96d2 1006441022index cc114286ea..58cff96d2a 100644
1023--- a/include/grub/net.h1023--- a/include/grub/net.h
1024+++ b/include/grub/net.h1024+++ b/include/grub/net.h
1025@@ -448,6 +448,66 @@ struct grub_net_bootp_packet1025@@ -448,6 +448,66 @@ struct grub_net_bootp_packet
diff --git a/debian/patches/bootp-process-dhcpack-http-boot.patch b/debian/patches/bootp-process-dhcpack-http-boot.patch
index 74e9508..075eeca 100644
--- a/debian/patches/bootp-process-dhcpack-http-boot.patch
+++ b/debian/patches/bootp-process-dhcpack-http-boot.patch
@@ -1,4 +1,4 @@
1From 3de9845e404a99dc3122efbf7c2570482097c412 Mon Sep 17 00:00:00 20011From 583bf554edc8aae87c44e7c9f984835b246e2f0b Mon Sep 17 00:00:00 2001
2From: Michael Chang <mchang@suse.com>2From: Michael Chang <mchang@suse.com>
3Date: Thu, 27 Oct 2016 17:42:19 -04003Date: Thu, 27 Oct 2016 17:42:19 -0400
4Subject: bootp: Add processing DHCPACK packet from HTTP Boot4Subject: bootp: Add processing DHCPACK packet from HTTP Boot
@@ -24,7 +24,7 @@ Patch-Name: bootp-process-dhcpack-http-boot.patch
24 2 files changed, 60 insertions(+), 1 deletion(-)24 2 files changed, 60 insertions(+), 1 deletion(-)
2525
26diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c26diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
27index 21c1824ef..558d97ba1 10064427index 21c1824efb..558d97ba1e 100644
28--- a/grub-core/net/bootp.c28--- a/grub-core/net/bootp.c
29+++ b/grub-core/net/bootp.c29+++ b/grub-core/net/bootp.c
30@@ -154,7 +154,7 @@ struct grub_dhcp_request_options30@@ -154,7 +154,7 @@ struct grub_dhcp_request_options
@@ -109,7 +109,7 @@ index 21c1824ef..558d97ba1 100644
109 },109 },
110 GRUB_NET_BOOTP_END,110 GRUB_NET_BOOTP_END,
111diff --git a/include/grub/net.h b/include/grub/net.h111diff --git a/include/grub/net.h b/include/grub/net.h
112index 58cff96d2..b5f9e617e 100644112index 58cff96d2a..b5f9e617e5 100644
113--- a/include/grub/net.h113--- a/include/grub/net.h
114+++ b/include/grub/net.h114+++ b/include/grub/net.h
115@@ -523,6 +523,7 @@ enum115@@ -523,6 +523,7 @@ enum
diff --git a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
index 612fc32..2744692 100644
--- a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
+++ b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
@@ -1,4 +1,4 @@
1From 0bc1e64554d9dfbcfaf5e384fcb772f861a548d8 Mon Sep 17 00:00:00 20011From 552a1e20296307d177e1d679cae45bc78e101ecc Mon Sep 17 00:00:00 2001
2From: David Michael <fedora.dm0@gmail.com>2From: David Michael <fedora.dm0@gmail.com>
3Date: Fri, 5 Jul 2019 08:47:02 -04003Date: Fri, 5 Jul 2019 08:47:02 -0400
4Subject: lsefisystab: Define SMBIOS3 entry point structures for EFI4Subject: lsefisystab: Define SMBIOS3 entry point structures for EFI
@@ -16,7 +16,7 @@ Patch-Name: cherrypick-lsefisystab-define-smbios3.patch
16 2 files changed, 6 insertions(+)16 2 files changed, 6 insertions(+)
1717
18diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c18diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
19index df1030221..7c039c509 10064419index df10302218..7c039c5097 100644
20--- a/grub-core/commands/efi/lsefisystab.c20--- a/grub-core/commands/efi/lsefisystab.c
21+++ b/grub-core/commands/efi/lsefisystab.c21+++ b/grub-core/commands/efi/lsefisystab.c
22@@ -48,6 +48,7 @@ static const struct guid_mapping guid_mappings[] =22@@ -48,6 +48,7 @@ static const struct guid_mapping guid_mappings[] =
@@ -28,7 +28,7 @@ index df1030221..7c039c509 100644
28 { GRUB_EFI_TIANO_CUSTOM_DECOMPRESS_GUID, "TIANO CUSTOM DECOMPRESS"},28 { GRUB_EFI_TIANO_CUSTOM_DECOMPRESS_GUID, "TIANO CUSTOM DECOMPRESS"},
29 { GRUB_EFI_TSC_FREQUENCY_GUID, "TSC FREQUENCY"},29 { GRUB_EFI_TSC_FREQUENCY_GUID, "TSC FREQUENCY"},
30diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h30diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
31index 75befd10e..9824fbcd0 10064431index 75befd10e5..9824fbcd0d 100644
32--- a/include/grub/efi/api.h32--- a/include/grub/efi/api.h
33+++ b/include/grub/efi/api.h33+++ b/include/grub/efi/api.h
34@@ -314,6 +314,11 @@34@@ -314,6 +314,11 @@
diff --git a/debian/patches/cherrypick-lsefisystab-show-dtb.patch b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
index 6516840..8c17a83 100644
--- a/debian/patches/cherrypick-lsefisystab-show-dtb.patch
+++ b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
@@ -1,4 +1,4 @@
1From b5a07214b83812f0b8b42dc576021e98237498e6 Mon Sep 17 00:00:00 20011From ffba11952bfc8ec3456d8b72db122550386a25ae Mon Sep 17 00:00:00 2001
2From: Heinrich Schuchardt <xypron.glpk@gmx.de>2From: Heinrich Schuchardt <xypron.glpk@gmx.de>
3Date: Sat, 6 Jul 2019 11:11:02 +02003Date: Sat, 6 Jul 2019 11:11:02 +0200
4Subject: lsefisystab: Add support for device tree table4Subject: lsefisystab: Add support for device tree table
@@ -27,7 +27,7 @@ Patch-Name: cherrypick-lsefisystab-show-dtb.patch
27 1 file changed, 1 insertion(+)27 1 file changed, 1 insertion(+)
2828
29diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c29diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
30index 7c039c509..902788250 10064430index 7c039c5097..902788250e 100644
31--- a/grub-core/commands/efi/lsefisystab.c31--- a/grub-core/commands/efi/lsefisystab.c
32+++ b/grub-core/commands/efi/lsefisystab.c32+++ b/grub-core/commands/efi/lsefisystab.c
33@@ -40,6 +40,7 @@ static const struct guid_mapping guid_mappings[] =33@@ -40,6 +40,7 @@ static const struct guid_mapping guid_mappings[] =
diff --git a/debian/patches/cherrypick-smbios-module.patch b/debian/patches/cherrypick-smbios-module.patch
index 8bbe12b..7318eaa 100644
--- a/debian/patches/cherrypick-smbios-module.patch
+++ b/debian/patches/cherrypick-smbios-module.patch
@@ -1,4 +1,4 @@
1From 982cd5b597e964da666ebdab41c727823a50c776 Mon Sep 17 00:00:00 20011From 4dcbe95e3769a3665139e88cf1e179a802984493 Mon Sep 17 00:00:00 2001
2From: David Michael <fedora.dm0@gmail.com>2From: David Michael <fedora.dm0@gmail.com>
3Date: Fri, 5 Jul 2019 08:47:09 -04003Date: Fri, 5 Jul 2019 08:47:09 -0400
4Subject: smbios: Add a module for retrieving SMBIOS information4Subject: smbios: Add a module for retrieving SMBIOS information
@@ -33,7 +33,7 @@ Patch-Name: cherrypick-smbios-module.patch
33 create mode 100644 include/grub/smbios.h33 create mode 100644 include/grub/smbios.h
3434
35diff --git a/docs/grub.texi b/docs/grub.texi35diff --git a/docs/grub.texi b/docs/grub.texi
36index 1baa0fa20..d573f32cb 10064436index 1baa0fa20f..d573f32cbb 100644
37--- a/docs/grub.texi37--- a/docs/grub.texi
38+++ b/docs/grub.texi38+++ b/docs/grub.texi
39@@ -3976,6 +3976,7 @@ you forget a command, you can run the command @command{help}39@@ -3976,6 +3976,7 @@ you forget a command, you can run the command @command{help}
@@ -126,7 +126,7 @@ index 1baa0fa20..d573f32cb 100644
126 @subsection source126 @subsection source
127 127
128diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def128diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
129index 33e75021d..9b20f3335 100644129index 33e75021da..9b20f33355 100644
130--- a/grub-core/Makefile.core.def130--- a/grub-core/Makefile.core.def
131+++ b/grub-core/Makefile.core.def131+++ b/grub-core/Makefile.core.def
132@@ -1106,6 +1106,21 @@ module = {132@@ -1106,6 +1106,21 @@ module = {
@@ -153,7 +153,7 @@ index 33e75021d..9b20f3335 100644
153 ieee1275 = commands/ieee1275/suspend.c;153 ieee1275 = commands/ieee1275/suspend.c;
154diff --git a/grub-core/commands/efi/smbios.c b/grub-core/commands/efi/smbios.c154diff --git a/grub-core/commands/efi/smbios.c b/grub-core/commands/efi/smbios.c
155new file mode 100644155new file mode 100644
156index 000000000..75202d5aa156index 0000000000..75202d5aad
157--- /dev/null157--- /dev/null
158+++ b/grub-core/commands/efi/smbios.c158+++ b/grub-core/commands/efi/smbios.c
159@@ -0,0 +1,61 @@159@@ -0,0 +1,61 @@
@@ -220,7 +220,7 @@ index 000000000..75202d5aa
220+}220+}
221diff --git a/grub-core/commands/i386/pc/smbios.c b/grub-core/commands/i386/pc/smbios.c221diff --git a/grub-core/commands/i386/pc/smbios.c b/grub-core/commands/i386/pc/smbios.c
222new file mode 100644222new file mode 100644
223index 000000000..069d66367223index 0000000000..069d663673
224--- /dev/null224--- /dev/null
225+++ b/grub-core/commands/i386/pc/smbios.c225+++ b/grub-core/commands/i386/pc/smbios.c
226@@ -0,0 +1,52 @@226@@ -0,0 +1,52 @@
@@ -278,7 +278,7 @@ index 000000000..069d66367
278+}278+}
279diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c279diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
280new file mode 100644280new file mode 100644
281index 000000000..7a6a391fc281index 0000000000..7a6a391fc1
282--- /dev/null282--- /dev/null
283+++ b/grub-core/commands/smbios.c283+++ b/grub-core/commands/smbios.c
284@@ -0,0 +1,374 @@284@@ -0,0 +1,374 @@
@@ -657,7 +657,7 @@ index 000000000..7a6a391fc
657+ grub_unregister_extcmd (cmd);657+ grub_unregister_extcmd (cmd);
658+}658+}
659diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c659diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c
660index 492c07c46..e5fffb7d4 100644660index 492c07c468..e5fffb7d4a 100644
661--- a/grub-core/efiemu/i386/pc/cfgtables.c661--- a/grub-core/efiemu/i386/pc/cfgtables.c
662+++ b/grub-core/efiemu/i386/pc/cfgtables.c662+++ b/grub-core/efiemu/i386/pc/cfgtables.c
663@@ -22,11 +22,11 @@663@@ -22,11 +22,11 @@
@@ -696,7 +696,7 @@ index 492c07c46..e5fffb7d4 100644
696 }696 }
697diff --git a/include/grub/smbios.h b/include/grub/smbios.h697diff --git a/include/grub/smbios.h b/include/grub/smbios.h
698new file mode 100644698new file mode 100644
699index 000000000..15ec260b3699index 0000000000..15ec260b32
700--- /dev/null700--- /dev/null
701+++ b/include/grub/smbios.h701+++ b/include/grub/smbios.h
702@@ -0,0 +1,69 @@702@@ -0,0 +1,69 @@
diff --git a/debian/patches/core-in-fs.patch b/debian/patches/core-in-fs.patch
index 1ba3b4b..b8e13d3 100644
--- a/debian/patches/core-in-fs.patch
+++ b/debian/patches/core-in-fs.patch
@@ -11,7 +11,7 @@ Patch-Name: core-in-fs.patch
11 1 file changed, 8 insertions(+)11 1 file changed, 8 insertions(+)
1212
13diff --git a/util/setup.c b/util/setup.c13diff --git a/util/setup.c b/util/setup.c
14index 6f88f3cc4..fbdf2fcc5 10064414index 6f88f3cc43..fbdf2fcc59 100644
15--- a/util/setup.c15--- a/util/setup.c
16+++ b/util/setup.c16+++ b/util/setup.c
17@@ -58,6 +58,8 @@17@@ -58,6 +58,8 @@
diff --git a/debian/patches/default-grub-d.patch b/debian/patches/default-grub-d.patch
index dc61a66..0837cbd 100644
--- a/debian/patches/default-grub-d.patch
+++ b/debian/patches/default-grub-d.patch
@@ -1,4 +1,4 @@
1From e1e966557a634500e95e2ec691a0cb8fca144aae Mon Sep 17 00:00:00 20011From 43da93f26fcd81893edb2bbe10f87879a95dcbc5 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:10 +00003Date: Mon, 13 Jan 2014 12:13:10 +0000
4Subject: Read /etc/default/grub.d/*.cfg after /etc/default/grub4Subject: Read /etc/default/grub.d/*.cfg after /etc/default/grub
@@ -14,7 +14,7 @@ Patch-Name: default-grub-d.patch
14 2 files changed, 98 insertions(+), 21 deletions(-)14 2 files changed, 98 insertions(+), 21 deletions(-)
1515
16diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c16diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
17index 65effa9f3..5478030fd 10064417index 65effa9f3a..5478030fde 100644
18--- a/grub-core/osdep/unix/config.c18--- a/grub-core/osdep/unix/config.c
19+++ b/grub-core/osdep/unix/config.c19+++ b/grub-core/osdep/unix/config.c
20@@ -24,6 +24,8 @@20@@ -24,6 +24,8 @@
@@ -178,7 +178,7 @@ index 65effa9f3..5478030fd 100644
178+ free (cfgdir);178+ free (cfgdir);
179 }179 }
180diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in180diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
181index b506d63bf..d18bf972f 100644181index b506d63bf9..d18bf972f7 100644
182--- a/util/grub-mkconfig.in182--- a/util/grub-mkconfig.in
183+++ b/util/grub-mkconfig.in183+++ b/util/grub-mkconfig.in
184@@ -164,6 +164,11 @@ fi184@@ -164,6 +164,11 @@ fi
diff --git a/debian/patches/disable-floppies.patch b/debian/patches/disable-floppies.patch
index 7d4835e..981b9ec 100644
--- a/debian/patches/disable-floppies.patch
+++ b/debian/patches/disable-floppies.patch
@@ -13,7 +13,7 @@ Patch-Name: disable-floppies.patch
13 1 file changed, 12 insertions(+)13 1 file changed, 12 insertions(+)
1414
15diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c15diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
16index e9ec680cd..8ac523953 10064416index e9ec680cdb..8ac5239538 100644
17--- a/grub-core/kern/emu/hostdisk.c17--- a/grub-core/kern/emu/hostdisk.c
18+++ b/grub-core/kern/emu/hostdisk.c18+++ b/grub-core/kern/emu/hostdisk.c
19@@ -532,6 +532,18 @@ read_device_map (const char *dev_map)19@@ -532,6 +532,18 @@ read_device_map (const char *dev_map)
diff --git a/debian/patches/dpkg-version-comparison.patch b/debian/patches/dpkg-version-comparison.patch
index 86e5c7e..929070f 100644
--- a/debian/patches/dpkg-version-comparison.patch
+++ b/debian/patches/dpkg-version-comparison.patch
@@ -12,7 +12,7 @@ Patch-Name: dpkg-version-comparison.patch
12 1 file changed, 4 insertions(+), 3 deletions(-)12 1 file changed, 4 insertions(+), 3 deletions(-)
1313
14diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in14diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
15index 0f801cab3..b6606c16e 10064415index 0f801cab3e..b6606c16e0 100644
16--- a/util/grub-mkconfig_lib.in16--- a/util/grub-mkconfig_lib.in
17+++ b/util/grub-mkconfig_lib.in17+++ b/util/grub-mkconfig_lib.in
18@@ -239,8 +239,9 @@ version_test_numeric ()18@@ -239,8 +239,9 @@ version_test_numeric ()
diff --git a/debian/patches/efi-variable-storage-minimise-writes.patch b/debian/patches/efi-variable-storage-minimise-writes.patch
index 5078aa3..1cd6507 100644
--- a/debian/patches/efi-variable-storage-minimise-writes.patch
+++ b/debian/patches/efi-variable-storage-minimise-writes.patch
@@ -1,4 +1,4 @@
1From 20dd578ec8d17d92790121ce010de0e49eaf9cef Mon Sep 17 00:00:00 20011From 5028184f2c8baf38d6849aa771c4d064fdcd0529 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 11 Mar 2019 11:17:43 +00003Date: Mon, 11 Mar 2019 11:17:43 +0000
4Subject: Minimise writes to EFI variable storage4Subject: Minimise writes to EFI variable storage
@@ -60,7 +60,7 @@ Patch-Name: efi-variable-storage-minimise-writes.patch
60 create mode 100644 grub-core/osdep/unix/efivar.c60 create mode 100644 grub-core/osdep/unix/efivar.c
6161
62diff --git a/INSTALL b/INSTALL62diff --git a/INSTALL b/INSTALL
63index 8acb40902..342c158e9 10064463index 8acb409023..342c158e91 100644
64--- a/INSTALL64--- a/INSTALL
65+++ b/INSTALL65+++ b/INSTALL
66@@ -41,6 +41,11 @@ configuring the GRUB.66@@ -41,6 +41,11 @@ configuring the GRUB.
@@ -76,7 +76,7 @@ index 8acb40902..342c158e9 100644
76 76
77 * libdevmapper 1.02.34 or later (recommended)77 * libdevmapper 1.02.34 or later (recommended)
78diff --git a/Makefile.util.def b/Makefile.util.def78diff --git a/Makefile.util.def b/Makefile.util.def
79index ce133e694..504d1c058 10064479index ce133e694e..504d1c0581 100644
80--- a/Makefile.util.def80--- a/Makefile.util.def
81+++ b/Makefile.util.def81+++ b/Makefile.util.def
82@@ -565,6 +565,8 @@ program = {82@@ -565,6 +565,8 @@ program = {
@@ -180,7 +180,7 @@ index ce133e694..504d1c058 100644
180 180
181 script = {181 script = {
182diff --git a/configure.ac b/configure.ac182diff --git a/configure.ac b/configure.ac
183index e382c7480..883245553 100644183index e382c7480d..883245553d 100644
184--- a/configure.ac184--- a/configure.ac
185+++ b/configure.ac185+++ b/configure.ac
186@@ -443,6 +443,18 @@ AC_CHECK_HEADER([util.h], [186@@ -443,6 +443,18 @@ AC_CHECK_HEADER([util.h], [
@@ -204,7 +204,7 @@ index e382c7480..883245553 100644
204 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"204 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
205diff --git a/grub-core/osdep/efivar.c b/grub-core/osdep/efivar.c205diff --git a/grub-core/osdep/efivar.c b/grub-core/osdep/efivar.c
206new file mode 100644206new file mode 100644
207index 000000000..d2750e252207index 0000000000..d2750e2524
208--- /dev/null208--- /dev/null
209+++ b/grub-core/osdep/efivar.c209+++ b/grub-core/osdep/efivar.c
210@@ -0,0 +1,3 @@210@@ -0,0 +1,3 @@
@@ -213,7 +213,7 @@ index 000000000..d2750e252
213+#endif213+#endif
214diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c214diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
215new file mode 100644215new file mode 100644
216index 000000000..4a58328b4216index 0000000000..4a58328b42
217--- /dev/null217--- /dev/null
218+++ b/grub-core/osdep/unix/efivar.c218+++ b/grub-core/osdep/unix/efivar.c
219@@ -0,0 +1,508 @@219@@ -0,0 +1,508 @@
@@ -726,7 +726,7 @@ index 000000000..4a58328b4
726+726+
727+#endif /* HAVE_EFIVAR */727+#endif /* HAVE_EFIVAR */
728diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c728diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
729index 9c439326a..b561174ea 100644729index 9c439326a0..b561174ea9 100644
730--- a/grub-core/osdep/unix/platform.c730--- a/grub-core/osdep/unix/platform.c
731+++ b/grub-core/osdep/unix/platform.c731+++ b/grub-core/osdep/unix/platform.c
732@@ -19,15 +19,12 @@732@@ -19,15 +19,12 @@
@@ -856,7 +856,7 @@ index 9c439326a..b561174ea 100644
856 856
857 void857 void
858diff --git a/include/grub/util/install.h b/include/grub/util/install.h858diff --git a/include/grub/util/install.h b/include/grub/util/install.h
859index 8aeb5c4f2..a521f1663 100644859index 8aeb5c4f20..a521f1663f 100644
860--- a/include/grub/util/install.h860--- a/include/grub/util/install.h
861+++ b/include/grub/util/install.h861+++ b/include/grub/util/install.h
862@@ -219,6 +219,11 @@ grub_install_get_default_x86_platform (void);862@@ -219,6 +219,11 @@ grub_install_get_default_x86_platform (void);
@@ -872,7 +872,7 @@ index 8aeb5c4f2..a521f1663 100644
872 grub_install_register_efi (grub_device_t efidir_grub_dev,872 grub_install_register_efi (grub_device_t efidir_grub_dev,
873 const char *efifile_path,873 const char *efifile_path,
874diff --git a/util/grub-install.c b/util/grub-install.c874diff --git a/util/grub-install.c b/util/grub-install.c
875index 4bad8de61..63462e4e0 100644875index 4bad8de612..63462e4e09 100644
876--- a/util/grub-install.c876--- a/util/grub-install.c
877+++ b/util/grub-install.c877+++ b/util/grub-install.c
878@@ -2084,7 +2084,7 @@ main (int argc, char *argv[])878@@ -2084,7 +2084,7 @@ main (int argc, char *argv[])
diff --git a/debian/patches/efinet-set-dns-from-uefi-proto.patch b/debian/patches/efinet-set-dns-from-uefi-proto.patch
index e500199..730ad3a 100644
--- a/debian/patches/efinet-set-dns-from-uefi-proto.patch
+++ b/debian/patches/efinet-set-dns-from-uefi-proto.patch
@@ -1,4 +1,4 @@
1From 6a014b8846142de23cb5254f653facc8f3456a8c Mon Sep 17 00:00:00 20011From 747f4241696cf526d68ff7de1efac04e1871567b Mon Sep 17 00:00:00 2001
2From: Michael Chang <mchang@suse.com>2From: Michael Chang <mchang@suse.com>
3Date: Thu, 27 Oct 2016 17:43:21 -04003Date: Thu, 27 Oct 2016 17:43:21 -0400
4Subject: efinet: Setting DNS server from UEFI protocol4Subject: efinet: Setting DNS server from UEFI protocol
@@ -35,7 +35,7 @@ Patch-Name: efinet-set-dns-from-uefi-proto.patch
35 2 files changed, 239 insertions(+)35 2 files changed, 239 insertions(+)
3636
37diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c37diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
38index 2d3b00f0e..82a28fb6e 10064438index 2d3b00f0e1..82a28fb6e9 100644
39--- a/grub-core/net/drivers/efi/efinet.c39--- a/grub-core/net/drivers/efi/efinet.c
40+++ b/grub-core/net/drivers/efi/efinet.c40+++ b/grub-core/net/drivers/efi/efinet.c
41@@ -30,6 +30,8 @@ GRUB_MOD_LICENSE ("GPLv3+");41@@ -30,6 +30,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
@@ -244,7 +244,7 @@ index 2d3b00f0e..82a28fb6e 100644
244 }244 }
245 245
246diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h246diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
247index 664cea37b..75befd10e 100644247index 664cea37b5..75befd10e5 100644
248--- a/include/grub/efi/api.h248--- a/include/grub/efi/api.h
249+++ b/include/grub/efi/api.h249+++ b/include/grub/efi/api.h
250@@ -334,6 +334,16 @@250@@ -334,6 +334,16 @@
diff --git a/debian/patches/efinet-set-network-from-uefi-devpath.patch b/debian/patches/efinet-set-network-from-uefi-devpath.patch
index bba19a4..b844b7f 100644
--- a/debian/patches/efinet-set-network-from-uefi-devpath.patch
+++ b/debian/patches/efinet-set-network-from-uefi-devpath.patch
@@ -1,4 +1,4 @@
1From 1bacee679cef6c6f56af81108288c6468d8f6295 Mon Sep 17 00:00:00 20011From 36785761748dd2ba5a38ec8c7fc412c8f875b0e2 Mon Sep 17 00:00:00 2001
2From: Michael Chang <mchang@suse.com>2From: Michael Chang <mchang@suse.com>
3Date: Thu, 27 Oct 2016 17:43:05 -04003Date: Thu, 27 Oct 2016 17:43:05 -0400
4Subject: efinet: Setting network from UEFI device path4Subject: efinet: Setting network from UEFI device path
@@ -34,7 +34,7 @@ Patch-Name: efinet-set-network-from-uefi-devpath.patch
34 2 files changed, 270 insertions(+), 9 deletions(-)34 2 files changed, 270 insertions(+), 9 deletions(-)
3535
36diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c36diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
37index fc90415f2..2d3b00f0e 10064437index fc90415f29..2d3b00f0e1 100644
38--- a/grub-core/net/drivers/efi/efinet.c38--- a/grub-core/net/drivers/efi/efinet.c
39+++ b/grub-core/net/drivers/efi/efinet.c39+++ b/grub-core/net/drivers/efi/efinet.c
40@@ -23,6 +23,7 @@40@@ -23,6 +23,7 @@
@@ -358,7 +358,7 @@ index fc90415f2..2d3b00f0e 100644
358 }358 }
359 }359 }
360diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h360diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
361index ca6cdc159..664cea37b 100644361index ca6cdc1596..664cea37b5 100644
362--- a/include/grub/efi/api.h362--- a/include/grub/efi/api.h
363+++ b/include/grub/efi/api.h363+++ b/include/grub/efi/api.h
364@@ -825,6 +825,8 @@ struct grub_efi_ipv4_device_path364@@ -825,6 +825,8 @@ struct grub_efi_ipv4_device_path
diff --git a/debian/patches/efinet-uefi-ipv6-pxe-support.patch b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
index 531e73d..f500a04 100644
--- a/debian/patches/efinet-uefi-ipv6-pxe-support.patch
+++ b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
@@ -1,4 +1,4 @@
1From 9afb0c174814d7235fc18623725cd037a76ff541 Mon Sep 17 00:00:00 20011From aa6426e9b8ce15c152af7d20686b26caadb2f28a Mon Sep 17 00:00:00 2001
2From: Michael Chang <mchang@suse.com>2From: Michael Chang <mchang@suse.com>
3Date: Thu, 27 Oct 2016 17:41:21 -04003Date: Thu, 27 Oct 2016 17:41:21 -0400
4Subject: efinet: UEFI IPv6 PXE support4Subject: efinet: UEFI IPv6 PXE support
@@ -17,7 +17,7 @@ Patch-Name: efinet-uefi-ipv6-pxe-support.patch
17 2 files changed, 73 insertions(+), 6 deletions(-)17 2 files changed, 73 insertions(+), 6 deletions(-)
1818
19diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c19diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
20index 5388f952b..fc90415f2 10064420index 5388f952ba..fc90415f29 100644
21--- a/grub-core/net/drivers/efi/efinet.c21--- a/grub-core/net/drivers/efi/efinet.c
22+++ b/grub-core/net/drivers/efi/efinet.c22+++ b/grub-core/net/drivers/efi/efinet.c
23@@ -378,11 +378,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,23@@ -378,11 +378,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
@@ -52,7 +52,7 @@ index 5388f952b..fc90415f2 100644
52 }52 }
53 }53 }
54diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h54diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
55index addcbfa8f..ca6cdc159 10064455index addcbfa8fb..ca6cdc1596 100644
56--- a/include/grub/efi/api.h56--- a/include/grub/efi/api.h
57+++ b/include/grub/efi/api.h57+++ b/include/grub/efi/api.h
58@@ -1452,14 +1452,67 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output58@@ -1452,14 +1452,67 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output
diff --git a/debian/patches/gettext-quiet.patch b/debian/patches/gettext-quiet.patch
index 11a7e6f..7248d6c 100644
--- a/debian/patches/gettext-quiet.patch
+++ b/debian/patches/gettext-quiet.patch
@@ -1,4 +1,4 @@
1From 259b7fa08b66717709735370d05fc9eb64682484 Mon Sep 17 00:00:00 20011From 510fb7381e095c4212907e6b45e58f24e1889acf Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:02 +00003Date: Mon, 13 Jan 2014 12:13:02 +0000
4Subject: Silence error messages when translations are unavailable4Subject: Silence error messages when translations are unavailable
@@ -13,7 +13,7 @@ Patch-Name: gettext-quiet.patch
13 1 file changed, 5 insertions(+)13 1 file changed, 5 insertions(+)
1414
15diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c15diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
16index 4d02e62c1..2a19389f2 10064416index 4d02e62c10..2a19389f2a 100644
17--- a/grub-core/gettext/gettext.c17--- a/grub-core/gettext/gettext.c
18+++ b/grub-core/gettext/gettext.c18+++ b/grub-core/gettext/gettext.c
19@@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,19@@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
diff --git a/debian/patches/gfxpayload-dynamic.patch b/debian/patches/gfxpayload-dynamic.patch
index 8545c4d..826c65a 100644
--- a/debian/patches/gfxpayload-dynamic.patch
+++ b/debian/patches/gfxpayload-dynamic.patch
@@ -1,4 +1,4 @@
1From 2e91d5ab9adfb6a86b82b89715d6d9a7b3b52005 Mon Sep 17 00:00:00 20011From 66ef92ba8ac39f919415f8687b8d0d9032c4a079 Mon Sep 17 00:00:00 2001
2From: Evan Broder <evan@ebroder.net>2From: Evan Broder <evan@ebroder.net>
3Date: Mon, 13 Jan 2014 12:13:29 +00003Date: Mon, 13 Jan 2014 12:13:29 +0000
4Subject: Add configure option to enable gfxpayload=keep dynamically4Subject: Add configure option to enable gfxpayload=keep dynamically
@@ -23,7 +23,7 @@ Patch-Name: gfxpayload-dynamic.patch
23 create mode 100644 grub-core/commands/i386/pc/hwmatch.c23 create mode 100644 grub-core/commands/i386/pc/hwmatch.c
2424
25diff --git a/configure.ac b/configure.ac25diff --git a/configure.ac b/configure.ac
26index 7dda5bb32..dbc429ce0 10064426index 7dda5bb32b..dbc429ce0a 100644
27--- a/configure.ac27--- a/configure.ac
28+++ b/configure.ac28+++ b/configure.ac
29@@ -1879,6 +1879,17 @@ else29@@ -1879,6 +1879,17 @@ else
@@ -45,7 +45,7 @@ index 7dda5bb32..dbc429ce0 100644
45 45
46 AC_SUBST([FONT_SOURCE])46 AC_SUBST([FONT_SOURCE])
47diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def47diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
48index 474a63e68..aadb4cdff 10064448index 474a63e68c..aadb4cdff8 100644
49--- a/grub-core/Makefile.core.def49--- a/grub-core/Makefile.core.def
50+++ b/grub-core/Makefile.core.def50+++ b/grub-core/Makefile.core.def
51@@ -971,6 +971,14 @@ module = {51@@ -971,6 +971,14 @@ module = {
@@ -65,7 +65,7 @@ index 474a63e68..aadb4cdff 100644
65 common = commands/keystatus.c;65 common = commands/keystatus.c;
66diff --git a/grub-core/commands/i386/pc/hwmatch.c b/grub-core/commands/i386/pc/hwmatch.c66diff --git a/grub-core/commands/i386/pc/hwmatch.c b/grub-core/commands/i386/pc/hwmatch.c
67new file mode 10064467new file mode 100644
68index 000000000..6de07cecc68index 0000000000..6de07cecc8
69--- /dev/null69--- /dev/null
70+++ b/grub-core/commands/i386/pc/hwmatch.c70+++ b/grub-core/commands/i386/pc/hwmatch.c
71@@ -0,0 +1,146 @@71@@ -0,0 +1,146 @@
@@ -216,7 +216,7 @@ index 000000000..6de07cecc
216+ grub_unregister_command (cmd);216+ grub_unregister_command (cmd);
217+}217+}
218diff --git a/include/grub/file.h b/include/grub/file.h218diff --git a/include/grub/file.h b/include/grub/file.h
219index 31567483c..e3c4cae2b 100644219index 31567483cc..e3c4cae2b5 100644
220--- a/include/grub/file.h220--- a/include/grub/file.h
221+++ b/include/grub/file.h221+++ b/include/grub/file.h
222@@ -122,6 +122,7 @@ enum grub_file_type222@@ -122,6 +122,7 @@ enum grub_file_type
@@ -228,7 +228,7 @@ index 31567483c..e3c4cae2b 100644
228 GRUB_FILE_TYPE_LOADENV,228 GRUB_FILE_TYPE_LOADENV,
229 GRUB_FILE_TYPE_SAVEENV,229 GRUB_FILE_TYPE_SAVEENV,
230diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in230diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
231index 2be66c702..09393c28e 100644231index 2be66c7028..09393c28ee 100644
232--- a/util/grub.d/10_linux.in232--- a/util/grub.d/10_linux.in
233+++ b/util/grub.d/10_linux.in233+++ b/util/grub.d/10_linux.in
234@@ -23,6 +23,7 @@ datarootdir="@datarootdir@"234@@ -23,6 +23,7 @@ datarootdir="@datarootdir@"
@@ -290,7 +290,7 @@ index 2be66c702..09393c28e 100644
290 # yet, so it's empty. In a submenu it will be equal to '\t' (one tab).290 # yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
291 submenu_indentation=""291 submenu_indentation=""
292diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in292diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
293index 548e14856..fc99f16e7 100755293index ec4b49d9d7..8cd7d12851 100755
294--- a/util/grub.d/10_linux_zfs.in294--- a/util/grub.d/10_linux_zfs.in
295+++ b/util/grub.d/10_linux_zfs.in295+++ b/util/grub.d/10_linux_zfs.in
296@@ -22,6 +22,7 @@ datarootdir="@datarootdir@"296@@ -22,6 +22,7 @@ datarootdir="@datarootdir@"
@@ -301,7 +301,7 @@ index 548e14856..fc99f16e7 100755
301 301
302 . "${pkgdatadir}/grub-mkconfig_lib"302 . "${pkgdatadir}/grub-mkconfig_lib"
303 303
304@@ -713,6 +714,41 @@ generate_grub_menu_metadata() {304@@ -716,6 +717,41 @@ generate_grub_menu_metadata() {
305 done305 done
306 }306 }
307 307
@@ -343,7 +343,7 @@ index 548e14856..fc99f16e7 100755
343 # Cache for prepare_grub_to_access_device call343 # Cache for prepare_grub_to_access_device call
344 # $1: boot_device344 # $1: boot_device
345 # $2: submenu_level345 # $2: submenu_level
346@@ -773,9 +809,11 @@ zfs_linux_entry () {346@@ -776,9 +812,11 @@ zfs_linux_entry () {
347 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then347 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
348 echo "${submenu_indentation} load_video"348 echo "${submenu_indentation} load_video"
349 fi349 fi
@@ -358,7 +358,7 @@ index 548e14856..fc99f16e7 100755
358 fi358 fi
359 359
360 echo "${submenu_indentation} insmod gzio"360 echo "${submenu_indentation} insmod gzio"
361@@ -838,6 +876,8 @@ generate_grub_menu() {361@@ -841,6 +879,8 @@ generate_grub_menu() {
362 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"362 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
363 fi363 fi
364 364
diff --git a/debian/patches/gfxpayload-keep-default.patch b/debian/patches/gfxpayload-keep-default.patch
index 114ce62..23b668f 100644
--- a/debian/patches/gfxpayload-keep-default.patch
+++ b/debian/patches/gfxpayload-keep-default.patch
@@ -1,4 +1,4 @@
1From 6da735cfaac928da6dc1283a15a669b1ddd07979 Mon Sep 17 00:00:00 20011From e848d8754210095660b229f4639a065e8d96a0d0 Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Tue, 31 Mar 2020 15:09:45 +02003Date: Tue, 31 Mar 2020 15:09:45 +0200
4Subject: Disable gfxpayload=keep by default4Subject: Disable gfxpayload=keep by default
@@ -24,7 +24,7 @@ Patch-Name: gfxpayload-keep-default.patch
24 2 files changed, 8 deletions(-)24 2 files changed, 8 deletions(-)
2525
26diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in26diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
27index a75096609..f839b3b55 10064427index a75096609a..f839b3b55f 100644
28--- a/util/grub.d/10_linux.in28--- a/util/grub.d/10_linux.in
29+++ b/util/grub.d/10_linux.in29+++ b/util/grub.d/10_linux.in
30@@ -118,10 +118,6 @@ linux_entry ()30@@ -118,10 +118,6 @@ linux_entry ()
@@ -39,10 +39,10 @@ index a75096609..f839b3b55 100644
39 if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then39 if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
40 echo " load_video" | sed "s/^/$submenu_indentation/"40 echo " load_video" | sed "s/^/$submenu_indentation/"
41diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in41diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
42index f50e1231a..d27634738 10075542index 5ec65fa941..b24587f0a5 100755
43--- a/util/grub.d/10_linux_zfs.in43--- a/util/grub.d/10_linux_zfs.in
44+++ b/util/grub.d/10_linux_zfs.in44+++ b/util/grub.d/10_linux_zfs.in
45@@ -741,10 +741,6 @@ zfs_linux_entry () {45@@ -744,10 +744,6 @@ zfs_linux_entry () {
46 # FIXME: We need an interface to select vesafb in case efifb can't be used.46 # FIXME: We need an interface to select vesafb in case efifb can't be used.
47 if [ "${GRUB_GFXPAYLOAD_LINUX}" = "" ]; then47 if [ "${GRUB_GFXPAYLOAD_LINUX}" = "" ]; then
48 echo "${submenu_indentation} load_video"48 echo "${submenu_indentation} load_video"
diff --git a/debian/patches/grub-install-pvxen-paths.patch b/debian/patches/grub-install-pvxen-paths.patch
index a160a43..d2002ff 100644
--- a/debian/patches/grub-install-pvxen-paths.patch
+++ b/debian/patches/grub-install-pvxen-paths.patch
@@ -1,4 +1,4 @@
1From 4e813c89c93bba7da480824d617e87659295841b Mon Sep 17 00:00:00 20011From 34f053ee85aaa87fd40682a0f9c4e8c5858eeb55 Mon Sep 17 00:00:00 2001
2From: Ian Campbell <ijc@hellion.org.uk>2From: Ian Campbell <ijc@hellion.org.uk>
3Date: Sat, 6 Sep 2014 12:20:12 +01003Date: Sat, 6 Sep 2014 12:20:12 +0100
4Subject: grub-install: Install PV Xen binaries into the upstream specified4Subject: grub-install: Install PV Xen binaries into the upstream specified
@@ -28,7 +28,7 @@ v2: Respect bootdir, create /boot/xen as needed.
28 1 file changed, 22 insertions(+), 2 deletions(-)28 1 file changed, 22 insertions(+), 2 deletions(-)
2929
30diff --git a/util/grub-install.c b/util/grub-install.c30diff --git a/util/grub-install.c b/util/grub-install.c
31index 70d6700de..64c292383 10064431index 70d6700de8..64c292383f 100644
32--- a/util/grub-install.c32--- a/util/grub-install.c
33+++ b/util/grub-install.c33+++ b/util/grub-install.c
34@@ -2058,6 +2058,28 @@ main (int argc, char *argv[])34@@ -2058,6 +2058,28 @@ main (int argc, char *argv[])
diff --git a/debian/patches/grub-legacy-0-based-partitions.patch b/debian/patches/grub-legacy-0-based-partitions.patch
index 2039c3f..09439dc 100644
--- a/debian/patches/grub-legacy-0-based-partitions.patch
+++ b/debian/patches/grub-legacy-0-based-partitions.patch
@@ -13,7 +13,7 @@ Patch-Name: grub-legacy-0-based-partitions.patch
13 1 file changed, 14 insertions(+)13 1 file changed, 14 insertions(+)
1414
15diff --git a/util/getroot.c b/util/getroot.c15diff --git a/util/getroot.c b/util/getroot.c
16index 847406fba..cdd41153c 10064416index 847406fbab..cdd41153c5 100644
17--- a/util/getroot.c17--- a/util/getroot.c
18+++ b/util/getroot.c18+++ b/util/getroot.c
19@@ -245,6 +245,20 @@ find_partition (grub_disk_t dsk __attribute__ ((unused)),19@@ -245,6 +245,20 @@ find_partition (grub_disk_t dsk __attribute__ ((unused)),
diff --git a/debian/patches/grub.cfg-400.patch b/debian/patches/grub.cfg-400.patch
index 1fee91a..4731767 100644
--- a/debian/patches/grub.cfg-400.patch
+++ b/debian/patches/grub.cfg-400.patch
@@ -9,7 +9,7 @@ Patch-Name: grub.cfg-400.patch
9 1 file changed, 4 insertions(+)9 1 file changed, 4 insertions(+)
1010
11diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in11diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
12index 9f477ff05..45cd4cc54 10064412index 9f477ff054..45cd4cc541 100644
13--- a/util/grub-mkconfig.in13--- a/util/grub-mkconfig.in
14+++ b/util/grub-mkconfig.in14+++ b/util/grub-mkconfig.in
15@@ -276,6 +276,10 @@ for i in "${grub_mkconfig_dir}"/* ; do15@@ -276,6 +276,10 @@ for i in "${grub_mkconfig_dir}"/* ; do
diff --git a/debian/patches/ieee1275-clear-reset.patch b/debian/patches/ieee1275-clear-reset.patch
index 1d082e6..1bd0bfc 100644
--- a/debian/patches/ieee1275-clear-reset.patch
+++ b/debian/patches/ieee1275-clear-reset.patch
@@ -1,4 +1,4 @@
1From 07e29f9e7e317d74d41fed30c6a8ade4f301652c Mon Sep 17 00:00:00 20011From 406f5fc7f97315af793414d9e0ca14972bf6de0f Mon Sep 17 00:00:00 2001
2From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>2From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
3Date: Thu, 25 Sep 2014 18:41:29 -03003Date: Thu, 25 Sep 2014 18:41:29 -0300
4Subject: Include a text attribute reset in the clear command for ppc4Subject: Include a text attribute reset in the clear command for ppc
@@ -18,7 +18,7 @@ Patch-Name: ieee1275-clear-reset.patch
18 1 file changed, 1 insertion(+), 1 deletion(-)18 1 file changed, 1 insertion(+), 1 deletion(-)
1919
20diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c20diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
21index d317efa36..63892ad42 10064421index d317efa368..63892ad427 100644
22--- a/grub-core/term/terminfo.c22--- a/grub-core/term/terminfo.c
23+++ b/grub-core/term/terminfo.c23+++ b/grub-core/term/terminfo.c
24@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,24@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
diff --git a/debian/patches/ignore-grub_func_test-failures.patch b/debian/patches/ignore-grub_func_test-failures.patch
index cbbd3b2..9cd2c60 100644
--- a/debian/patches/ignore-grub_func_test-failures.patch
+++ b/debian/patches/ignore-grub_func_test-failures.patch
@@ -1,4 +1,4 @@
1From 11457a76c942775508953575e1b284f4c03ee192 Mon Sep 17 00:00:00 20011From c944dea56be3cce4bf4895a9915d35e75099f420 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Mon, 13 Jan 2014 12:13:32 +00003Date: Mon, 13 Jan 2014 12:13:32 +0000
4Subject: Ignore functional test failures for now as they are broken4Subject: Ignore functional test failures for now as they are broken
@@ -14,7 +14,7 @@ Patch-Name: ignore-grub_func_test-failures.patch
14 1 file changed, 3 insertions(+), 1 deletion(-)14 1 file changed, 3 insertions(+), 1 deletion(-)
1515
16diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in16diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in
17index c67f9e422..728cd6e06 10064417index c67f9e4225..728cd6e066 100644
18--- a/tests/grub_func_test.in18--- a/tests/grub_func_test.in
19+++ b/tests/grub_func_test.in19+++ b/tests/grub_func_test.in
20@@ -16,6 +16,8 @@ out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/b20@@ -16,6 +16,8 @@ out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/b
diff --git a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
index b16f128..82991d0 100644
--- a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
+++ b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
@@ -1,4 +1,4 @@
1From 125b4317bafb66a6e9381041102c7d789c296ea4 Mon Sep 17 00:00:00 20011From d6fd02df51bc1b062fe70b2c4f6d33728d4219ee Mon Sep 17 00:00:00 2001
2From: Ian Campbell <ijc@debian.org>2From: Ian Campbell <ijc@debian.org>
3Date: Sun, 30 Nov 2014 12:12:52 +00003Date: Sun, 30 Nov 2014 12:12:52 +0000
4Subject: Arrange to insmod xzio and lzopio when booting a kernel as a Xen4Subject: Arrange to insmod xzio and lzopio when booting a kernel as a Xen
@@ -21,7 +21,7 @@ Patch-Name: insmod-xzio-and-lzopio-on-xen.patch
21 2 files changed, 2 insertions(+)21 2 files changed, 2 insertions(+)
2222
23diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in23diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
24index 2c418c5ec..85b30084a 10064424index 2c418c5ec8..85b30084ad 100644
25--- a/util/grub.d/10_linux.in25--- a/util/grub.d/10_linux.in
26+++ b/util/grub.d/10_linux.in26+++ b/util/grub.d/10_linux.in
27@@ -166,6 +166,7 @@ linux_entry ()27@@ -166,6 +166,7 @@ linux_entry ()
@@ -33,10 +33,10 @@ index 2c418c5ec..85b30084a 100644
33 if [ x$dirname = x/ ]; then33 if [ x$dirname = x/ ]; then
34 if [ -z "${prepare_root_cache}" ]; then34 if [ -z "${prepare_root_cache}" ]; then
35diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in35diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
36index b068f0e96..efdb8afae 10075536index 4477fa6061..4c48abef01 100755
37--- a/util/grub.d/10_linux_zfs.in37--- a/util/grub.d/10_linux_zfs.in
38+++ b/util/grub.d/10_linux_zfs.in38+++ b/util/grub.d/10_linux_zfs.in
39@@ -835,6 +835,7 @@ zfs_linux_entry () {39@@ -838,6 +838,7 @@ zfs_linux_entry () {
40 fi40 fi
41 41
42 echo "${submenu_indentation} insmod gzio"42 echo "${submenu_indentation} insmod gzio"
diff --git a/debian/patches/install-efi-fallback.patch b/debian/patches/install-efi-fallback.patch
index 6c0f0cf..c4cf303 100644
--- a/debian/patches/install-efi-fallback.patch
+++ b/debian/patches/install-efi-fallback.patch
@@ -1,4 +1,4 @@
1From 342cbb4b33a6d47e7c1b645ace365203f31165e2 Mon Sep 17 00:00:00 20011From 70a2610a5392e09978ff7ccd9d69c942f60c522d Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:05 +00003Date: Mon, 13 Jan 2014 12:13:05 +0000
4Subject: Fall back to non-EFI if booted using EFI but -efi is missing4Subject: Fall back to non-EFI if booted using EFI but -efi is missing
@@ -19,7 +19,7 @@ Patch-Name: install-efi-fallback.patch
19 1 file changed, 35 insertions(+), 5 deletions(-)19 1 file changed, 35 insertions(+), 5 deletions(-)
2020
21diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c21diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
22index e28a79dab..2e7f72086 10064422index e28a79dab3..2e7f720869 100644
23--- a/grub-core/osdep/linux/platform.c23--- a/grub-core/osdep/linux/platform.c
24+++ b/grub-core/osdep/linux/platform.c24+++ b/grub-core/osdep/linux/platform.c
25@@ -19,10 +19,12 @@25@@ -19,10 +19,12 @@
diff --git a/debian/patches/install-efi-ubuntu-flavours.patch b/debian/patches/install-efi-ubuntu-flavours.patch
index 31a74c8..d666dae 100644
--- a/debian/patches/install-efi-ubuntu-flavours.patch
+++ b/debian/patches/install-efi-ubuntu-flavours.patch
@@ -1,4 +1,4 @@
1From 6def03933e04c3f0d3bbcb37b96dc08d1ba67d74 Mon Sep 17 00:00:00 20011From dc18a17ef4f437fe9edfcf58747b70690e4ad32e Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:27 +00003Date: Mon, 13 Jan 2014 12:13:27 +0000
4Subject: Cope with Kubuntu setting GRUB_DISTRIBUTOR4Subject: Cope with Kubuntu setting GRUB_DISTRIBUTOR
@@ -17,7 +17,7 @@ Patch-Name: install-efi-ubuntu-flavours.patch
17 1 file changed, 2 insertions(+)17 1 file changed, 2 insertions(+)
1818
19diff --git a/util/grub-install.c b/util/grub-install.c19diff --git a/util/grub-install.c b/util/grub-install.c
20index e1e40cf2b..f0d59c180 10064420index e1e40cf2b5..f0d59c1809 100644
21--- a/util/grub-install.c21--- a/util/grub-install.c
22+++ b/util/grub-install.c22+++ b/util/grub-install.c
23@@ -1115,6 +1115,8 @@ main (int argc, char *argv[])23@@ -1115,6 +1115,8 @@ main (int argc, char *argv[])
diff --git a/debian/patches/install-locale-langpack.patch b/debian/patches/install-locale-langpack.patch
index 4537170..91dd7c4 100644
--- a/debian/patches/install-locale-langpack.patch
+++ b/debian/patches/install-locale-langpack.patch
@@ -1,4 +1,4 @@
1From 4f4b15148b61872395936b083eae7b843ac7d373 Mon Sep 17 00:00:00 20011From 7b60caf762c21f914b0d55b1d1b05dd54106e040 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:07 +00003Date: Mon, 13 Jan 2014 12:13:07 +0000
4Subject: Prefer translations from Ubuntu language packs if available4Subject: Prefer translations from Ubuntu language packs if available
@@ -13,7 +13,7 @@ Patch-Name: install-locale-langpack.patch
13 1 file changed, 30 insertions(+), 7 deletions(-)13 1 file changed, 30 insertions(+), 7 deletions(-)
1414
15diff --git a/util/grub-install-common.c b/util/grub-install-common.c15diff --git a/util/grub-install-common.c b/util/grub-install-common.c
16index ca0ac612a..fdfe2c7ea 10064416index ca0ac612ac..fdfe2c7ead 100644
17--- a/util/grub-install-common.c17--- a/util/grub-install-common.c
18+++ b/util/grub-install-common.c18+++ b/util/grub-install-common.c
19@@ -609,17 +609,25 @@ get_localedir (void)19@@ -609,17 +609,25 @@ get_localedir (void)
diff --git a/debian/patches/install-powerpc-machtypes.patch b/debian/patches/install-powerpc-machtypes.patch
index bbc8d71..c94c436 100644
--- a/debian/patches/install-powerpc-machtypes.patch
+++ b/debian/patches/install-powerpc-machtypes.patch
@@ -1,4 +1,4 @@
1From 6468fe3eb25e597acd0c80e3f7b5930472328d89 Mon Sep 17 00:00:00 20011From 15fb6fc1774a74152ad3070d2f14b88c00759577 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Tue, 28 Jan 2014 14:40:02 +00003Date: Tue, 28 Jan 2014 14:40:02 +0000
4Subject: Port yaboot logic for various powerpc machine types4Subject: Port yaboot logic for various powerpc machine types
@@ -25,7 +25,7 @@ Patch-Name: install-powerpc-machtypes.patch
25 6 files changed, 119 insertions(+), 6 deletions(-)25 6 files changed, 119 insertions(+), 6 deletions(-)
2626
27diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c27diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c
28index a7dafd85a..6c293ed2d 10064428index a7dafd85a9..6c293ed2d0 100644
29--- a/grub-core/osdep/basic/platform.c29--- a/grub-core/osdep/basic/platform.c
30+++ b/grub-core/osdep/basic/platform.c30+++ b/grub-core/osdep/basic/platform.c
31@@ -30,3 +30,8 @@ grub_install_get_default_x86_platform (void)31@@ -30,3 +30,8 @@ grub_install_get_default_x86_platform (void)
@@ -38,7 +38,7 @@ index a7dafd85a..6c293ed2d 100644
38+ return "generic";38+ return "generic";
39+}39+}
40diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c40diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
41index 2e7f72086..5b37366d4 10064441index 2e7f720869..5b37366d4d 100644
42--- a/grub-core/osdep/linux/platform.c42--- a/grub-core/osdep/linux/platform.c
43+++ b/grub-core/osdep/linux/platform.c43+++ b/grub-core/osdep/linux/platform.c
44@@ -24,6 +24,7 @@44@@ -24,6 +24,7 @@
@@ -125,7 +125,7 @@ index 2e7f72086..5b37366d4 100644
125+ return machtype;125+ return machtype;
126+}126+}
127diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c127diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
128index 55b8f4016..9c439326a 100644128index 55b8f40162..9c439326a0 100644
129--- a/grub-core/osdep/unix/platform.c129--- a/grub-core/osdep/unix/platform.c
130+++ b/grub-core/osdep/unix/platform.c130+++ b/grub-core/osdep/unix/platform.c
131@@ -218,13 +218,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,131@@ -218,13 +218,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
@@ -165,7 +165,7 @@ index 55b8f4016..9c439326a 100644
165 165
166 free (boot_device);166 free (boot_device);
167diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c167diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
168index 7eb53fe01..e19a3d9a8 100644168index 7eb53fe01b..e19a3d9a8a 100644
169--- a/grub-core/osdep/windows/platform.c169--- a/grub-core/osdep/windows/platform.c
170+++ b/grub-core/osdep/windows/platform.c170+++ b/grub-core/osdep/windows/platform.c
171@@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void)171@@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void)
@@ -182,7 +182,7 @@ index 7eb53fe01..e19a3d9a8 100644
182 get_efi_variable (const wchar_t *varname, ssize_t *len)182 get_efi_variable (const wchar_t *varname, ssize_t *len)
183 {183 {
184diff --git a/include/grub/util/install.h b/include/grub/util/install.h184diff --git a/include/grub/util/install.h b/include/grub/util/install.h
185index 2631b1074..8aeb5c4f2 100644185index 2631b10745..8aeb5c4f20 100644
186--- a/include/grub/util/install.h186--- a/include/grub/util/install.h
187+++ b/include/grub/util/install.h187+++ b/include/grub/util/install.h
188@@ -216,6 +216,9 @@ grub_install_get_default_arm_platform (void);188@@ -216,6 +216,9 @@ grub_install_get_default_arm_platform (void);
@@ -196,7 +196,7 @@ index 2631b1074..8aeb5c4f2 100644
196 grub_install_register_efi (grub_device_t efidir_grub_dev,196 grub_install_register_efi (grub_device_t efidir_grub_dev,
197 const char *efifile_path,197 const char *efifile_path,
198diff --git a/util/grub-install.c b/util/grub-install.c198diff --git a/util/grub-install.c b/util/grub-install.c
199index f0d59c180..70d6700de 100644199index f0d59c1809..70d6700de8 100644
200--- a/util/grub-install.c200--- a/util/grub-install.c
201+++ b/util/grub-install.c201+++ b/util/grub-install.c
202@@ -1177,7 +1177,18 @@ main (int argc, char *argv[])202@@ -1177,7 +1177,18 @@ main (int argc, char *argv[])
diff --git a/debian/patches/install-stage2-confusion.patch b/debian/patches/install-stage2-confusion.patch
index a803a68..6451234 100644
--- a/debian/patches/install-stage2-confusion.patch
+++ b/debian/patches/install-stage2-confusion.patch
@@ -1,4 +1,4 @@
1From d9969cb0267a40684bf7a60d70bfc3fc8a962a90 Mon Sep 17 00:00:00 20011From 65b6b662d6379652ca1bef129a686494669997a1 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Mon, 13 Jan 2014 12:12:58 +00003Date: Mon, 13 Jan 2014 12:12:58 +0000
4Subject: If GRUB Legacy is still around, tell packaging to ignore it4Subject: If GRUB Legacy is still around, tell packaging to ignore it
@@ -13,7 +13,7 @@ Patch-Name: install-stage2-confusion.patch
13 1 file changed, 14 insertions(+)13 1 file changed, 14 insertions(+)
1414
15diff --git a/util/grub-install.c b/util/grub-install.c15diff --git a/util/grub-install.c b/util/grub-install.c
16index 8a55ad4b8..3b4606eef 10064416index 8a55ad4b8d..3b4606eef1 100644
17--- a/util/grub-install.c17--- a/util/grub-install.c
18+++ b/util/grub-install.c18+++ b/util/grub-install.c
19@@ -42,6 +42,7 @@19@@ -42,6 +42,7 @@
diff --git a/debian/patches/maybe-quiet.patch b/debian/patches/maybe-quiet.patch
index 64e8d68..3706357 100644
--- a/debian/patches/maybe-quiet.patch
+++ b/debian/patches/maybe-quiet.patch
@@ -1,4 +1,4 @@
1From f93cd4fda2916af2b70228878f97cb7bbdeb234d Mon Sep 17 00:00:00 20011From e5e64092c5dfeab61f1de2ef270827ba84f88c0e Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Tue, 31 Mar 2020 15:20:15 +02003Date: Tue, 31 Mar 2020 15:20:15 +0200
4Subject: Add configure option to reduce visual clutter at boot time4Subject: Add configure option to reduce visual clutter at boot time
@@ -47,7 +47,7 @@ Patch-Name: maybe-quiet.patch
47 10 files changed, 118 insertions(+), 8 deletions(-)47 10 files changed, 118 insertions(+), 8 deletions(-)
4848
49diff --git a/config.h.in b/config.h.in49diff --git a/config.h.in b/config.h.in
50index 9e8f9911b..d2c4ce8e5 10064450index 9e8f9911b1..d2c4ce8e51 100644
51--- a/config.h.in51--- a/config.h.in
52+++ b/config.h.in52+++ b/config.h.in
53@@ -12,6 +12,8 @@53@@ -12,6 +12,8 @@
@@ -60,7 +60,7 @@ index 9e8f9911b..d2c4ce8e5 100644
60 /* We don't need those. */60 /* We don't need those. */
61 #define MINILZO_CFG_SKIP_LZO_PTR 161 #define MINILZO_CFG_SKIP_LZO_PTR 1
62diff --git a/configure.ac b/configure.ac62diff --git a/configure.ac b/configure.ac
63index 1e5abc67d..ea00ccd69 10064463index 1e5abc67d9..ea00ccd691 100644
64--- a/configure.ac64--- a/configure.ac
65+++ b/configure.ac65+++ b/configure.ac
66@@ -1857,6 +1857,17 @@ else66@@ -1857,6 +1857,17 @@ else
@@ -93,7 +93,7 @@ index 1e5abc67d..ea00ccd69 100644
93 echo "*******************************************************"93 echo "*******************************************************"
94 ]94 ]
95diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S95diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
96index 2bd0b2d28..b0c0f2225 10064496index 2bd0b2d286..b0c0f2225e 100644
97--- a/grub-core/boot/i386/pc/boot.S97--- a/grub-core/boot/i386/pc/boot.S
98+++ b/grub-core/boot/i386/pc/boot.S98+++ b/grub-core/boot/i386/pc/boot.S
99@@ -19,6 +19,9 @@99@@ -19,6 +19,9 @@
@@ -125,7 +125,7 @@ index 2bd0b2d28..b0c0f2225 100644
125 movw $disk_address_packet, %si125 movw $disk_address_packet, %si
126 126
127diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S127diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
128index c1addc0df..9b6d7a7ed 100644128index c1addc0df2..9b6d7a7edc 100644
129--- a/grub-core/boot/i386/pc/diskboot.S129--- a/grub-core/boot/i386/pc/diskboot.S
130+++ b/grub-core/boot/i386/pc/diskboot.S130+++ b/grub-core/boot/i386/pc/diskboot.S
131@@ -18,6 +18,9 @@131@@ -18,6 +18,9 @@
@@ -205,7 +205,7 @@ index c1addc0df..9b6d7a7ed 100644
205 205
206 notification_step: .asciz "."206 notification_step: .asciz "."
207diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c207diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
208index 9cad0c448..714b63d67 100644208index 9cad0c4485..714b63d674 100644
209--- a/grub-core/kern/main.c209--- a/grub-core/kern/main.c
210+++ b/grub-core/kern/main.c210+++ b/grub-core/kern/main.c
211@@ -264,15 +264,25 @@ reclaim_module_space (void)211@@ -264,15 +264,25 @@ reclaim_module_space (void)
@@ -248,7 +248,7 @@ index 9cad0c448..714b63d67 100644
248 grub_rescue_run ();248 grub_rescue_run ();
249 }249 }
250diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c250diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c
251index dcd7d4439..a93524eab 100644251index dcd7d44397..a93524eabb 100644
252--- a/grub-core/kern/rescue_reader.c252--- a/grub-core/kern/rescue_reader.c
253+++ b/grub-core/kern/rescue_reader.c253+++ b/grub-core/kern/rescue_reader.c
254@@ -78,7 +78,9 @@ grub_rescue_read_line (char **line, int cont,254@@ -78,7 +78,9 @@ grub_rescue_read_line (char **line, int cont,
@@ -262,7 +262,7 @@ index dcd7d4439..a93524eab 100644
262 while (1)262 while (1)
263 {263 {
264diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c264diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
265index 1b03dfd57..0aa389fa1 100644265index 1b03dfd57b..0aa389fa16 100644
266--- a/grub-core/normal/main.c266--- a/grub-core/normal/main.c
267+++ b/grub-core/normal/main.c267+++ b/grub-core/normal/main.c
268@@ -389,6 +389,15 @@ static grub_err_t268@@ -389,6 +389,15 @@ static grub_err_t
@@ -292,7 +292,7 @@ index 1b03dfd57..0aa389fa1 100644
292 while (1)292 while (1)
293 {293 {
294diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c294diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
295index 3611ee9ea..ebf5a0f10 100644295index 3611ee9ea7..ebf5a0f109 100644
296--- a/grub-core/normal/menu.c296--- a/grub-core/normal/menu.c
297+++ b/grub-core/normal/menu.c297+++ b/grub-core/normal/menu.c
298@@ -827,12 +827,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)298@@ -827,12 +827,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
@@ -339,7 +339,7 @@ index 3611ee9ea..ebf5a0f10 100644
339 if (auto_boot)339 if (auto_boot)
340 grub_menu_execute_with_fallback (menu, e, autobooted,340 grub_menu_execute_with_fallback (menu, e, autobooted,
341diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in341diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
342index cb1cc200e..479a8bf4e 100644342index cb1cc200e4..479a8bf4e5 100644
343--- a/util/grub.d/10_linux.in343--- a/util/grub.d/10_linux.in
344+++ b/util/grub.d/10_linux.in344+++ b/util/grub.d/10_linux.in
345@@ -21,6 +21,7 @@ prefix="@prefix@"345@@ -21,6 +21,7 @@ prefix="@prefix@"
@@ -386,7 +386,7 @@ index cb1cc200e..479a8bf4e 100644
386 EOF386 EOF
387 fi387 fi
388diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in388diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
389index c1dfe8ae8..1a656b2dd 100755389index bd4f1a2123..3a0e6d1035 100755
390--- a/util/grub.d/10_linux_zfs.in390--- a/util/grub.d/10_linux_zfs.in
391+++ b/util/grub.d/10_linux_zfs.in391+++ b/util/grub.d/10_linux_zfs.in
392@@ -20,6 +20,7 @@ set -e392@@ -20,6 +20,7 @@ set -e
@@ -397,7 +397,7 @@ index c1dfe8ae8..1a656b2dd 100755
397 397
398 . "${pkgdatadir}/grub-mkconfig_lib"398 . "${pkgdatadir}/grub-mkconfig_lib"
399 399
400@@ -776,7 +777,9 @@ zfs_linux_entry () {400@@ -779,7 +780,9 @@ zfs_linux_entry () {
401 401
402 echo "$(prepare_grub_to_access_device_cached "${boot_device}" "${submenu_level}")"402 echo "$(prepare_grub_to_access_device_cached "${boot_device}" "${submenu_level}")"
403 403
@@ -408,7 +408,7 @@ index c1dfe8ae8..1a656b2dd 100755
408 408
409 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"409 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
410 if [ ${type} = "recovery" ]; then410 if [ ${type} = "recovery" ]; then
411@@ -785,7 +788,9 @@ zfs_linux_entry () {411@@ -788,7 +791,9 @@ zfs_linux_entry () {
412 412
413 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"413 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"
414 414
diff --git a/debian/patches/mkconfig-loopback.patch b/debian/patches/mkconfig-loopback.patch
index 0c7498b..0398786 100644
--- a/debian/patches/mkconfig-loopback.patch
+++ b/debian/patches/mkconfig-loopback.patch
@@ -1,4 +1,4 @@
1From 4750b94c28b61e29d3f1bfce6bc7fa8f48c45526 Mon Sep 17 00:00:00 20011From 797776285ad55df88f81c3c17656e03a187e7140 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Mon, 13 Jan 2014 12:13:00 +00003Date: Mon, 13 Jan 2014 12:13:00 +0000
4Subject: Handle filesystems loop-mounted on file images4Subject: Handle filesystems loop-mounted on file images
@@ -21,7 +21,7 @@ Patch-Name: mkconfig-loopback.patch
21 3 files changed, 34 insertions(+)21 3 files changed, 34 insertions(+)
2222
23diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in23diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
24index b6606c16e..b05df554d 10064424index b6606c16e0..b05df554da 100644
25--- a/util/grub-mkconfig_lib.in25--- a/util/grub-mkconfig_lib.in
26+++ b/util/grub-mkconfig_lib.in26+++ b/util/grub-mkconfig_lib.in
27@@ -133,6 +133,22 @@ prepare_grub_to_access_device ()27@@ -133,6 +133,22 @@ prepare_grub_to_access_device ()
@@ -63,7 +63,7 @@ index b6606c16e..b05df554d 100644
63 63
64 grub_get_device_id ()64 grub_get_device_id ()
65diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in65diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
66index f839b3b55..d927b60ae 10064466index f839b3b55f..d927b60ae2 100644
67--- a/util/grub.d/10_linux.in67--- a/util/grub.d/10_linux.in
68+++ b/util/grub.d/10_linux.in68+++ b/util/grub.d/10_linux.in
69@@ -40,6 +40,11 @@ fi69@@ -40,6 +40,11 @@ fi
@@ -79,7 +79,7 @@ index f839b3b55..d927b60ae 100644
79 esac79 esac
80 80
81diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in81diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
82index 96179ea61..9a8d42fb5 10064482index 96179ea613..9a8d42fb57 100644
83--- a/util/grub.d/20_linux_xen.in83--- a/util/grub.d/20_linux_xen.in
84+++ b/util/grub.d/20_linux_xen.in84+++ b/util/grub.d/20_linux_xen.in
85@@ -40,6 +40,11 @@ fi85@@ -40,6 +40,11 @@ fi
diff --git a/debian/patches/mkconfig-mid-upgrade.patch b/debian/patches/mkconfig-mid-upgrade.patch
index 248f6c3..74eb2da 100644
--- a/debian/patches/mkconfig-mid-upgrade.patch
+++ b/debian/patches/mkconfig-mid-upgrade.patch
@@ -1,4 +1,4 @@
1From 8ce50d6419c04a49070868a4245664419e0901fa Mon Sep 17 00:00:00 20011From 1033aefcd66f55eb12dedee2311b217beb1d9349 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:03 +00003Date: Mon, 13 Jan 2014 12:13:03 +0000
4Subject: Bail out if trying to run grub-mkconfig during upgrade to 2.004Subject: Bail out if trying to run grub-mkconfig during upgrade to 2.00
@@ -20,7 +20,7 @@ Patch-Name: mkconfig-mid-upgrade.patch
20 1 file changed, 7 insertions(+)20 1 file changed, 7 insertions(+)
2121
22diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in22diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
23index 45cd4cc54..b506d63bf 10064423index 45cd4cc541..b506d63bf9 100644
24--- a/util/grub-mkconfig.in24--- a/util/grub-mkconfig.in
25+++ b/util/grub-mkconfig.in25+++ b/util/grub-mkconfig.in
26@@ -102,6 +102,13 @@ do26@@ -102,6 +102,13 @@ do
diff --git a/debian/patches/mkconfig-nonexistent-loopback.patch b/debian/patches/mkconfig-nonexistent-loopback.patch
index 9b8b848..1450a08 100644
--- a/debian/patches/mkconfig-nonexistent-loopback.patch
+++ b/debian/patches/mkconfig-nonexistent-loopback.patch
@@ -1,4 +1,4 @@
1From c754f6529f31d14b1110f457e9244f6454a2ed4e Mon Sep 17 00:00:00 20011From 615a0ad44bd41bf58f71ac391416ce9be1b4b7ae Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:08 +00003Date: Mon, 13 Jan 2014 12:13:08 +0000
4Subject: Avoid getting confused by inaccessible loop device backing paths4Subject: Avoid getting confused by inaccessible loop device backing paths
@@ -14,7 +14,7 @@ Patch-Name: mkconfig-nonexistent-loopback.patch
14 2 files changed, 6 insertions(+), 5 deletions(-)14 2 files changed, 6 insertions(+), 5 deletions(-)
1515
16diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in16diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
17index b05df554d..fe6319abe 10064417index b05df554da..fe6319abe0 100644
18--- a/util/grub-mkconfig_lib.in18--- a/util/grub-mkconfig_lib.in
19+++ b/util/grub-mkconfig_lib.in19+++ b/util/grub-mkconfig_lib.in
20@@ -143,7 +143,7 @@ prepare_grub_to_access_device ()20@@ -143,7 +143,7 @@ prepare_grub_to_access_device ()
@@ -27,7 +27,7 @@ index b05df554d..fe6319abe 100644
27 esac27 esac
28 ;;28 ;;
29diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in29diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
30index 775ceb2e0..b7e1147c4 10064430index 775ceb2e04..b7e1147c41 100644
31--- a/util/grub.d/30_os-prober.in31--- a/util/grub.d/30_os-prober.in
32+++ b/util/grub.d/30_os-prober.in32+++ b/util/grub.d/30_os-prober.in
33@@ -219,6 +219,11 @@ EOF33@@ -219,6 +219,11 @@ EOF
diff --git a/debian/patches/mkconfig-other-inits.patch b/debian/patches/mkconfig-other-inits.patch
index e7dd0b6..13f8bfd 100644
--- a/debian/patches/mkconfig-other-inits.patch
+++ b/debian/patches/mkconfig-other-inits.patch
@@ -1,4 +1,4 @@
1From 0564e92b1f182280d433e829406bdf91dd19a357 Mon Sep 17 00:00:00 20011From 2015389b99c6a5eda55aa56a14dd4c65cf2a0d59 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Sat, 3 Jan 2015 12:04:59 +00003Date: Sat, 3 Jan 2015 12:04:59 +0000
4Subject: Generate alternative init entries in advanced menu4Subject: Generate alternative init entries in advanced menu
@@ -18,7 +18,7 @@ Patch-Name: mkconfig-other-inits.patch
18 2 files changed, 21 insertions(+)18 2 files changed, 21 insertions(+)
1919
20diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in20diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
21index 85b30084a..dff84edea 10064421index 85b30084ad..dff84edea5 100644
22--- a/util/grub.d/10_linux.in22--- a/util/grub.d/10_linux.in
23+++ b/util/grub.d/10_linux.in23+++ b/util/grub.d/10_linux.in
24@@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@24@@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@
@@ -53,7 +53,7 @@ index 85b30084a..dff84edea 100644
53 linux_entry "${OS}" "${version}" recovery \53 linux_entry "${OS}" "${version}" recovery \
54 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"54 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
55diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in55diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
56index f2ee0532b..81e5f0d7e 10064456index f2ee0532bd..81e5f0d7e4 100644
57--- a/util/grub.d/20_linux_xen.in57--- a/util/grub.d/20_linux_xen.in
58+++ b/util/grub.d/20_linux_xen.in58+++ b/util/grub.d/20_linux_xen.in
59@@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@59@@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@
diff --git a/debian/patches/mkconfig-recovery-title.patch b/debian/patches/mkconfig-recovery-title.patch
index 869fc30..185d1d2 100644
--- a/debian/patches/mkconfig-recovery-title.patch
+++ b/debian/patches/mkconfig-recovery-title.patch
@@ -1,4 +1,4 @@
1From 0636b004bd56946dd24ce0afff820f9ed76da34b Mon Sep 17 00:00:00 20011From d8fd4cbf012ffc87a49de8cc28ed27c82f2eec1b Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:33 +00003Date: Mon, 13 Jan 2014 12:13:33 +0000
4Subject: Add GRUB_RECOVERY_TITLE option4Subject: Add GRUB_RECOVERY_TITLE option
@@ -22,7 +22,7 @@ Patch-Name: mkconfig-recovery-title.patch
22 8 files changed, 21 insertions(+), 11 deletions(-)22 8 files changed, 21 insertions(+), 11 deletions(-)
2323
24diff --git a/docs/grub.texi b/docs/grub.texi24diff --git a/docs/grub.texi b/docs/grub.texi
25index a835d0ae4..3ec35d315 10064425index a835d0ae42..3ec35d315a 100644
26--- a/docs/grub.texi26--- a/docs/grub.texi
27+++ b/docs/grub.texi27+++ b/docs/grub.texi
28@@ -1536,6 +1536,11 @@ a console is restricted or limited.28@@ -1536,6 +1536,11 @@ a console is restricted or limited.
@@ -38,7 +38,7 @@ index a835d0ae4..3ec35d315 100644
38 38
39 The following options are still accepted for compatibility with existing39 The following options are still accepted for compatibility with existing
40diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in40diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
41index 307214310..9c1da6477 10064441index 3072143105..9c1da64771 100644
42--- a/util/grub-mkconfig.in42--- a/util/grub-mkconfig.in
43+++ b/util/grub-mkconfig.in43+++ b/util/grub-mkconfig.in
44@@ -196,6 +196,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"44@@ -196,6 +196,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
@@ -63,7 +63,7 @@ index 307214310..9c1da6477 100644
63 if test "x${grub_cfg}" != "x"; then63 if test "x${grub_cfg}" != "x"; then
64 rm -f "${grub_cfg}.new"64 rm -f "${grub_cfg}.new"
65diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in65diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
66index 59a9a48a2..7fa3a3fbd 10064466index 59a9a48a2f..7fa3a3fbd8 100644
67--- a/util/grub.d/10_hurd.in67--- a/util/grub.d/10_hurd.in
68+++ b/util/grub.d/10_hurd.in68+++ b/util/grub.d/10_hurd.in
69@@ -88,8 +88,8 @@ hurd_entry () {69@@ -88,8 +88,8 @@ hurd_entry () {
@@ -78,7 +78,7 @@ index 59a9a48a2..7fa3a3fbd 100644
78 title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")"78 title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")"
79 oldtitle="$OS using $kernel_base"79 oldtitle="$OS using $kernel_base"
80diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in80diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
81index 9d8e8fd85..8301d361a 10064481index 9d8e8fd852..8301d361a1 100644
82--- a/util/grub.d/10_kfreebsd.in82--- a/util/grub.d/10_kfreebsd.in
83+++ b/util/grub.d/10_kfreebsd.in83+++ b/util/grub.d/10_kfreebsd.in
84@@ -76,7 +76,7 @@ kfreebsd_entry ()84@@ -76,7 +76,7 @@ kfreebsd_entry ()
@@ -91,7 +91,7 @@ index 9d8e8fd85..8301d361a 100644
91 title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")"91 title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")"
92 fi92 fi
93diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in93diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
94index cc2dd855a..2c418c5ec 10064494index cc2dd855ab..2c418c5ec8 100644
95--- a/util/grub.d/10_linux.in95--- a/util/grub.d/10_linux.in
96+++ b/util/grub.d/10_linux.in96+++ b/util/grub.d/10_linux.in
97@@ -130,7 +130,7 @@ linux_entry ()97@@ -130,7 +130,7 @@ linux_entry ()
@@ -104,10 +104,10 @@ index cc2dd855a..2c418c5ec 100644
104 title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;104 title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
105 esac105 esac
106diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in106diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
107index b636dc7bb..b068f0e96 100755107index 48a4e68976..4477fa6061 100755
108--- a/util/grub.d/10_linux_zfs.in108--- a/util/grub.d/10_linux_zfs.in
109+++ b/util/grub.d/10_linux_zfs.in109+++ b/util/grub.d/10_linux_zfs.in
110@@ -954,7 +954,7 @@ generate_grub_menu() {110@@ -957,7 +957,7 @@ generate_grub_menu() {
111 111
112 GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}112 GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}
113 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then113 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
@@ -116,7 +116,7 @@ index b636dc7bb..b068f0e96 100755
116 zfs_linux_entry 1 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}"116 zfs_linux_entry 1 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}"
117 fi117 fi
118 at_least_one_entry=1118 at_least_one_entry=1
119@@ -982,9 +982,9 @@ generate_grub_menu() {119@@ -985,9 +985,9 @@ generate_grub_menu() {
120 120
121 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"121 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
122 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then122 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
@@ -128,7 +128,7 @@ index b636dc7bb..b068f0e96 100755
128 zfs_linux_entry 2 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "zsys-revert=userdata"128 zfs_linux_entry 2 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "zsys-revert=userdata"
129 fi129 fi
130 # Non-zsys: boot temporarly on snapshots or rollback (destroying intermediate snapshots)130 # Non-zsys: boot temporarly on snapshots or rollback (destroying intermediate snapshots)
131@@ -994,7 +994,7 @@ generate_grub_menu() {131@@ -997,7 +997,7 @@ generate_grub_menu() {
132 132
133 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"133 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
134 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then134 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
@@ -138,7 +138,7 @@ index b636dc7bb..b068f0e96 100755
138 fi138 fi
139 139
140diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in140diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
141index 874f59969..bb29cc046 100644141index 874f59969e..bb29cc0468 100644
142--- a/util/grub.d/10_netbsd.in142--- a/util/grub.d/10_netbsd.in
143+++ b/util/grub.d/10_netbsd.in143+++ b/util/grub.d/10_netbsd.in
144@@ -102,7 +102,7 @@ netbsd_entry ()144@@ -102,7 +102,7 @@ netbsd_entry ()
@@ -151,7 +151,7 @@ index 874f59969..bb29cc046 100644
151 title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"151 title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"
152 fi152 fi
153diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in153diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
154index 9a8d42fb5..f2ee0532b 100644154index 9a8d42fb57..f2ee0532bd 100644
155--- a/util/grub.d/20_linux_xen.in155--- a/util/grub.d/20_linux_xen.in
156+++ b/util/grub.d/20_linux_xen.in156+++ b/util/grub.d/20_linux_xen.in
157@@ -105,7 +105,7 @@ linux_entry ()157@@ -105,7 +105,7 @@ linux_entry ()
diff --git a/debian/patches/mkconfig-signed-kernel.patch b/debian/patches/mkconfig-signed-kernel.patch
index ea7cdb0..625cc4d 100644
--- a/debian/patches/mkconfig-signed-kernel.patch
+++ b/debian/patches/mkconfig-signed-kernel.patch
@@ -1,4 +1,4 @@
1From 956c3d193e7c756f52fc0cfda463eb17ed58b4ce Mon Sep 17 00:00:00 20011From 72835133813a3e59c58d6908a82cbc3f36adf34a Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Tue, 31 Mar 2020 15:17:45 +02003Date: Tue, 31 Mar 2020 15:17:45 +0200
4Subject: Generate configuration for signed UEFI kernels if available4Subject: Generate configuration for signed UEFI kernels if available
@@ -13,7 +13,7 @@ Patch-Name: mkconfig-signed-kernel.patch
13 2 files changed, 36 insertions(+)13 2 files changed, 36 insertions(+)
1414
15diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in15diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
16index 19e4df4ad..cb1cc200e 10064416index 19e4df4ad8..cb1cc200e4 100644
17--- a/util/grub.d/10_linux.in17--- a/util/grub.d/10_linux.in
18+++ b/util/grub.d/10_linux.in18+++ b/util/grub.d/10_linux.in
19@@ -165,8 +165,16 @@ linux_entry ()19@@ -165,8 +165,16 @@ linux_entry ()
@@ -48,7 +48,7 @@ index 19e4df4ad..cb1cc200e 100644
48 basename=`basename $linux`48 basename=`basename $linux`
49 dirname=`dirname $linux`49 dirname=`dirname $linux`
50diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in50diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
51index bd5b963b6..c1dfe8ae8 10075551index 7f88e771e0..bd4f1a2123 100755
52--- a/util/grub.d/10_linux_zfs.in52--- a/util/grub.d/10_linux_zfs.in
53+++ b/util/grub.d/10_linux_zfs.in53+++ b/util/grub.d/10_linux_zfs.in
54@@ -339,6 +339,16 @@ try_default_layout_bpool() {54@@ -339,6 +339,16 @@ try_default_layout_bpool() {
@@ -68,7 +68,7 @@ index bd5b963b6..c1dfe8ae8 100755
68 # Given a filesystem or snapshot dataset, returns dataset|machine id|pretty name|last used68 # Given a filesystem or snapshot dataset, returns dataset|machine id|pretty name|last used
69 # $1 is dataset we want information from69 # $1 is dataset we want information from
70 # $2 is the temporary mount directory to use70 # $2 is the temporary mount directory to use
71@@ -409,6 +419,17 @@ get_dataset_info() {71@@ -412,6 +422,17 @@ get_dataset_info() {
72 continue72 continue
73 fi73 fi
74 74
diff --git a/debian/patches/mkconfig-ubuntu-distributor.patch b/debian/patches/mkconfig-ubuntu-distributor.patch
index 6ae0bef..679db1f 100644
--- a/debian/patches/mkconfig-ubuntu-distributor.patch
+++ b/debian/patches/mkconfig-ubuntu-distributor.patch
@@ -1,4 +1,4 @@
1From 5cddc9390afad242b31604806e8fb46ca92bf891 Mon Sep 17 00:00:00 20011From 01c7c86b01698ebf65fe99c34d2d79a39b76b4c1 Mon Sep 17 00:00:00 2001
2From: Mario Limonciello <Mario_Limonciello@dell.com>2From: Mario Limonciello <Mario_Limonciello@dell.com>
3Date: Mon, 13 Jan 2014 12:13:14 +00003Date: Mon, 13 Jan 2014 12:13:14 +0000
4Subject: Remove GNU/Linux from default distributor string for Ubuntu4Subject: Remove GNU/Linux from default distributor string for Ubuntu
@@ -17,7 +17,7 @@ Patch-Name: mkconfig-ubuntu-distributor.patch
17 2 files changed, 16 insertions(+), 2 deletions(-)17 2 files changed, 16 insertions(+), 2 deletions(-)
1818
19diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in19diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
20index fcd303387..19e4df4ad 10064420index fcd3033872..19e4df4ad8 100644
21--- a/util/grub.d/10_linux.in21--- a/util/grub.d/10_linux.in
22+++ b/util/grub.d/10_linux.in22+++ b/util/grub.d/10_linux.in
23@@ -32,7 +32,14 @@ CLASS="--class gnu-linux --class gnu --class os"23@@ -32,7 +32,14 @@ CLASS="--class gnu-linux --class gnu --class os"
@@ -37,10 +37,10 @@ index fcd303387..19e4df4ad 100644
37 fi37 fi
38 38
39diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in39diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
40index 5db1f6682..bd5b963b6 10075540index de4d215900..7f88e771e0 100755
41--- a/util/grub.d/10_linux_zfs.in41--- a/util/grub.d/10_linux_zfs.in
42+++ b/util/grub.d/10_linux_zfs.in42+++ b/util/grub.d/10_linux_zfs.in
43@@ -787,7 +787,14 @@ generate_grub_menu() {43@@ -790,7 +790,14 @@ generate_grub_menu() {
44 if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then44 if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then
45 OS=GNU/Linux45 OS=GNU/Linux
46 else46 else
diff --git a/debian/patches/mkconfig-ubuntu-recovery.patch b/debian/patches/mkconfig-ubuntu-recovery.patch
index f81ab40..3f64f55 100644
--- a/debian/patches/mkconfig-ubuntu-recovery.patch
+++ b/debian/patches/mkconfig-ubuntu-recovery.patch
@@ -1,4 +1,4 @@
1From fb4d204572ca4dec63b3d3f25a3b69da97815726 Mon Sep 17 00:00:00 20011From 3699711858d0aead05bc9a8e057022a90644cda6 Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Tue, 31 Mar 2020 15:16:36 +02003Date: Tue, 31 Mar 2020 15:16:36 +0200
4Subject: "single" -> "recovery" when friendly-recovery is installed4Subject: "single" -> "recovery" when friendly-recovery is installed
@@ -24,7 +24,7 @@ Patch-Name: mkconfig-ubuntu-recovery.patch
24 4 files changed, 39 insertions(+), 5 deletions(-)24 4 files changed, 39 insertions(+), 5 deletions(-)
2525
26diff --git a/configure.ac b/configure.ac26diff --git a/configure.ac b/configure.ac
27index 7656f2434..1e5abc67d 10064427index 7656f2434e..1e5abc67d9 100644
28--- a/configure.ac28--- a/configure.ac
29+++ b/configure.ac29+++ b/configure.ac
30@@ -1846,6 +1846,17 @@ fi30@@ -1846,6 +1846,17 @@ fi
@@ -46,7 +46,7 @@ index 7656f2434..1e5abc67d 100644
46 46
47 AC_SUBST([FONT_SOURCE])47 AC_SUBST([FONT_SOURCE])
48diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in48diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
49index d927b60ae..fcd303387 10064449index d927b60ae2..fcd3033872 100644
50--- a/util/grub.d/10_linux.in50--- a/util/grub.d/10_linux.in
51+++ b/util/grub.d/10_linux.in51+++ b/util/grub.d/10_linux.in
52@@ -20,6 +20,7 @@ set -e52@@ -20,6 +20,7 @@ set -e
@@ -94,7 +94,7 @@ index d927b60ae..fcd303387 100644
94 94
95 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`95 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
96diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in96diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
97index d27634738..5db1f6682 10075597index b24587f0a5..de4d215900 100755
98--- a/util/grub.d/10_linux_zfs.in98--- a/util/grub.d/10_linux_zfs.in
99+++ b/util/grub.d/10_linux_zfs.in99+++ b/util/grub.d/10_linux_zfs.in
100@@ -19,6 +19,7 @@ set -e100@@ -19,6 +19,7 @@ set -e
@@ -105,7 +105,7 @@ index d27634738..5db1f6682 100755
105 105
106 . "${pkgdatadir}/grub-mkconfig_lib"106 . "${pkgdatadir}/grub-mkconfig_lib"
107 107
108@@ -745,7 +746,9 @@ zfs_linux_entry () {108@@ -748,7 +749,9 @@ zfs_linux_entry () {
109 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then109 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
110 echo "${submenu_indentation} load_video"110 echo "${submenu_indentation} load_video"
111 fi111 fi
@@ -116,7 +116,7 @@ index d27634738..5db1f6682 100755
116 fi116 fi
117 117
118 echo "${submenu_indentation} insmod gzio"118 echo "${submenu_indentation} insmod gzio"
119@@ -756,7 +759,7 @@ zfs_linux_entry () {119@@ -759,7 +762,7 @@ zfs_linux_entry () {
120 120
121 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"121 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
122 if [ ${type} = "recovery" ]; then122 if [ ${type} = "recovery" ]; then
@@ -125,7 +125,7 @@ index d27634738..5db1f6682 100755
125 fi125 fi
126 126
127 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"127 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"
128@@ -788,6 +791,14 @@ generate_grub_menu() {128@@ -791,6 +794,14 @@ generate_grub_menu() {
129 CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1 | LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"129 CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1 | LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
130 fi130 fi
131 131
@@ -141,7 +141,7 @@ index d27634738..5db1f6682 100755
141 # IFS is set to TAB (ASCII 0x09)141 # IFS is set to TAB (ASCII 0x09)
142 echo "${menu_metadata}" |142 echo "${menu_metadata}" |
143diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in143diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
144index 515a68c7a..775ceb2e0 100644144index 515a68c7aa..775ceb2e04 100644
145--- a/util/grub.d/30_os-prober.in145--- a/util/grub.d/30_os-prober.in
146+++ b/util/grub.d/30_os-prober.in146+++ b/util/grub.d/30_os-prober.in
147@@ -220,7 +220,7 @@ EOF147@@ -220,7 +220,7 @@ EOF
diff --git a/debian/patches/mkrescue-efi-modules.patch b/debian/patches/mkrescue-efi-modules.patch
index d0e0688..6221e79 100644
--- a/debian/patches/mkrescue-efi-modules.patch
+++ b/debian/patches/mkrescue-efi-modules.patch
@@ -1,4 +1,4 @@
1From 40df0707380bf528d9f849b065c3a5e4e96113ac Mon Sep 17 00:00:00 20011From 73f95865a1ffacb1e10e431e114baa67d36a27e1 Mon Sep 17 00:00:00 2001
2From: Mario Limonciello <Mario_Limonciello@dell.com>2From: Mario Limonciello <Mario_Limonciello@dell.com>
3Date: Mon, 13 Jan 2014 12:12:59 +00003Date: Mon, 13 Jan 2014 12:12:59 +0000
4Subject: Build vfat into EFI boot images4Subject: Build vfat into EFI boot images
@@ -14,7 +14,7 @@ Patch-Name: mkrescue-efi-modules.patch
14 1 file changed, 2 insertions(+)14 1 file changed, 2 insertions(+)
1515
16diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c16diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
17index ce2cbc4f1..45d6140d3 10064417index ce2cbc4f10..45d6140d3e 100644
18--- a/util/grub-mkrescue.c18--- a/util/grub-mkrescue.c
19+++ b/util/grub-mkrescue.c19+++ b/util/grub-mkrescue.c
20@@ -750,6 +750,7 @@ main (int argc, char *argv[])20@@ -750,6 +750,7 @@ main (int argc, char *argv[])
diff --git a/debian/patches/net-read-bracketed-ipv6-addr.patch b/debian/patches/net-read-bracketed-ipv6-addr.patch
index 9afab37..bf711fc 100644
--- a/debian/patches/net-read-bracketed-ipv6-addr.patch
+++ b/debian/patches/net-read-bracketed-ipv6-addr.patch
@@ -1,4 +1,4 @@
1From 5b535ee06d2b6e98a6b9c7d1a79ff611e10e1b0a Mon Sep 17 00:00:00 20011From b16ad7afe148eb58e1443bc6c20cd017cee3d7aa Mon Sep 17 00:00:00 2001
2From: Aaron Miller <aaronmiller@fb.com>2From: Aaron Miller <aaronmiller@fb.com>
3Date: Thu, 27 Oct 2016 17:39:49 -04003Date: Thu, 27 Oct 2016 17:39:49 -0400
4Subject: net: read bracketed ipv6 addrs and port numbers4Subject: net: read bracketed ipv6 addrs and port numbers
@@ -16,7 +16,7 @@ Patch-Name: net-read-bracketed-ipv6-addr.patch
16 4 files changed, 110 insertions(+), 11 deletions(-)16 4 files changed, 110 insertions(+), 11 deletions(-)
1717
18diff --git a/grub-core/net/http.c b/grub-core/net/http.c18diff --git a/grub-core/net/http.c b/grub-core/net/http.c
19index 5aa4ad3be..f182d7b87 10064419index 5aa4ad3bef..f182d7b871 100644
20--- a/grub-core/net/http.c20--- a/grub-core/net/http.c
21+++ b/grub-core/net/http.c21+++ b/grub-core/net/http.c
22@@ -312,12 +312,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)22@@ -312,12 +312,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
@@ -74,7 +74,7 @@ index 5aa4ad3be..f182d7b87 100644
74 file);74 file);
75 if (!data->sock)75 if (!data->sock)
76diff --git a/grub-core/net/net.c b/grub-core/net/net.c76diff --git a/grub-core/net/net.c b/grub-core/net/net.c
77index d5d726a31..b917a75d5 10064477index d5d726a315..b917a75d54 100644
78--- a/grub-core/net/net.c78--- a/grub-core/net/net.c
79+++ b/grub-core/net/net.c79+++ b/grub-core/net/net.c
80@@ -437,6 +437,12 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)80@@ -437,6 +437,12 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)
@@ -211,7 +211,7 @@ index d5d726a31..b917a75d5 100644
211 }211 }
212 }212 }
213diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c213diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
214index 7d90bf66e..a0817a075 100644214index 7d90bf66e7..a0817a075d 100644
215--- a/grub-core/net/tftp.c215--- a/grub-core/net/tftp.c
216+++ b/grub-core/net/tftp.c216+++ b/grub-core/net/tftp.c
217@@ -314,6 +314,7 @@ tftp_open (struct grub_file *file, const char *filename)217@@ -314,6 +314,7 @@ tftp_open (struct grub_file *file, const char *filename)
@@ -241,7 +241,7 @@ index 7d90bf66e..a0817a075 100644
241 if (!data->sock)241 if (!data->sock)
242 {242 {
243diff --git a/include/grub/net.h b/include/grub/net.h243diff --git a/include/grub/net.h b/include/grub/net.h
244index 4a9069a14..cc114286e 100644244index 4a9069a147..cc114286ea 100644
245--- a/include/grub/net.h245--- a/include/grub/net.h
246+++ b/include/grub/net.h246+++ b/include/grub/net.h
247@@ -270,6 +270,7 @@ typedef struct grub_net247@@ -270,6 +270,7 @@ typedef struct grub_net
diff --git a/debian/patches/no-devicetree-if-secure-boot.patch b/debian/patches/no-devicetree-if-secure-boot.patch
index 2c20d15..c6b9a75 100644
--- a/debian/patches/no-devicetree-if-secure-boot.patch
+++ b/debian/patches/no-devicetree-if-secure-boot.patch
@@ -1,4 +1,4 @@
1From e7c4e6c655bc9eebdd22fb6f3d9b2aafabffa1b4 Mon Sep 17 00:00:00 20011From 107663390a84f31f304094df29dd31a5584fa0b9 Mon Sep 17 00:00:00 2001
2From: Peter Jones <pjones@redhat.com>2From: Peter Jones <pjones@redhat.com>
3Date: Wed, 24 Apr 2019 10:03:04 -04003Date: Wed, 24 Apr 2019 10:03:04 -0400
4Subject: Forbid the "devicetree" command when Secure Boot is enabled.4Subject: Forbid the "devicetree" command when Secure Boot is enabled.
@@ -17,7 +17,7 @@ Patch-Name: no-devicetree-if-secure-boot.patch
17 2 files changed, 20 insertions(+)17 2 files changed, 20 insertions(+)
1818
19diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c19diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
20index 51684914c..092e8e307 10064420index 51684914cf..092e8e3077 100644
21--- a/grub-core/loader/arm/linux.c21--- a/grub-core/loader/arm/linux.c
22+++ b/grub-core/loader/arm/linux.c22+++ b/grub-core/loader/arm/linux.c
23@@ -30,6 +30,10 @@23@@ -30,6 +30,10 @@
@@ -47,7 +47,7 @@ index 51684914c..092e8e307 100644
47 if (!dtb)47 if (!dtb)
48 return grub_errno;48 return grub_errno;
49diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c49diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
50index ee9c5592c..f0c2d91be 10064450index ee9c5592c7..f0c2d91be2 100644
51--- a/grub-core/loader/efi/fdt.c51--- a/grub-core/loader/efi/fdt.c
52+++ b/grub-core/loader/efi/fdt.c52+++ b/grub-core/loader/efi/fdt.c
53@@ -123,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),53@@ -123,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
diff --git a/debian/patches/no-insmod-on-sb.patch b/debian/patches/no-insmod-on-sb.patch
index 95a34cd..475d5b6 100644
--- a/debian/patches/no-insmod-on-sb.patch
+++ b/debian/patches/no-insmod-on-sb.patch
@@ -1,4 +1,4 @@
1From 98ac694bdd7938cdfcd5615cc78e3211a0bcba93 Mon Sep 17 00:00:00 20011From f80581266f3dc0cfa3be1e8cf2097f6cb880cfa4 Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>2From: Matthew Garrett <mjg@redhat.com>
3Date: Mon, 13 Jan 2014 12:13:09 +00003Date: Mon, 13 Jan 2014 12:13:09 +0000
4Subject: Don't permit loading modules on UEFI secure boot4Subject: Don't permit loading modules on UEFI secure boot
@@ -16,7 +16,7 @@ Patch-Name: no-insmod-on-sb.patch
16 3 files changed, 42 insertions(+)16 3 files changed, 42 insertions(+)
1717
18diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c18diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
19index 48eb5e7b6..074dfc3c6 10064419index 48eb5e7b62..074dfc3c6f 100644
20--- a/grub-core/kern/dl.c20--- a/grub-core/kern/dl.c
21+++ b/grub-core/kern/dl.c21+++ b/grub-core/kern/dl.c
22@@ -38,6 +38,10 @@22@@ -38,6 +38,10 @@
@@ -47,7 +47,7 @@ index 48eb5e7b6..074dfc3c6 100644
47 47
48 file = grub_file_open (filename, GRUB_FILE_TYPE_GRUB_MODULE);48 file = grub_file_open (filename, GRUB_FILE_TYPE_GRUB_MODULE);
49diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c49diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
50index 6e1ceb905..96204e39b 10064450index 6e1ceb9051..96204e39b9 100644
51--- a/grub-core/kern/efi/efi.c51--- a/grub-core/kern/efi/efi.c
52+++ b/grub-core/kern/efi/efi.c52+++ b/grub-core/kern/efi/efi.c
53@@ -273,6 +273,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,53@@ -273,6 +273,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
@@ -86,7 +86,7 @@ index 6e1ceb905..96204e39b 100644
86 86
87 /* Search the mods section from the PE32/PE32+ image. This code uses87 /* Search the mods section from the PE32/PE32+ image. This code uses
88diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h88diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
89index e90e00dc4..a237952b3 10064489index e90e00dc43..a237952b37 100644
90--- a/include/grub/efi/efi.h90--- a/include/grub/efi/efi.h
91+++ b/include/grub/efi/efi.h91+++ b/include/grub/efi/efi.h
92@@ -82,6 +82,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,92@@ -82,6 +82,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
diff --git a/debian/patches/olpc-prefix-hack.patch b/debian/patches/olpc-prefix-hack.patch
index b14c333..d40729f 100644
--- a/debian/patches/olpc-prefix-hack.patch
+++ b/debian/patches/olpc-prefix-hack.patch
@@ -11,7 +11,7 @@ Patch-Name: olpc-prefix-hack.patch
11 1 file changed, 11 insertions(+)11 1 file changed, 11 insertions(+)
1212
13diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c13diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
14index d483e35ee..8b089b48d 10064414index d483e35eed..8b089b48d0 100644
15--- a/grub-core/kern/ieee1275/init.c15--- a/grub-core/kern/ieee1275/init.c
16+++ b/grub-core/kern/ieee1275/init.c16+++ b/grub-core/kern/ieee1275/init.c
17@@ -76,6 +76,7 @@ grub_exit (void)17@@ -76,6 +76,7 @@ grub_exit (void)
diff --git a/debian/patches/ppc64el-disable-vsx.patch b/debian/patches/ppc64el-disable-vsx.patch
index ab96b1d..69e2aa0 100644
--- a/debian/patches/ppc64el-disable-vsx.patch
+++ b/debian/patches/ppc64el-disable-vsx.patch
@@ -1,4 +1,4 @@
1From 0bdaf481feca277ee87f42052fad4a59ede0c8e4 Mon Sep 17 00:00:00 20011From 156930a8fe9525c51ec9608b8aff8c561dd6cc40 Mon Sep 17 00:00:00 2001
2From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>2From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
3Date: Thu, 25 Sep 2014 19:33:39 -03003Date: Thu, 25 Sep 2014 19:33:39 -0300
4Subject: Disable VSX instruction4Subject: Disable VSX instruction
@@ -21,7 +21,7 @@ Patch-Name: ppc64el-disable-vsx.patch
21 1 file changed, 12 insertions(+)21 1 file changed, 12 insertions(+)
2222
23diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S23diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
24index 21c884b43..de9a9601a 10064424index 21c884b433..de9a9601a9 100644
25--- a/grub-core/kern/powerpc/ieee1275/startup.S25--- a/grub-core/kern/powerpc/ieee1275/startup.S
26+++ b/grub-core/kern/powerpc/ieee1275/startup.S26+++ b/grub-core/kern/powerpc/ieee1275/startup.S
27@@ -20,6 +20,8 @@27@@ -20,6 +20,8 @@
diff --git a/debian/patches/probe-fusionio.patch b/debian/patches/probe-fusionio.patch
index 7756341..1610f03 100644
--- a/debian/patches/probe-fusionio.patch
+++ b/debian/patches/probe-fusionio.patch
@@ -1,4 +1,4 @@
1From 738369f06f930cedd51f22f9d519a09aa7e73176 Mon Sep 17 00:00:00 20011From 81099f3b80801da7d591ab4ae14a568345c79119 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:31 +00003Date: Mon, 13 Jan 2014 12:13:31 +0000
4Subject: Probe FusionIO devices4Subject: Probe FusionIO devices
@@ -14,7 +14,7 @@ Patch-Name: probe-fusionio.patch
14 2 files changed, 32 insertions(+)14 2 files changed, 32 insertions(+)
1515
16diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c16diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
17index 90d92d3ad..7adc0f30e 10064417index 90d92d3ad5..7adc0f30ee 100644
18--- a/grub-core/osdep/linux/getroot.c18--- a/grub-core/osdep/linux/getroot.c
19+++ b/grub-core/osdep/linux/getroot.c19+++ b/grub-core/osdep/linux/getroot.c
20@@ -950,6 +950,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,20@@ -950,6 +950,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
@@ -38,7 +38,7 @@ index 90d92d3ad..7adc0f30e 100644
38 38
39 return path;39 return path;
40diff --git a/util/deviceiter.c b/util/deviceiter.c40diff --git a/util/deviceiter.c b/util/deviceiter.c
41index a4971ef42..dddc50da7 10064441index a4971ef429..dddc50da7a 100644
42--- a/util/deviceiter.c42--- a/util/deviceiter.c
43+++ b/util/deviceiter.c43+++ b/util/deviceiter.c
44@@ -383,6 +383,12 @@ get_nvme_disk_name (char *name, int controller, int namespace)44@@ -383,6 +383,12 @@ get_nvme_disk_name (char *name, int controller, int namespace)
diff --git a/debian/patches/quick-boot-lvm.patch b/debian/patches/quick-boot-lvm.patch
index 23a9989..e5dd415 100644
--- a/debian/patches/quick-boot-lvm.patch
+++ b/debian/patches/quick-boot-lvm.patch
@@ -1,4 +1,4 @@
1From ff47caaf5a89c61bb85e7ed22570b24481b9ff15 Mon Sep 17 00:00:00 20011From ac0a158a4841bbc10112fa398d8ad65221792107 Mon Sep 17 00:00:00 2001
2From: Steve Langasek <steve.langasek@ubuntu.com>2From: Steve Langasek <steve.langasek@ubuntu.com>
3Date: Tue, 30 Oct 2018 15:04:16 -07003Date: Tue, 30 Oct 2018 15:04:16 -0700
4Subject: If we don't have writable grubenv and we're on EFI, always show the4Subject: If we don't have writable grubenv and we're on EFI, always show the
@@ -26,7 +26,7 @@ Patch-Name: quick-boot-lvm.patch
26 1 file changed, 15 insertions(+), 3 deletions(-)26 1 file changed, 15 insertions(+), 3 deletions(-)
2727
28diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in28diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
29index 674a76140..b7135b655 10064429index 674a761402..b7135b655f 100644
30--- a/util/grub.d/00_header.in30--- a/util/grub.d/00_header.in
31+++ b/util/grub.d/00_header.in31+++ b/util/grub.d/00_header.in
32@@ -115,7 +115,7 @@ EOF32@@ -115,7 +115,7 @@ EOF
diff --git a/debian/patches/quick-boot.patch b/debian/patches/quick-boot.patch
index 01fc3c9..b5ddaff 100644
--- a/debian/patches/quick-boot.patch
+++ b/debian/patches/quick-boot.patch
@@ -1,4 +1,4 @@
1From a62555d9b0bc27ecf2c018018d61589ebdf15321 Mon Sep 17 00:00:00 20011From f8150f56df7110d17b71cdacc79b451593f17feb Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:28 +00003Date: Mon, 13 Jan 2014 12:13:28 +0000
4Subject: Add configure option to bypass boot menu if possible4Subject: Add configure option to bypass boot menu if possible
@@ -34,7 +34,7 @@ Patch-Name: quick-boot.patch
34 8 files changed, 146 insertions(+), 13 deletions(-)34 8 files changed, 146 insertions(+), 13 deletions(-)
3535
36diff --git a/configure.ac b/configure.ac36diff --git a/configure.ac b/configure.ac
37index ea00ccd69..7dda5bb32 10064437index ea00ccd691..7dda5bb32b 100644
38--- a/configure.ac38--- a/configure.ac
39+++ b/configure.ac39+++ b/configure.ac
40@@ -1868,6 +1868,17 @@ else40@@ -1868,6 +1868,17 @@ else
@@ -56,7 +56,7 @@ index ea00ccd69..7dda5bb32 100644
56 56
57 AC_SUBST([FONT_SOURCE])57 AC_SUBST([FONT_SOURCE])
58diff --git a/docs/grub.texi b/docs/grub.texi58diff --git a/docs/grub.texi b/docs/grub.texi
59index 87795075a..a835d0ae4 10064459index 87795075a8..a835d0ae42 100644
60--- a/docs/grub.texi60--- a/docs/grub.texi
61+++ b/docs/grub.texi61+++ b/docs/grub.texi
62@@ -1522,6 +1522,20 @@ This option may be set to a list of GRUB module names separated by spaces.62@@ -1522,6 +1522,20 @@ This option may be set to a list of GRUB module names separated by spaces.
@@ -81,7 +81,7 @@ index 87795075a..a835d0ae4 100644
81 81
82 The following options are still accepted for compatibility with existing82 The following options are still accepted for compatibility with existing
83diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c83diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
84index ebf5a0f10..42c82290d 10064484index ebf5a0f109..42c82290de 100644
85--- a/grub-core/normal/menu.c85--- a/grub-core/normal/menu.c
86+++ b/grub-core/normal/menu.c86+++ b/grub-core/normal/menu.c
87@@ -604,6 +604,30 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)87@@ -604,6 +604,30 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
@@ -116,7 +116,7 @@ index ebf5a0f10..42c82290d 100644
116 {116 {
117 pos = grub_term_save_pos ();117 pos = grub_term_save_pos ();
118diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in118diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
119index d18bf972f..307214310 100644119index d18bf972f7..3072143105 100644
120--- a/util/grub-mkconfig.in120--- a/util/grub-mkconfig.in
121+++ b/util/grub-mkconfig.in121+++ b/util/grub-mkconfig.in
122@@ -250,7 +250,8 @@ export GRUB_DEFAULT \122@@ -250,7 +250,8 @@ export GRUB_DEFAULT \
@@ -130,7 +130,7 @@ index d18bf972f..307214310 100644
130 if test "x${grub_cfg}" != "x"; then130 if test "x${grub_cfg}" != "x"; then
131 rm -f "${grub_cfg}.new"131 rm -f "${grub_cfg}.new"
132diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in132diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
133index 93a90233e..674a76140 100644133index 93a90233ea..674a761402 100644
134--- a/util/grub.d/00_header.in134--- a/util/grub.d/00_header.in
135+++ b/util/grub.d/00_header.in135+++ b/util/grub.d/00_header.in
136@@ -21,6 +21,8 @@ prefix="@prefix@"136@@ -21,6 +21,8 @@ prefix="@prefix@"
@@ -259,7 +259,7 @@ index 93a90233e..674a76140 100644
259 EOF259 EOF
260 }260 }
261diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in261diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
262index 479a8bf4e..2be66c702 100644262index 479a8bf4e5..2be66c7028 100644
263--- a/util/grub.d/10_linux.in263--- a/util/grub.d/10_linux.in
264+++ b/util/grub.d/10_linux.in264+++ b/util/grub.d/10_linux.in
265@@ -22,6 +22,7 @@ exec_prefix="@exec_prefix@"265@@ -22,6 +22,7 @@ exec_prefix="@exec_prefix@"
@@ -281,7 +281,7 @@ index 479a8bf4e..2be66c702 100644
281 save_default_entry | grub_add_tab281 save_default_entry | grub_add_tab
282 fi282 fi
283diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in283diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
284index 1a656b2dd..548e14856 100755284index 3a0e6d1035..ec4b49d9d7 100755
285--- a/util/grub.d/10_linux_zfs.in285--- a/util/grub.d/10_linux_zfs.in
286+++ b/util/grub.d/10_linux_zfs.in286+++ b/util/grub.d/10_linux_zfs.in
287@@ -21,6 +21,7 @@ prefix="@prefix@"287@@ -21,6 +21,7 @@ prefix="@prefix@"
@@ -292,7 +292,7 @@ index 1a656b2dd..548e14856 100755
292 292
293 . "${pkgdatadir}/grub-mkconfig_lib"293 . "${pkgdatadir}/grub-mkconfig_lib"
294 294
295@@ -752,6 +753,10 @@ zfs_linux_entry () {295@@ -755,6 +756,10 @@ zfs_linux_entry () {
296 296
297 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"297 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
298 298
@@ -304,7 +304,7 @@ index 1a656b2dd..548e14856 100755
304 GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}304 GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}
305 default_entry="$(save_default_entry)"305 default_entry="$(save_default_entry)"
306diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in306diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
307index 271044f59..da5f28876 100644307index 271044f592..da5f28876d 100644
308--- a/util/grub.d/30_os-prober.in308--- a/util/grub.d/30_os-prober.in
309+++ b/util/grub.d/30_os-prober.in309+++ b/util/grub.d/30_os-prober.in
310@@ -20,12 +20,26 @@ set -e310@@ -20,12 +20,26 @@ set -e
diff --git a/debian/patches/restore-mkdevicemap.patch b/debian/patches/restore-mkdevicemap.patch
index 267b972..8ffbfa4 100644
--- a/debian/patches/restore-mkdevicemap.patch
+++ b/debian/patches/restore-mkdevicemap.patch
@@ -1,4 +1,4 @@
1From 6db8234a46f194578fb414730dd3ea80a60b13d4 Mon Sep 17 00:00:00 20011From 660f98d4548f4327954fba9410041a75893ad338 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Mon, 13 Jan 2014 12:13:01 +00003Date: Mon, 13 Jan 2014 12:13:01 +0000
4Subject: Restore grub-mkdevicemap4Subject: Restore grub-mkdevicemap
@@ -28,7 +28,7 @@ Patch-Name: restore-mkdevicemap.patch
28 create mode 100644 util/grub-mkdevicemap.c28 create mode 100644 util/grub-mkdevicemap.c
2929
30diff --git a/Makefile.util.def b/Makefile.util.def30diff --git a/Makefile.util.def b/Makefile.util.def
31index bac85e284..eec1924b0 10064431index bac85e2840..eec1924b0e 100644
32--- a/Makefile.util.def32--- a/Makefile.util.def
33+++ b/Makefile.util.def33+++ b/Makefile.util.def
34@@ -324,6 +324,23 @@ program = {34@@ -324,6 +324,23 @@ program = {
@@ -57,7 +57,7 @@ index bac85e284..eec1924b0 100644
57 installdir = sbin;57 installdir = sbin;
58diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m58diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m
59new file mode 10064459new file mode 100644
60index 000000000..96cd6ee7260index 0000000000..96cd6ee723
61--- /dev/null61--- /dev/null
62+++ b/docs/man/grub-mkdevicemap.h2m62+++ b/docs/man/grub-mkdevicemap.h2m
63@@ -0,0 +1,4 @@63@@ -0,0 +1,4 @@
@@ -67,7 +67,7 @@ index 000000000..96cd6ee72
67+.BR grub-probe (8)67+.BR grub-probe (8)
68diff --git a/include/grub/util/deviceiter.h b/include/grub/util/deviceiter.h68diff --git a/include/grub/util/deviceiter.h b/include/grub/util/deviceiter.h
69new file mode 10064469new file mode 100644
70index 000000000..85374978c70index 0000000000..85374978c5
71--- /dev/null71--- /dev/null
72+++ b/include/grub/util/deviceiter.h72+++ b/include/grub/util/deviceiter.h
73@@ -0,0 +1,14 @@73@@ -0,0 +1,14 @@
@@ -87,7 +87,7 @@ index 000000000..85374978c
87+#endif /* ! GRUB_DEVICEITER_MACHINE_UTIL_HEADER */87+#endif /* ! GRUB_DEVICEITER_MACHINE_UTIL_HEADER */
88diff --git a/util/deviceiter.c b/util/deviceiter.c88diff --git a/util/deviceiter.c b/util/deviceiter.c
89new file mode 10064489new file mode 100644
90index 000000000..a4971ef4290index 0000000000..a4971ef429
91--- /dev/null91--- /dev/null
92+++ b/util/deviceiter.c92+++ b/util/deviceiter.c
93@@ -0,0 +1,1021 @@93@@ -0,0 +1,1021 @@
@@ -1114,7 +1114,7 @@ index 000000000..a4971ef42
1114+}1114+}
1115diff --git a/util/devicemap.c b/util/devicemap.c1115diff --git a/util/devicemap.c b/util/devicemap.c
1116new file mode 1006441116new file mode 100644
1117index 000000000..c618644201117index 0000000000..c61864420a
1118--- /dev/null1118--- /dev/null
1119+++ b/util/devicemap.c1119+++ b/util/devicemap.c
1120@@ -0,0 +1,13 @@1120@@ -0,0 +1,13 @@
@@ -1133,7 +1133,7 @@ index 000000000..c61864420
1133+}1133+}
1134diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c1134diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c
1135new file mode 1006441135new file mode 100644
1136index 000000000..c4bbdbf691136index 0000000000..c4bbdbf69c
1137--- /dev/null1137--- /dev/null
1138+++ b/util/grub-mkdevicemap.c1138+++ b/util/grub-mkdevicemap.c
1139@@ -0,0 +1,181 @@1139@@ -0,0 +1,181 @@
diff --git a/debian/patches/series b/debian/patches/series
index 74189fd..3f64825 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -62,7 +62,6 @@ ubuntu-shorter-version-info.patch
62ubuntu-add-initrd-less-boot-fallback.patch62ubuntu-add-initrd-less-boot-fallback.patch
63ubuntu-mkconfig-leave-breadcrumbs.patch63ubuntu-mkconfig-leave-breadcrumbs.patch
64ubuntu-fix-lzma-decompressor-objcopy.patch64ubuntu-fix-lzma-decompressor-objcopy.patch
65ubuntu-clear-invalid-initrd-spacing.patch
66ubuntu-temp-keep-auto-nvram.patch65ubuntu-temp-keep-auto-nvram.patch
67ubuntu-add-devicetree-command-support.patch66ubuntu-add-devicetree-command-support.patch
68ubuntu-boot-from-multipath-dependent-symlink.patch67ubuntu-boot-from-multipath-dependent-symlink.patch
@@ -72,13 +71,14 @@ ubuntu-efi-allow-loopmount-chainload.patch
72cherrypick-lsefisystab-define-smbios3.patch71cherrypick-lsefisystab-define-smbios3.patch
73cherrypick-smbios-module.patch72cherrypick-smbios-module.patch
74cherrypick-lsefisystab-show-dtb.patch73cherrypick-lsefisystab-show-dtb.patch
750075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch740074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
760076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch750075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
770077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch760076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
780078-ubuntu-Update-the-linux-boot-protocol-version-check.patch770077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
79ubuntu-resilient-boot-ignore-alternative-esps.patch78ubuntu-resilient-boot-ignore-alternative-esps.patch
80ubuntu-resilient-boot-boot-order.patch79ubuntu-resilient-boot-boot-order.patch
81ubuntu-speed-zsys-history.patch80ubuntu-speed-zsys-history.patch
81<<<<<<< debian/patches/series
820082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch820082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
830083-safemath-Add-some-arithmetic-primitives-that-check-f.patch830083-safemath-Add-some-arithmetic-primitives-that-check-f.patch
840084-calloc-Make-sure-we-always-have-an-overflow-checking.patch840084-calloc-Make-sure-we-always-have-an-overflow-checking.patch
@@ -104,3 +104,8 @@ ubuntu-speed-zsys-history.patch
1040104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch1040104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch
1050105-linux-Fix-integer-overflows-in-initrd-size-handling.patch1050105-linux-Fix-integer-overflows-in-initrd-size-handling.patch
1060106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch1060106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
107=======
108ubuntu-flavour-order.patch
109ubuntu-dont-verify-loopback-images.patch
110ubuntu-recovery-dis_ucode_ldr.patch
111>>>>>>> debian/patches/series
diff --git a/debian/patches/skip-grub_cmd_set_date.patch b/debian/patches/skip-grub_cmd_set_date.patch
index 08e663b..31cae36 100644
--- a/debian/patches/skip-grub_cmd_set_date.patch
+++ b/debian/patches/skip-grub_cmd_set_date.patch
@@ -1,4 +1,4 @@
1From e37f5abdb9057be5d79ec34bab535ff059fa6b7f Mon Sep 17 00:00:00 20011From 7dfe0ce472f7f0bdbe07cbe67958f06951c88f59 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 28 Oct 2018 19:45:56 +00003Date: Sun, 28 Oct 2018 19:45:56 +0000
4Subject: Skip flaky grub_cmd_set_date test4Subject: Skip flaky grub_cmd_set_date test
@@ -12,7 +12,7 @@ Patch-Name: skip-grub_cmd_set_date.patch
12 1 file changed, 3 insertions(+)12 1 file changed, 3 insertions(+)
1313
14diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in14diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
15index aac120a6c..1bb5be4ca 10064415index aac120a6c5..1bb5be4ca7 100644
16--- a/tests/grub_cmd_set_date.in16--- a/tests/grub_cmd_set_date.in
17+++ b/tests/grub_cmd_set_date.in17+++ b/tests/grub_cmd_set_date.in
18@@ -1,6 +1,9 @@18@@ -1,6 +1,9 @@
diff --git a/debian/patches/sleep-shift.patch b/debian/patches/sleep-shift.patch
index b739b45..957f36b 100644
--- a/debian/patches/sleep-shift.patch
+++ b/debian/patches/sleep-shift.patch
@@ -1,4 +1,4 @@
1From 8ff02f24d30da862a7ffe530aa2ff692ad8f1b06 Mon Sep 17 00:00:00 20011From dd350028f89cd033b832511d1888b49538ad2fd4 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:23 +00003Date: Mon, 13 Jan 2014 12:13:23 +0000
4Subject: Allow Shift to interrupt 'sleep --interruptible'4Subject: Allow Shift to interrupt 'sleep --interruptible'
@@ -17,7 +17,7 @@ Patch-Name: sleep-shift.patch
17 2 files changed, 45 insertions(+), 1 deletion(-)17 2 files changed, 45 insertions(+), 1 deletion(-)
1818
19diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c19diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c
20index e77e7900f..3906b1410 10064420index e77e7900fa..3906b14103 100644
21--- a/grub-core/commands/sleep.c21--- a/grub-core/commands/sleep.c
22+++ b/grub-core/commands/sleep.c22+++ b/grub-core/commands/sleep.c
23@@ -46,6 +46,31 @@ do_print (int n)23@@ -46,6 +46,31 @@ do_print (int n)
@@ -62,7 +62,7 @@ index e77e7900f..3906b1410 100644
62 62
63 return 0;63 return 0;
64diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c64diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
65index d5e0c79a7..3611ee9ea 10064465index d5e0c79a70..3611ee9ea7 100644
66--- a/grub-core/normal/menu.c66--- a/grub-core/normal/menu.c
67+++ b/grub-core/normal/menu.c67+++ b/grub-core/normal/menu.c
68@@ -615,8 +615,27 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)68@@ -615,8 +615,27 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
diff --git a/debian/patches/ubuntu-add-devicetree-command-support.patch b/debian/patches/ubuntu-add-devicetree-command-support.patch
index 316ed31..23b1a52 100644
--- a/debian/patches/ubuntu-add-devicetree-command-support.patch
+++ b/debian/patches/ubuntu-add-devicetree-command-support.patch
@@ -1,4 +1,4 @@
1From a30c330fb776934ef1dbaa9784960172650ecdfa Mon Sep 17 00:00:00 20011From fa7f363abb70ecb9b6368221b9a3c408aa82e605 Mon Sep 17 00:00:00 2001
2From: Dimitri John Ledkov <xnox@ubuntu.com>2From: Dimitri John Ledkov <xnox@ubuntu.com>
3Date: Wed, 22 May 2019 19:57:29 +01003Date: Wed, 22 May 2019 19:57:29 +0100
4Subject: Add devicetree command, if a dtb is present.4Subject: Add devicetree command, if a dtb is present.
@@ -14,10 +14,10 @@ Patch-Name: ubuntu-add-devicetree-command-support.patch
14 1 file changed, 19 insertions(+)14 1 file changed, 19 insertions(+)
1515
16diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in16diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
17index a95992a77..d6937cfef 10064417index af1e096bd6..bbf5d73e39 100644
18--- a/util/grub.d/10_linux.in18--- a/util/grub.d/10_linux.in
19+++ b/util/grub.d/10_linux.in19+++ b/util/grub.d/10_linux.in
20@@ -240,6 +240,17 @@ EOF20@@ -254,6 +254,17 @@ EOF
21 EOF21 EOF
22 fi22 fi
23 fi23 fi
@@ -35,7 +35,7 @@ index a95992a77..d6937cfef 100644
35 fi35 fi
36 sed "s/^/$submenu_indentation/" << EOF36 sed "s/^/$submenu_indentation/" << EOF
37 }37 }
38@@ -378,6 +389,14 @@ while [ "x$list" != "x" ] ; do38@@ -389,6 +400,14 @@ while [ "x$list" != "x" ] ; do
39 gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&239 gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
40 fi40 fi
41 41
diff --git a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
index 8778d34..eee209a 100644
--- a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
+++ b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
@@ -1,4 +1,4 @@
1From f44b20b94883a77b5f8ef8370bedb8457456907d Mon Sep 17 00:00:00 20011From ab2099f2c6c11ea45a6aadefeb785636477e7430 Mon Sep 17 00:00:00 2001
2From: Chris Glass <chris.glass@canonical.com>2From: Chris Glass <chris.glass@canonical.com>
3Date: Fri, 9 Mar 2018 13:47:07 +01003Date: Fri, 9 Mar 2018 13:47:07 +0100
4Subject: UBUNTU: Added initrd-less boot capabilities.4Subject: UBUNTU: Added initrd-less boot capabilities.
@@ -11,15 +11,15 @@ Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
11Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch11Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch
12---12---
13 Makefile.am | 3 ++13 Makefile.am | 3 ++
14 configure.ac | 10 +++++++14 configure.ac | 10 ++++++
15 grub-initrd-fallback.service | 12 ++++++++15 grub-initrd-fallback.service | 12 +++++++
16 util/grub.d/00_header.in | 27 +++++++++++++++++16 util/grub.d/00_header.in | 27 ++++++++++++++
17 util/grub.d/10_linux.in | 56 +++++++++++++++++++++++++-----------17 util/grub.d/10_linux.in | 68 +++++++++++++++++++++++++++---------
18 5 files changed, 91 insertions(+), 17 deletions(-)18 5 files changed, 104 insertions(+), 16 deletions(-)
19 create mode 100644 grub-initrd-fallback.service19 create mode 100644 grub-initrd-fallback.service
2020
21diff --git a/Makefile.am b/Makefile.am21diff --git a/Makefile.am b/Makefile.am
22index 1f4bb9b8c..e6a220711 10064422index 1f4bb9b8c5..e6a220711e 100644
23--- a/Makefile.am23--- a/Makefile.am
24+++ b/Makefile.am24+++ b/Makefile.am
25@@ -473,6 +473,9 @@ ChangeLog: FORCE25@@ -473,6 +473,9 @@ ChangeLog: FORCE
@@ -33,7 +33,7 @@ index 1f4bb9b8c..e6a220711 100644
33 33
34 syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg34 syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg
35diff --git a/configure.ac b/configure.ac35diff --git a/configure.ac b/configure.ac
36index 883245553..1819188f9 10064436index 883245553d..1819188f9f 100644
37--- a/configure.ac37--- a/configure.ac
38+++ b/configure.ac38+++ b/configure.ac
39@@ -305,6 +305,16 @@ AC_SUBST(grubdirname)39@@ -305,6 +305,16 @@ AC_SUBST(grubdirname)
@@ -55,7 +55,7 @@ index 883245553..1819188f9 100644
55 #55 #
56diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service56diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service
57new file mode 10064457new file mode 100644
58index 000000000..48778c9f758index 0000000000..48778c9f76
59--- /dev/null59--- /dev/null
60+++ b/grub-initrd-fallback.service60+++ b/grub-initrd-fallback.service
61@@ -0,0 +1,12 @@61@@ -0,0 +1,12 @@
@@ -72,7 +72,7 @@ index 000000000..48778c9f7
72+[Install]72+[Install]
73+WantedBy=multi-user.target rescue.target emergency.target73+WantedBy=multi-user.target rescue.target emergency.target
74diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in74diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
75index b7135b655..2642f66c5 10064475index b7135b655f..2642f66c59 100644
76--- a/util/grub.d/00_header.in76--- a/util/grub.d/00_header.in
77+++ b/util/grub.d/00_header.in77+++ b/util/grub.d/00_header.in
78@@ -50,6 +50,18 @@ if [ -s \$prefix/grubenv ]; then78@@ -50,6 +50,18 @@ if [ -s \$prefix/grubenv ]; then
@@ -117,7 +117,7 @@ index b7135b655..2642f66c5 100644
117 cat <<EOF117 cat <<EOF
118 function recordfail {118 function recordfail {
119diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in119diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
120index aa9666e5a..13f39b9f6 100644120index aa9666e5ad..af1e096bd6 100644
121--- a/util/grub.d/10_linux.in121--- a/util/grub.d/10_linux.in
122+++ b/util/grub.d/10_linux.in122+++ b/util/grub.d/10_linux.in
123@@ -118,6 +118,10 @@ if [ "$vt_handoff" = 1 ]; then123@@ -118,6 +118,10 @@ if [ "$vt_handoff" = 1 ]; then
@@ -131,7 +131,7 @@ index aa9666e5a..13f39b9f6 100644
131 linux_entry ()131 linux_entry ()
132 {132 {
133 os="$1"133 os="$1"
134@@ -193,31 +197,49 @@ EOF134@@ -193,31 +197,63 @@ EOF
135 linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}135 linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
136 EOF136 EOF
137 else137 else
@@ -143,6 +143,14 @@ index aa9666e5a..13f39b9f6 100644
143+ linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"143+ linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
144+ fi144+ fi
145+ message="$(gettext_printf "Loading initial ramdisk ...")"145+ message="$(gettext_printf "Loading initial ramdisk ...")"
146+ initrd_path=
147+ for i in ${initrd}; do
148+ initrd_path="${initrd_path} ${rel_dirname}/${i}"
149+ done
150+ initrd_path_only_early=
151+ for i in ${initrd_early}; do
152+ initrd_path_only_early="${initrd_path_only_early} ${rel_dirname}/${i}"
153+ done
146+ if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then154+ if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
147+ sed "s/^/$submenu_indentation/" << EOF155+ sed "s/^/$submenu_indentation/" << EOF
148+ if [ "\${initrdfail}" = 1 ]; then156+ if [ "\${initrdfail}" = 1 ]; then
@@ -153,12 +161,18 @@ index aa9666e5a..13f39b9f6 100644
153+ echo '$(echo "$message" | grub_quote)'161+ echo '$(echo "$message" | grub_quote)'
154+EOF162+EOF
155+ fi163+ fi
156+
157 sed "s/^/$submenu_indentation/" << EOF164 sed "s/^/$submenu_indentation/" << EOF
158- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}165- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
159+ initrd ${rel_dirname}/${initrd}166+ initrd $(echo $initrd_path)
160+ else167+ else
161+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1168+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
169+EOF
170+ if [ -n "$initrd_path_only_early" ]; then
171+ sed "s/^/$submenu_indentation/" << EOF
172+ initrd $(echo $initrd_path_only_early)
173+EOF
174+ fi
175+ sed "s/^/$submenu_indentation/" << EOF
162+ fi176+ fi
163+ initrdfail177+ initrdfail
164 EOF178 EOF
@@ -188,10 +202,9 @@ index aa9666e5a..13f39b9f6 100644
188- initrd_path="${initrd_path} ${rel_dirname}/${i}"202- initrd_path="${initrd_path} ${rel_dirname}/${i}"
189- done203- done
190- sed "s/^/$submenu_indentation/" << EOF204- sed "s/^/$submenu_indentation/" << EOF
191- initrd $(echo $initrd_path)
192+ fi205+ fi
193+ sed "s/^/$submenu_indentation/" << EOF206+ sed "s/^/$submenu_indentation/" << EOF
194+ initrd ${rel_dirname}/${initrd}207 initrd $(echo $initrd_path)
195 EOF208 EOF
196+ fi209+ fi
197+ fi210+ fi
diff --git a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
index d8b8810..98571fd 100644
--- a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
+++ b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
@@ -1,4 +1,4 @@
1From 4f4f4b1ce88642c1c13f12b425484906098590b5 Mon Sep 17 00:00:00 20011From 704ab1283bad04e55ee7cd05281a17aa24e382c6 Mon Sep 17 00:00:00 2001
2From: Michael Hudson-Doyle <michael.hudson@canonical.com>2From: Michael Hudson-Doyle <michael.hudson@canonical.com>
3Date: Tue, 6 Aug 2019 12:31:47 +12003Date: Tue, 6 Aug 2019 12:31:47 +1200
4Subject: UBUNTU: Boot from multipath-dependent symlink when / is multipathed.4Subject: UBUNTU: Boot from multipath-dependent symlink when / is multipathed.
@@ -16,7 +16,7 @@ Patch-Name: ubuntu-boot-from-multipath-dependent-symlink.patch
16 1 file changed, 41 insertions(+)16 1 file changed, 41 insertions(+)
1717
18diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in18diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
19index d6937cfef..3eb0e6936 10064419index bbf5d73e39..14a89ba13d 100644
20--- a/util/grub.d/10_linux.in20--- a/util/grub.d/10_linux.in
21+++ b/util/grub.d/10_linux.in21+++ b/util/grub.d/10_linux.in
22@@ -65,6 +65,47 @@ esac22@@ -65,6 +65,47 @@ esac
diff --git a/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch b/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch
23deleted file mode 10064423deleted file mode 100644
index 14951f6..0000000
--- a/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From a5307d00cee7f22074b89f393cb99c968f657ddb Mon Sep 17 00:00:00 2001
2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3Date: Thu, 11 Jul 2019 09:07:47 -0400
4Subject: UBUNTU: Clear up incorrect spacing when not using early initrds
5
6Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
7Patch-Name: ubuntu-clear-invalid-initrd-spacing.patch
8---
9 util/grub.d/10_linux.in | 5 ++++-
10 1 file changed, 4 insertions(+), 1 deletion(-)
11
12diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
13index 13f39b9f6..a95992a77 100644
14--- a/util/grub.d/10_linux.in
15+++ b/util/grub.d/10_linux.in
16@@ -366,7 +366,10 @@ while [ "x$list" != "x" ] ; do
17
18 initrd=
19 if test -n "${initrd_early}" || test -n "${initrd_real}"; then
20- initrd="${initrd_early} ${initrd_real}"
21+ initrd="${initrd_real}"
22+ if test -n "${initrd_early}"; then
23+ initrd="${initrd_early} ${initrd}"
24+ fi
25
26 initrd_display=
27 for i in ${initrd}; do
diff --git a/debian/patches/ubuntu-dont-verify-loopback-images.patch b/debian/patches/ubuntu-dont-verify-loopback-images.patch
28new file mode 1006440new file mode 100644
index 0000000..0531814
--- /dev/null
+++ b/debian/patches/ubuntu-dont-verify-loopback-images.patch
@@ -0,0 +1,37 @@
1From 696a85aae06675d927e2942a0d550e0e66078239 Mon Sep 17 00:00:00 2001
2From: Chris Coulson <chris.coulson@canonical.com>
3Date: Mon, 1 Jun 2020 14:03:37 +0100
4Subject: UBUNTU: disk/loopback: Don't verify loopback images
5
6When a file is verified, the entire contents of the verified file are
7loaded in to memory and retained until the file handle is closed. A
8consequence of this is that opening a loopback image can incur a
9significant memory cost.
10
11As loopback devices are just another disk implementation, don't treat
12loopback images any differently to physical disk images, and skip
13verification of them. Files opened from the filesystem within a loopback
14image will still be passed to verifier modules where required.
15
16Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
17LP: #1878541
18Forwarded: yes, https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00002.html
19Patch-Name: ubuntu-dont-verify-loopback-images.patch
20---
21 grub-core/disk/loopback.c | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
25index ccb4b167cc..210201d22d 100644
26--- a/grub-core/disk/loopback.c
27+++ b/grub-core/disk/loopback.c
28@@ -86,7 +86,8 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
29 return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
30
31 file = grub_file_open (args[1], GRUB_FILE_TYPE_LOOPBACK
32- | GRUB_FILE_TYPE_NO_DECOMPRESS);
33+ | GRUB_FILE_TYPE_NO_DECOMPRESS |
34+ GRUB_FILE_TYPE_SKIP_SIGNATURE);
35 if (! file)
36 return grub_errno;
37
diff --git a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
index 94cd6db..3d274cf 100644
--- a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
+++ b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
@@ -1,4 +1,4 @@
1From fdcce3de9327b0c8009054baa1ed13fb8572e1ac Mon Sep 17 00:00:00 20011From 1cc5aadf105ba7037e2625ac22a89d7feea09109 Mon Sep 17 00:00:00 2001
2From: Dimitri John Ledkov <xnox@ubuntu.com>2From: Dimitri John Ledkov <xnox@ubuntu.com>
3Date: Wed, 27 Nov 2019 23:12:35 +00003Date: Wed, 27 Nov 2019 23:12:35 +0000
4Subject: UBUNTU: Allow chainloading EFI apps from loop mounts.4Subject: UBUNTU: Allow chainloading EFI apps from loop mounts.
@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-allow-loopmount-chainload.patch
15 create mode 100644 include/grub/loopback.h15 create mode 100644 include/grub/loopback.h
1616
17diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c17diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
18index cdf9123fa..ccb4b167c 10064418index cdf9123fa5..ccb4b167cc 100644
19--- a/grub-core/disk/loopback.c19--- a/grub-core/disk/loopback.c
20+++ b/grub-core/disk/loopback.c20+++ b/grub-core/disk/loopback.c
21@@ -21,20 +21,13 @@21@@ -21,20 +21,13 @@
@@ -41,7 +41,7 @@ index cdf9123fa..ccb4b167c 100644
41 static unsigned long last_id = 0;41 static unsigned long last_id = 0;
42 42
43diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c43diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
44index ec80f415b..04e815c05 10064444index ec80f415b8..04e815c052 100644
45--- a/grub-core/loader/efi/chainloader.c45--- a/grub-core/loader/efi/chainloader.c
46+++ b/grub-core/loader/efi/chainloader.c46+++ b/grub-core/loader/efi/chainloader.c
47@@ -24,6 +24,7 @@47@@ -24,6 +24,7 @@
@@ -91,7 +91,7 @@ index ec80f415b..04e815c05 100644
91 91
92diff --git a/include/grub/loopback.h b/include/grub/loopback.h92diff --git a/include/grub/loopback.h b/include/grub/loopback.h
93new file mode 10064493new file mode 100644
94index 000000000..3b9a9e32e94index 0000000000..3b9a9e32e8
95--- /dev/null95--- /dev/null
96+++ b/include/grub/loopback.h96+++ b/include/grub/loopback.h
97@@ -0,0 +1,30 @@97@@ -0,0 +1,30 @@
diff --git a/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch b/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
index b1efc2e..66749d2 100644
--- a/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
+++ b/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
@@ -1,4 +1,4 @@
1From ab83d387cda5158fd4a3940dc067c55a6ee7f9f4 Mon Sep 17 00:00:00 20011From a7f1a5663f165025c279dd0a13cdec06d27f03e8 Mon Sep 17 00:00:00 2001
2From: Hans de Goede <hdegoede@redhat.com>2From: Hans de Goede <hdegoede@redhat.com>
3Date: Tue, 6 Mar 2018 17:11:15 +01003Date: Tue, 6 Mar 2018 17:11:15 +0100
4Subject: UBUNTU: EFI: Do not set text-mode until we actually need it4Subject: UBUNTU: EFI: Do not set text-mode until we actually need it
@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-console-set-text-mode-as-needed.patch
15 1 file changed, 45 insertions(+), 23 deletions(-)15 1 file changed, 45 insertions(+), 23 deletions(-)
1616
17diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c17diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
18index 4840cc59d..b61da7d0d 10064418index 4840cc59d3..b61da7d0d0 100644
19--- a/grub-core/term/efi/console.c19--- a/grub-core/term/efi/console.c
20+++ b/grub-core/term/efi/console.c20+++ b/grub-core/term/efi/console.c
21@@ -24,6 +24,11 @@21@@ -24,6 +24,11 @@
diff --git a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
index ff9a6b1..20a2db3 100644
--- a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
+++ b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
@@ -1,4 +1,4 @@
1From 56715cae7b821ff8395078ff79a4a2ee937cb4db Mon Sep 17 00:00:00 20011From 4dfa975de0c2289b33ab76f06e70b01583f2c56d Mon Sep 17 00:00:00 2001
2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3Date: Wed, 3 Jul 2019 15:21:16 -04003Date: Wed, 3 Jul 2019 15:21:16 -0400
4Subject: UBUNTU: Have the lzma decompressor image only contain the .text4Subject: UBUNTU: Have the lzma decompressor image only contain the .text
@@ -16,7 +16,7 @@ Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
16 1 file changed, 1 insertion(+), 1 deletion(-)16 1 file changed, 1 insertion(+), 1 deletion(-)
1717
18diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def18diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
19index 1731c53f0..33e75021d 10064419index 1731c53f08..33e75021da 100644
20--- a/grub-core/Makefile.core.def20--- a/grub-core/Makefile.core.def
21+++ b/grub-core/Makefile.core.def21+++ b/grub-core/Makefile.core.def
22@@ -547,7 +547,7 @@ image = {22@@ -547,7 +547,7 @@ image = {
diff --git a/debian/patches/ubuntu-flavour-order.patch b/debian/patches/ubuntu-flavour-order.patch
23new file mode 10064423new file mode 100644
index 0000000..9308d1e
--- /dev/null
+++ b/debian/patches/ubuntu-flavour-order.patch
@@ -0,0 +1,61 @@
1From 2d236733ca4d74521cefab7fbf5e0f00967a028b Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Tue, 9 Jun 2020 11:50:23 +0200
4Subject: UBUNTU: Add GRUB_FLAVOUR_ORDER configuration item
5
6This allows you to specify flavours that will be preferred
7over other ones, and the order in which they are preferred
8- items in the list win over items not in the list, and items
9earlier in the list win over later ones.
10
11We still have to sort out storage of this, as we need to
12inject that from packages or the UA client and similar,
13and we can't just modify /etc/default/grub for that.
14
15LP: #1882663
16Patch-Name: ubuntu-flavour-order.patch
17---
18 util/grub-mkconfig.in | 3 ++-
19 util/grub-mkconfig_lib.in | 15 +++++++++++++++
20 2 files changed, 17 insertions(+), 1 deletion(-)
21
22diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
23index 72f1e25a03..6c8988fd60 100644
24--- a/util/grub-mkconfig.in
25+++ b/util/grub-mkconfig.in
26@@ -260,7 +260,8 @@ export GRUB_DEFAULT \
27 GRUB_RECORDFAIL_TIMEOUT \
28 GRUB_RECOVERY_TITLE \
29 GRUB_FORCE_PARTUUID \
30- GRUB_DISABLE_INITRD
31+ GRUB_DISABLE_INITRD \
32+ GRUB_FLAVOUR_ORDER
33
34 if test "x${grub_cfg}" != "x"; then
35 rm -f "${grub_cfg}.new"
36diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
37index fe6319abe0..7e2d1bc214 100644
38--- a/util/grub-mkconfig_lib.in
39+++ b/util/grub-mkconfig_lib.in
40@@ -270,6 +270,21 @@ version_test_gt ()
41 if [ "x$version_test_gt_b" = "x" ] ; then
42 return 0
43 fi
44+
45+ # GRUB_FLAVOUR_ORDER is an ordered list of kernels, in decreasing
46+ # priority. Any items in the list take precedence over other kernels,
47+ # and earlier flavours are preferred over later ones.
48+ for flavour in ${GRUB_FLAVOUR_ORDER:-}; do
49+ version_test_gt_a_preferred=$(echo "$version_test_gt_a" | grep -- "-[0-9]*-$flavour\$")
50+ version_test_gt_b_preferred=$(echo "$version_test_gt_b" | grep -- "-[0-9]*-$flavour\$")
51+
52+ if [ -n "$version_test_gt_a_preferred" -a -z "$version_test_gt_b_preferred" ] ; then
53+ return 0
54+ elif [ -z "$version_test_gt_a_preferred" -a -n "$version_test_gt_b_preferred" ] ; then
55+ return 1
56+ fi
57+ done
58+
59 case "$version_test_gt_a:$version_test_gt_b" in
60 *.old:*.old) ;;
61 *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
diff --git a/debian/patches/ubuntu-grub-install-extra-removable.patch b/debian/patches/ubuntu-grub-install-extra-removable.patch
index 653d6db..0f1b7a5 100644
--- a/debian/patches/ubuntu-grub-install-extra-removable.patch
+++ b/debian/patches/ubuntu-grub-install-extra-removable.patch
@@ -1,4 +1,4 @@
1From a2c29740e83520a037e3aa6e88c874ca0b5b991a Mon Sep 17 00:00:00 20011From b87f13adb4998b9f68981636533b1d186030ac83 Mon Sep 17 00:00:00 2001
2From: Steve McIntyre <93sam@debian.org>2From: Steve McIntyre <93sam@debian.org>
3Date: Wed, 3 Dec 2014 01:25:12 +00003Date: Wed, 3 Dec 2014 01:25:12 +0000
4Subject: UBUNTU: Add support for forcing EFI installation to the removable4Subject: UBUNTU: Add support for forcing EFI installation to the removable
@@ -23,7 +23,7 @@ Patch-Name: ubuntu-grub-install-extra-removable.patch
23 1 file changed, 133 insertions(+), 2 deletions(-)23 1 file changed, 133 insertions(+), 2 deletions(-)
2424
25diff --git a/util/grub-install.c b/util/grub-install.c25diff --git a/util/grub-install.c b/util/grub-install.c
26index 64c292383..030464645 10064426index 64c292383f..0304646453 100644
27--- a/util/grub-install.c27--- a/util/grub-install.c
28+++ b/util/grub-install.c28+++ b/util/grub-install.c
29@@ -56,6 +56,7 @@29@@ -56,6 +56,7 @@
diff --git a/debian/patches/ubuntu-install-signed.patch b/debian/patches/ubuntu-install-signed.patch
index 688b5ab..66f46b9 100644
--- a/debian/patches/ubuntu-install-signed.patch
+++ b/debian/patches/ubuntu-install-signed.patch
@@ -1,4 +1,4 @@
1From e66b6951c463ed36d7c3a8cff50c5dbdfa29e99a Mon Sep 17 00:00:00 20011From 4d418a4d382eeb84eb67c8581819dd10894ed048 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:22 +00003Date: Mon, 13 Jan 2014 12:13:22 +0000
4Subject: UBUNTU: Install signed images if UEFI Secure Boot is enabled4Subject: UBUNTU: Install signed images if UEFI Secure Boot is enabled
@@ -19,7 +19,7 @@ Patch-Name: ubuntu-install-signed.patch
19 1 file changed, 156 insertions(+), 59 deletions(-)19 1 file changed, 156 insertions(+), 59 deletions(-)
2020
21diff --git a/util/grub-install.c b/util/grub-install.c21diff --git a/util/grub-install.c b/util/grub-install.c
22index 3b4606eef..e1e40cf2b 10064422index 3b4606eef1..e1e40cf2b5 100644
23--- a/util/grub-install.c23--- a/util/grub-install.c
24+++ b/util/grub-install.c24+++ b/util/grub-install.c
25@@ -80,6 +80,7 @@ static char *label_color;25@@ -80,6 +80,7 @@ static char *label_color;
diff --git a/debian/patches/ubuntu-linuxefi.patch b/debian/patches/ubuntu-linuxefi.patch
index 74fec04..4cfdc1c 100644
--- a/debian/patches/ubuntu-linuxefi.patch
+++ b/debian/patches/ubuntu-linuxefi.patch
@@ -1,4 +1,4 @@
1From 3451d405d55fd342aa581ecc23ee535ad533c61d Mon Sep 17 00:00:00 20011From 0e2ddafb154df1708801faef74aa4f2d40d55d35 Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <mjg@redhat.com>2From: Matthew Garrett <mjg@redhat.com>
3Date: Wed, 27 Feb 2019 12:20:48 -05003Date: Wed, 27 Feb 2019 12:20:48 -0500
4Subject: UBUNTU: Add support for linuxefi4Subject: UBUNTU: Add support for linuxefi
@@ -358,7 +358,7 @@ Last-Update: 2018-12-07
358 create mode 100644 include/grub/sparc64/linux.h358 create mode 100644 include/grub/sparc64/linux.h
359359
360diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am360diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
361index 3ea8e7ff4..c6ba5b2d7 100644361index 3ea8e7ff45..c6ba5b2d76 100644
362--- a/grub-core/Makefile.am362--- a/grub-core/Makefile.am
363+++ b/grub-core/Makefile.am363+++ b/grub-core/Makefile.am
364@@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h364@@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
@@ -370,7 +370,7 @@ index 3ea8e7ff4..c6ba5b2d7 100644
370 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h370 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
371 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h371 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
372diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def372diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
373index aadb4cdff..1731c53f0 100644373index aadb4cdff8..1731c53f08 100644
374--- a/grub-core/Makefile.core.def374--- a/grub-core/Makefile.core.def
375+++ b/grub-core/Makefile.core.def375+++ b/grub-core/Makefile.core.def
376@@ -207,6 +207,7 @@ kernel = {376@@ -207,6 +207,7 @@ kernel = {
@@ -428,7 +428,7 @@ index aadb4cdff..1731c53f0 100644
428 enable = i386_coreboot;428 enable = i386_coreboot;
429 enable = efi;429 enable = efi;
430diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c430diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
431index a0c164e54..41a7f3f04 100644431index a0c164e54f..41a7f3f046 100644
432--- a/grub-core/commands/iorw.c432--- a/grub-core/commands/iorw.c
433+++ b/grub-core/commands/iorw.c433+++ b/grub-core/commands/iorw.c
434@@ -23,6 +23,7 @@434@@ -23,6 +23,7 @@
@@ -460,7 +460,7 @@ index a0c164e54..41a7f3f04 100644
460 grub_unregister_extcmd (cmd_read_word);460 grub_unregister_extcmd (cmd_read_word);
461 grub_unregister_extcmd (cmd_read_dword);461 grub_unregister_extcmd (cmd_read_dword);
462diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c462diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c
463index 98769eadb..088cbe9e2 100644463index 98769eadb3..088cbe9e2b 100644
464--- a/grub-core/commands/memrw.c464--- a/grub-core/commands/memrw.c
465+++ b/grub-core/commands/memrw.c465+++ b/grub-core/commands/memrw.c
466@@ -22,6 +22,7 @@466@@ -22,6 +22,7 @@
@@ -492,7 +492,7 @@ index 98769eadb..088cbe9e2 100644
492 grub_unregister_extcmd (cmd_read_word);492 grub_unregister_extcmd (cmd_read_word);
493 grub_unregister_extcmd (cmd_read_dword);493 grub_unregister_extcmd (cmd_read_dword);
494diff --git a/grub-core/kern/arm/coreboot/coreboot.S b/grub-core/kern/arm/coreboot/coreboot.S494diff --git a/grub-core/kern/arm/coreboot/coreboot.S b/grub-core/kern/arm/coreboot/coreboot.S
495index a1104526c..70998c066 100644495index a1104526c1..70998c066a 100644
496--- a/grub-core/kern/arm/coreboot/coreboot.S496--- a/grub-core/kern/arm/coreboot/coreboot.S
497+++ b/grub-core/kern/arm/coreboot/coreboot.S497+++ b/grub-core/kern/arm/coreboot/coreboot.S
498@@ -42,3 +42,9 @@ FUNCTION(grub_armv7_get_timer_frequency)498@@ -42,3 +42,9 @@ FUNCTION(grub_armv7_get_timer_frequency)
@@ -506,7 +506,7 @@ index a1104526c..70998c066 100644
506+ void *kernel_param);506+ void *kernel_param);
507+507+
508diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c508diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
509index 074dfc3c6..d665c10fc 100644509index 074dfc3c6f..d665c10fcc 100644
510--- a/grub-core/kern/dl.c510--- a/grub-core/kern/dl.c
511+++ b/grub-core/kern/dl.c511+++ b/grub-core/kern/dl.c
512@@ -32,6 +32,7 @@512@@ -32,6 +32,7 @@
@@ -518,7 +518,7 @@ index 074dfc3c6..d665c10fc 100644
518 /* Platforms where modules are in a readonly area of memory. */518 /* Platforms where modules are in a readonly area of memory. */
519 #if defined(GRUB_MACHINE_QEMU)519 #if defined(GRUB_MACHINE_QEMU)
520diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c520diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
521index 96204e39b..6e1ceb905 100644521index 96204e39b9..6e1ceb9051 100644
522--- a/grub-core/kern/efi/efi.c522--- a/grub-core/kern/efi/efi.c
523+++ b/grub-core/kern/efi/efi.c523+++ b/grub-core/kern/efi/efi.c
524@@ -273,34 +273,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,524@@ -273,34 +273,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
@@ -557,7 +557,7 @@ index 96204e39b..6e1ceb905 100644
557 557
558 /* Search the mods section from the PE32/PE32+ image. This code uses558 /* Search the mods section from the PE32/PE32+ image. This code uses
559diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c559diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
560index b02fab1b1..a9e37108c 100644560index b02fab1b10..a9e37108c6 100644
561--- a/grub-core/kern/efi/mm.c561--- a/grub-core/kern/efi/mm.c
562+++ b/grub-core/kern/efi/mm.c562+++ b/grub-core/kern/efi/mm.c
563@@ -113,6 +113,38 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address,563@@ -113,6 +113,38 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address,
@@ -601,7 +601,7 @@ index b02fab1b1..a9e37108c 100644
601 grub_efi_allocate_pages_real (grub_efi_physical_address_t address,601 grub_efi_allocate_pages_real (grub_efi_physical_address_t address,
602diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c602diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c
603new file mode 100644603new file mode 100644
604index 000000000..c14f401d7604index 0000000000..c14f401d7e
605--- /dev/null605--- /dev/null
606+++ b/grub-core/kern/efi/sb.c606+++ b/grub-core/kern/efi/sb.c
607@@ -0,0 +1,66 @@607@@ -0,0 +1,66 @@
@@ -672,7 +672,7 @@ index 000000000..c14f401d7
672+#endif672+#endif
673+}673+}
674diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c674diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
675index ef3e9f944..1a5296a60 100644675index ef3e9f9444..1a5296a60c 100644
676--- a/grub-core/loader/arm64/linux.c676--- a/grub-core/loader/arm64/linux.c
677+++ b/grub-core/loader/arm64/linux.c677+++ b/grub-core/loader/arm64/linux.c
678@@ -27,6 +27,7 @@678@@ -27,6 +27,7 @@
@@ -720,7 +720,7 @@ index ef3e9f944..1a5296a60 100644
720 linux_args = grub_malloc (cmdline_size);720 linux_args = grub_malloc (cmdline_size);
721 if (!linux_args)721 if (!linux_args)
722diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c722diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
723index 74888c463..69c2a10d3 100644723index 74888c463b..69c2a10d35 100644
724--- a/grub-core/loader/efi/appleloader.c724--- a/grub-core/loader/efi/appleloader.c
725+++ b/grub-core/loader/efi/appleloader.c725+++ b/grub-core/loader/efi/appleloader.c
726@@ -24,6 +24,7 @@726@@ -24,6 +24,7 @@
@@ -751,7 +751,7 @@ index 74888c463..69c2a10d3 100644
751 grub_unregister_command (cmd);751 grub_unregister_command (cmd);
752 }752 }
753diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c753diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
754index cd92ea3f2..ec80f415b 100644754index cd92ea3f24..ec80f415b8 100644
755--- a/grub-core/loader/efi/chainloader.c755--- a/grub-core/loader/efi/chainloader.c
756+++ b/grub-core/loader/efi/chainloader.c756+++ b/grub-core/loader/efi/chainloader.c
757@@ -32,6 +32,9 @@757@@ -32,6 +32,9 @@
@@ -1701,7 +1701,7 @@ index cd92ea3f2..ec80f415b 100644
1701 1701
1702 return grub_errno;1702 return grub_errno;
1703diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c1703diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
1704index f0c2d91be..5360e6c1f 1006441704index f0c2d91be2..5360e6c1f7 100644
1705--- a/grub-core/loader/efi/fdt.c1705--- a/grub-core/loader/efi/fdt.c
1706+++ b/grub-core/loader/efi/fdt.c1706+++ b/grub-core/loader/efi/fdt.c
1707@@ -25,6 +25,7 @@1707@@ -25,6 +25,7 @@
@@ -1714,7 +1714,7 @@ index f0c2d91be..5360e6c1f 100644
1714 static void *fdt;1714 static void *fdt;
1715diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c1715diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
1716new file mode 1006441716new file mode 100644
1717index 000000000..e372b26a11717index 0000000000..e372b26a1b
1718--- /dev/null1718--- /dev/null
1719+++ b/grub-core/loader/efi/linux.c1719+++ b/grub-core/loader/efi/linux.c
1720@@ -0,0 +1,86 @@1720@@ -0,0 +1,86 @@
@@ -1805,7 +1805,7 @@ index 000000000..e372b26a1
1805+ return GRUB_ERR_BUG;1805+ return GRUB_ERR_BUG;
1806+}1806+}
1807diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c1807diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
1808index 3730ed382..5b9b92d6b 1006441808index 3730ed3824..5b9b92d6ba 100644
1809--- a/grub-core/loader/i386/bsd.c1809--- a/grub-core/loader/i386/bsd.c
1810+++ b/grub-core/loader/i386/bsd.c1810+++ b/grub-core/loader/i386/bsd.c
1811@@ -39,6 +39,7 @@1811@@ -39,6 +39,7 @@
@@ -1838,7 +1838,7 @@ index 3730ed382..5b9b92d6b 100644
1838 grub_unregister_extcmd (cmd_netbsd);1838 grub_unregister_extcmd (cmd_netbsd);
1839diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c1839diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
1840new file mode 1006441840new file mode 100644
1841index 000000000..6b6aef87f1841index 0000000000..6b6aef87f7
1842--- /dev/null1842--- /dev/null
1843+++ b/grub-core/loader/i386/efi/linux.c1843+++ b/grub-core/loader/i386/efi/linux.c
1844@@ -0,0 +1,379 @@1844@@ -0,0 +1,379 @@
@@ -2222,7 +2222,7 @@ index 000000000..6b6aef87f
2222+ grub_unregister_command (cmd_initrd);2222+ grub_unregister_command (cmd_initrd);
2223+}2223+}
2224diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c2224diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
2225index d0501e229..4328bcbdb 1006442225index d0501e2295..4328bcbdb0 100644
2226--- a/grub-core/loader/i386/linux.c2226--- a/grub-core/loader/i386/linux.c
2227+++ b/grub-core/loader/i386/linux.c2227+++ b/grub-core/loader/i386/linux.c
2228@@ -45,6 +45,7 @@ GRUB_MOD_LICENSE ("GPLv3+");2228@@ -45,6 +45,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
@@ -2390,7 +2390,7 @@ index d0501e229..4328bcbdb 100644
2390 {2390 {
2391 grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));2391 grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
2392diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c2392diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
2393index 47ea2945e..3866f048b 1006442393index 47ea2945e4..3866f048bb 100644
2394--- a/grub-core/loader/i386/pc/linux.c2394--- a/grub-core/loader/i386/pc/linux.c
2395+++ b/grub-core/loader/i386/pc/linux.c2395+++ b/grub-core/loader/i386/pc/linux.c
2396@@ -35,6 +35,7 @@2396@@ -35,6 +35,7 @@
@@ -2503,7 +2503,7 @@ index 47ea2945e..3866f048b 100644
2503 grub_unregister_command (cmd_initrd);2503 grub_unregister_command (cmd_initrd);
2504 }2504 }
2505diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c2505diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
2506index 4a98d7082..3e6ad166d 1006442506index 4a98d70825..3e6ad166dc 100644
2507--- a/grub-core/loader/multiboot.c2507--- a/grub-core/loader/multiboot.c
2508+++ b/grub-core/loader/multiboot.c2508+++ b/grub-core/loader/multiboot.c
2509@@ -50,6 +50,7 @@2509@@ -50,6 +50,7 @@
@@ -2535,7 +2535,7 @@ index 4a98d7082..3e6ad166d 100644
2535 grub_unregister_command (cmd_module);2535 grub_unregister_command (cmd_module);
2536 }2536 }
2537diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c2537diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
2538index 7f74d1d6f..e0f47e72b 1006442538index 7f74d1d6fc..e0f47e72b0 100644
2539--- a/grub-core/loader/xnu.c2539--- a/grub-core/loader/xnu.c
2540+++ b/grub-core/loader/xnu.c2540+++ b/grub-core/loader/xnu.c
2541@@ -34,6 +34,7 @@2541@@ -34,6 +34,7 @@
@@ -2567,7 +2567,7 @@ index 7f74d1d6f..e0f47e72b 100644
2567 grub_unregister_command (cmd_resume);2567 grub_unregister_command (cmd_resume);
2568 #endif2568 #endif
2569diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h2569diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h
2570index 4269adc6d..cc8174ccd 1006442570index 4269adc6da..cc8174ccdf 100644
2571--- a/include/grub/arm64/linux.h2571--- a/include/grub/arm64/linux.h
2572+++ b/include/grub/arm64/linux.h2572+++ b/include/grub/arm64/linux.h
2573@@ -20,6 +20,8 @@2573@@ -20,6 +20,8 @@
@@ -2580,7 +2580,7 @@ index 4269adc6d..cc8174ccd 100644
2580 /* From linux/Documentation/arm64/booting.txt */2580 /* From linux/Documentation/arm64/booting.txt */
2581 struct linux_arm64_kernel_header2581 struct linux_arm64_kernel_header
2582diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h2582diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
2583index a237952b3..5b6387581 1006442583index a237952b37..5b63875812 100644
2584--- a/include/grub/efi/efi.h2584--- a/include/grub/efi/efi.h
2585+++ b/include/grub/efi/efi.h2585+++ b/include/grub/efi/efi.h
2586@@ -47,6 +47,9 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address,2586@@ -47,6 +47,9 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address,
@@ -2603,7 +2603,7 @@ index a237952b3..5b6387581 100644
2603 const grub_efi_device_path_t *dp2);2603 const grub_efi_device_path_t *dp2);
2604diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h2604diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h
2605new file mode 1006442605new file mode 100644
2606index 000000000..0033d93052606index 0000000000..0033d9305a
2607--- /dev/null2607--- /dev/null
2608+++ b/include/grub/efi/linux.h2608+++ b/include/grub/efi/linux.h
2609@@ -0,0 +1,31 @@2609@@ -0,0 +1,31 @@
@@ -2639,7 +2639,7 @@ index 000000000..0033d9305
2639+2639+
2640+#endif /* ! GRUB_EFI_LINUX_HEADER */2640+#endif /* ! GRUB_EFI_LINUX_HEADER */
2641diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h2641diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
2642index 0ed8781f0..a43adf274 1006442642index 0ed8781f03..a43adf2746 100644
2643--- a/include/grub/efi/pe32.h2643--- a/include/grub/efi/pe32.h
2644+++ b/include/grub/efi/pe32.h2644+++ b/include/grub/efi/pe32.h
2645@@ -223,7 +223,11 @@ struct grub_pe64_optional_header2645@@ -223,7 +223,11 @@ struct grub_pe64_optional_header
@@ -2730,7 +2730,7 @@ index 0ed8781f0..a43adf274 100644
2730 grub_uint32_t page_rva;2730 grub_uint32_t page_rva;
2731diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h2731diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h
2732new file mode 1006442732new file mode 100644
2733index 000000000..9629fbb0f2733index 0000000000..9629fbb0f9
2734--- /dev/null2734--- /dev/null
2735+++ b/include/grub/efi/sb.h2735+++ b/include/grub/efi/sb.h
2736@@ -0,0 +1,29 @@2736@@ -0,0 +1,29 @@
@@ -2764,7 +2764,7 @@ index 000000000..9629fbb0f
2764+2764+
2765+#endif /* ! GRUB_EFI_SB_HEADER */2765+#endif /* ! GRUB_EFI_SB_HEADER */
2766diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h2766diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
2767index ce30e7fb0..a093679cb 1006442767index ce30e7fb01..a093679cb8 100644
2768--- a/include/grub/i386/linux.h2768--- a/include/grub/i386/linux.h
2769+++ b/include/grub/i386/linux.h2769+++ b/include/grub/i386/linux.h
2770@@ -136,7 +136,12 @@ struct linux_i386_kernel_header2770@@ -136,7 +136,12 @@ struct linux_i386_kernel_header
@@ -2783,13 +2783,13 @@ index ce30e7fb0..a093679cb 100644
2783 grub_uint64_t hardware_subarch_data;2783 grub_uint64_t hardware_subarch_data;
2784diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h2784diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h
2785new file mode 1006442785new file mode 100644
2786index 000000000..e69de29bb2786index 0000000000..e69de29bb2
2787diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h2787diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h
2788new file mode 1006442788new file mode 100644
2789index 000000000..e69de29bb2789index 0000000000..e69de29bb2
2790diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h2790diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h
2791new file mode 1006442791new file mode 100644
2792index 000000000..e69de29bb2792index 0000000000..e69de29bb2
2793diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h2793diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h
2794new file mode 1006442794new file mode 100644
2795index 000000000..e69de29bb2795index 0000000000..e69de29bb2
diff --git a/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch b/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
index 0f51703..451de30 100644
--- a/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
+++ b/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
@@ -1,4 +1,4 @@
1From 7d3dea454253718d765c5dea62b893c5d5ef10ec Mon Sep 17 00:00:00 20011From f78a4044403841f4685924aa59cda87b8ffd4126 Mon Sep 17 00:00:00 2001
2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3Date: Fri, 14 Dec 2018 13:46:14 -05003Date: Fri, 14 Dec 2018 13:46:14 -0500
4Subject: UBUNTU: grub-mkconfig: leave a trace of what files were sourced to4Subject: UBUNTU: grub-mkconfig: leave a trace of what files were sourced to
@@ -11,7 +11,7 @@ Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
11 1 file changed, 2 insertions(+)11 1 file changed, 2 insertions(+)
1212
13diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in13diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
14index 29bdad0c1..72f1e25a0 10064414index 29bdad0c12..72f1e25a03 100644
15--- a/util/grub-mkconfig.in15--- a/util/grub-mkconfig.in
16+++ b/util/grub-mkconfig.in16+++ b/util/grub-mkconfig.in
17@@ -162,10 +162,12 @@ if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then17@@ -162,10 +162,12 @@ if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then
diff --git a/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch b/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
18new file mode 10064418new file mode 100644
index 0000000..b387494
--- /dev/null
+++ b/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
@@ -0,0 +1,84 @@
1From 3eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Fri, 19 Jun 2020 12:57:19 +0200
4Subject: Pass dis_ucode_ldr to kernel for recovery mode
5
6In case of a botched microcode update, this allows people to
7easily roll back.
8
9It will of course break in the more unlikely event that you are
10missing a microcode update in your firmware that is needed to boot
11the system, but editing the entry to remove an option is easier than
12having to figure out the option and add it.
13
14LP: #1831789
15Patch-Name: ubuntu-recovery-dis_ucode_ldr.patch
16---
17 util/grub.d/10_linux.in | 4 ++++
18 util/grub.d/10_linux_zfs.in | 24 +++++++++++++++---------
19 2 files changed, 19 insertions(+), 9 deletions(-)
20
21diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
22index 14a89ba13d..49e627228f 100644
23--- a/util/grub.d/10_linux.in
24+++ b/util/grub.d/10_linux.in
25@@ -334,6 +334,10 @@ case "$machine" in
26 *) GENKERNEL_ARCH="$machine" ;;
27 esac
28
29+case "$GENKERNEL_ARCH" in
30+ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
31+esac
32+
33 prepare_boot_cache=
34 prepare_root_cache=
35 boot_device_id=
36diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
37index 712d832802..d9b79e29a7 100755
38--- a/util/grub.d/10_linux_zfs.in
39+++ b/util/grub.d/10_linux_zfs.in
40@@ -41,6 +41,16 @@ imported_pools=""
41 MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
42 ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
43
44+
45+machine="$(uname -m)"
46+case "${machine}" in
47+ i?86) GENKERNEL_ARCH="x86" ;;
48+ mips|mips64) GENKERNEL_ARCH="mips" ;;
49+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
50+ arm*) GENKERNEL_ARCH="arm" ;;
51+ *) GENKERNEL_ARCH="${machine}" ;;
52+esac
53+
54 RC=0
55 on_exit() {
56 # Restore initial zpool import state
57@@ -407,15 +417,6 @@ get_dataset_info() {
58 return
59 fi
60
61- machine="$(uname -m)"
62- case "${machine}" in
63- i?86) GENKERNEL_ARCH="x86" ;;
64- mips|mips64) GENKERNEL_ARCH="mips" ;;
65- mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
66- arm*) GENKERNEL_ARCH="arm" ;;
67- *) GENKERNEL_ARCH="${machine}" ;;
68- esac
69-
70 initrd_list=""
71 kernel_list=""
72 list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
73@@ -907,6 +908,11 @@ generate_grub_menu() {
74 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
75 fi
76
77+ case "$GENKERNEL_ARCH" in
78+ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
79+ esac
80+
81+
82 if [ "${vt_handoff}" = 1 ]; then
83 for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
84 if [ "${word}" = splash ]; then
diff --git a/debian/patches/ubuntu-resilient-boot-boot-order.patch b/debian/patches/ubuntu-resilient-boot-boot-order.patch
index 89de3c2..6583945 100644
--- a/debian/patches/ubuntu-resilient-boot-boot-order.patch
+++ b/debian/patches/ubuntu-resilient-boot-boot-order.patch
@@ -1,4 +1,4 @@
1From dcd35364b7789ebb00a645b4fe35e0605ec141ef Mon Sep 17 00:00:00 20011From 7a471059af0b7a511d51d43a26662c6424d88f56 Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Wed, 8 Apr 2020 11:05:25 +02003Date: Wed, 8 Apr 2020 11:05:25 +0200
4Subject: UBUNTU: efivar: Correctly handle boot order of multiple ESPs4Subject: UBUNTU: efivar: Correctly handle boot order of multiple ESPs
@@ -30,7 +30,7 @@ Patch-Name: ubuntu-resilient-boot-boot-order.patch
30 6 files changed, 59 insertions(+), 24 deletions(-)30 6 files changed, 59 insertions(+), 24 deletions(-)
3131
32diff --git a/grub-core/osdep/basic/no_platform.c b/grub-core/osdep/basic/no_platform.c32diff --git a/grub-core/osdep/basic/no_platform.c b/grub-core/osdep/basic/no_platform.c
33index d76c34c14..152a32873 10064433index d76c34c148..152a328737 100644
34--- a/grub-core/osdep/basic/no_platform.c34--- a/grub-core/osdep/basic/no_platform.c
35+++ b/grub-core/osdep/basic/no_platform.c35+++ b/grub-core/osdep/basic/no_platform.c
36@@ -31,7 +31,7 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,36@@ -31,7 +31,7 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
@@ -43,7 +43,7 @@ index d76c34c14..152a32873 100644
43 const char *efi_distributor)43 const char *efi_distributor)
44 {44 {
45diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c45diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
46index 41d39c448..d34df0f70 10064446index 41d39c4489..d34df0f70f 100644
47--- a/grub-core/osdep/unix/efivar.c47--- a/grub-core/osdep/unix/efivar.c
48+++ b/grub-core/osdep/unix/efivar.c48+++ b/grub-core/osdep/unix/efivar.c
49@@ -266,9 +266,10 @@ remove_from_boot_order (struct efi_variable *order, uint16_t num)49@@ -266,9 +266,10 @@ remove_from_boot_order (struct efi_variable *order, uint16_t num)
@@ -142,7 +142,7 @@ index 41d39c448..d34df0f70 100644
142 grub_util_info ("setting EFI variable BootOrder");142 grub_util_info ("setting EFI variable BootOrder");
143 rc = set_efi_variable ("BootOrder", order);143 rc = set_efi_variable ("BootOrder", order);
144diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c144diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
145index b561174ea..a5267db68 100644145index b561174ea9..a5267db68d 100644
146--- a/grub-core/osdep/unix/platform.c146--- a/grub-core/osdep/unix/platform.c
147+++ b/grub-core/osdep/unix/platform.c147+++ b/grub-core/osdep/unix/platform.c
148@@ -76,13 +76,13 @@ get_ofpathname (const char *dev)148@@ -76,13 +76,13 @@ get_ofpathname (const char *dev)
@@ -163,7 +163,7 @@ index b561174ea..a5267db68 100644
163 grub_util_error ("%s",163 grub_util_error ("%s",
164 _("GRUB was not built with efivar support; "164 _("GRUB was not built with efivar support; "
165diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c165diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
166index e19a3d9a8..a3f738fb9 100644166index e19a3d9a8a..a3f738fb9b 100644
167--- a/grub-core/osdep/windows/platform.c167--- a/grub-core/osdep/windows/platform.c
168+++ b/grub-core/osdep/windows/platform.c168+++ b/grub-core/osdep/windows/platform.c
169@@ -208,7 +208,7 @@ set_efi_variable_bootn (grub_uint16_t n, void *in, grub_size_t len)169@@ -208,7 +208,7 @@ set_efi_variable_bootn (grub_uint16_t n, void *in, grub_size_t len)
@@ -176,7 +176,7 @@ index e19a3d9a8..a3f738fb9 100644
176 const char *efi_distributor)176 const char *efi_distributor)
177 {177 {
178diff --git a/include/grub/util/install.h b/include/grub/util/install.h178diff --git a/include/grub/util/install.h b/include/grub/util/install.h
179index a521f1663..b2ed88e38 100644179index a521f1663f..b2ed88e386 100644
180--- a/include/grub/util/install.h180--- a/include/grub/util/install.h
181+++ b/include/grub/util/install.h181+++ b/include/grub/util/install.h
182@@ -219,15 +219,14 @@ grub_install_get_default_x86_platform (void);182@@ -219,15 +219,14 @@ grub_install_get_default_x86_platform (void);
@@ -204,7 +204,7 @@ index a521f1663..b2ed88e38 100644
204 void204 void
205 grub_install_register_ieee1275 (int is_prep, const char *install_device,205 grub_install_register_ieee1275 (int is_prep, const char *install_device,
206diff --git a/util/grub-install.c b/util/grub-install.c206diff --git a/util/grub-install.c b/util/grub-install.c
207index bf8eb65b3..f408b1986 100644207index bf8eb65b33..f408b19860 100644
208--- a/util/grub-install.c208--- a/util/grub-install.c
209+++ b/util/grub-install.c209+++ b/util/grub-install.c
210@@ -2083,9 +2083,9 @@ main (int argc, char *argv[])210@@ -2083,9 +2083,9 @@ main (int argc, char *argv[])
diff --git a/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch b/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
index 7468ab0..f760c17 100644
--- a/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
+++ b/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
@@ -1,4 +1,4 @@
1From 94189259ac860128abfc465fb3a920d60c63a85a Mon Sep 17 00:00:00 20011From 28f4a3b5e80e905042f5e68daa0150015fbdc470 Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Fri, 3 Apr 2020 13:43:49 +02003Date: Fri, 3 Apr 2020 13:43:49 +0200
4Subject: UBUNTU: efivar: Ignore alternative ESPs4Subject: UBUNTU: efivar: Ignore alternative ESPs
@@ -13,7 +13,7 @@ Patch-Name: ubuntu-resilient-boot-ignore-alternative-esps.patch
13 1 file changed, 125 insertions(+), 5 deletions(-)13 1 file changed, 125 insertions(+), 5 deletions(-)
1414
15diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c15diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
16index 4a58328b4..41d39c448 10064416index 4a58328b42..41d39c4489 100644
17--- a/grub-core/osdep/unix/efivar.c17--- a/grub-core/osdep/unix/efivar.c
18+++ b/grub-core/osdep/unix/efivar.c18+++ b/grub-core/osdep/unix/efivar.c
19@@ -37,9 +37,11 @@19@@ -37,9 +37,11 @@
diff --git a/debian/patches/ubuntu-shorter-version-info.patch b/debian/patches/ubuntu-shorter-version-info.patch
index 085b012..850af42 100644
--- a/debian/patches/ubuntu-shorter-version-info.patch
+++ b/debian/patches/ubuntu-shorter-version-info.patch
@@ -1,4 +1,4 @@
1From 5fab34cd20e9617b29ed9b632b30cbdedc287e77 Mon Sep 17 00:00:00 20011From 91fe1e957877a6312ebb52d1d8f0f41ccc49cec9 Mon Sep 17 00:00:00 2001
2From: Julian Andres Klode <julian.klode@canonical.com>2From: Julian Andres Klode <julian.klode@canonical.com>
3Date: Thu, 8 Feb 2018 10:48:37 +01003Date: Thu, 8 Feb 2018 10:48:37 +0100
4Subject: UBUNTU: Show only upstream version, hide rest in package_version4Subject: UBUNTU: Show only upstream version, hide rest in package_version
@@ -17,7 +17,7 @@ Patch-Name: ubuntu-shorter-version-info.patch
17 1 file changed, 4 insertions(+), 1 deletion(-)17 1 file changed, 4 insertions(+), 1 deletion(-)
1818
19diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c19diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
20index 0aa389fa1..d25a8212c 10064420index 0aa389fa16..d25a8212c7 100644
21--- a/grub-core/normal/main.c21--- a/grub-core/normal/main.c
22+++ b/grub-core/normal/main.c22+++ b/grub-core/normal/main.c
23@@ -208,7 +208,7 @@ grub_normal_init_page (struct grub_term_output *term,23@@ -208,7 +208,7 @@ grub_normal_init_page (struct grub_term_output *term,
diff --git a/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch b/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
index ea91c04..7967a42 100644
--- a/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
+++ b/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
@@ -1,4 +1,4 @@
1From c9bacc366d2c480e5185a2a71eff51d25b71e155 Mon Sep 17 00:00:00 20011From 1c8dcce2384bc93646592c9a7a8f39aa6ce6e35b Mon Sep 17 00:00:00 2001
2From: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>2From: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
3Date: Mon, 7 Oct 2019 22:53:32 -03003Date: Mon, 7 Oct 2019 22:53:32 -0300
4Subject: Skip /dev/disk/by-id/lvm-pvm-uuid entries from device iteration4Subject: Skip /dev/disk/by-id/lvm-pvm-uuid entries from device iteration
@@ -44,7 +44,7 @@ Patch-Name: ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
44 1 file changed, 3 insertions(+)44 1 file changed, 3 insertions(+)
4545
46diff --git a/util/deviceiter.c b/util/deviceiter.c46diff --git a/util/deviceiter.c b/util/deviceiter.c
47index dddc50da7..ec9a6d0ab 10064447index dddc50da7a..ec9a6d0ab4 100644
48--- a/util/deviceiter.c48--- a/util/deviceiter.c
49+++ b/util/deviceiter.c49+++ b/util/deviceiter.c
50@@ -589,6 +589,9 @@ grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_d50@@ -589,6 +589,9 @@ grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_d
diff --git a/debian/patches/ubuntu-speed-zsys-history.patch b/debian/patches/ubuntu-speed-zsys-history.patch
index 9d66b55..5069a77 100644
--- a/debian/patches/ubuntu-speed-zsys-history.patch
+++ b/debian/patches/ubuntu-speed-zsys-history.patch
@@ -1,4 +1,4 @@
1From 4c7457bc4f7cd1a516a7e255476a086270a4dbe4 Mon Sep 17 00:00:00 20011From 2180fd20a0bc9ddc2e43e2181959fb3f767dcabc Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Mon, 13 Apr 2020 15:12:21 +02003Date: Mon, 13 Apr 2020 15:12:21 +0200
4Subject: UBUNTU: Improve performance in bootmenu for zsys4Subject: UBUNTU: Improve performance in bootmenu for zsys
@@ -17,10 +17,10 @@ Patch-Name: ubuntu-speed-zsys-history.patch
17 1 file changed, 56 insertions(+), 21 deletions(-)17 1 file changed, 56 insertions(+), 21 deletions(-)
1818
19diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in19diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
20index efdb8afae..d748f6a20 10075520index 4c48abef01..712d832802 100755
21--- a/util/grub.d/10_linux_zfs.in21--- a/util/grub.d/10_linux_zfs.in
22+++ b/util/grub.d/10_linux_zfs.in22+++ b/util/grub.d/10_linux_zfs.in
23@@ -800,9 +800,10 @@ zfs_linux_entry () {23@@ -803,9 +803,10 @@ zfs_linux_entry () {
24 boot_device="$5"24 boot_device="$5"
25 initrd="$6"25 initrd="$6"
26 kernel="$7"26 kernel="$7"
@@ -33,7 +33,7 @@ index efdb8afae..d748f6a20 100755
33 submenu_indentation="$(printf %${submenu_level}s | tr " " "${grub_tab}")"33 submenu_indentation="$(printf %${submenu_level}s | tr " " "${grub_tab}")"
34 34
35 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"35 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
36@@ -837,7 +838,15 @@ zfs_linux_entry () {36@@ -840,7 +841,15 @@ zfs_linux_entry () {
37 echo "${submenu_indentation} insmod gzio"37 echo "${submenu_indentation} insmod gzio"
38 echo "${submenu_indentation} if [ \"\${grub_platform}\" = xen ]; then insmod xzio; insmod lzopio; fi"38 echo "${submenu_indentation} if [ \"\${grub_platform}\" = xen ]; then insmod xzio; insmod lzopio; fi"
39 39
@@ -50,7 +50,7 @@ index efdb8afae..d748f6a20 100755
50 50
51 if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then51 if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
52 echo "${submenu_indentation} echo $(gettext_printf "Loading Linux %s ..." ${kernel_version} | grub_quote)"52 echo "${submenu_indentation} echo $(gettext_printf "Loading Linux %s ..." ${kernel_version} | grub_quote)"
53@@ -905,6 +914,40 @@ generate_grub_menu() {53@@ -908,6 +917,40 @@ generate_grub_menu() {
54 54
55 print_menu_prologue55 print_menu_prologue
56 56
@@ -91,7 +91,7 @@ index efdb8afae..d748f6a20 100755
91 # IFS is set to TAB (ASCII 0x09)91 # IFS is set to TAB (ASCII 0x09)
92 echo "${menu_metadata}" |92 echo "${menu_metadata}" |
93 {93 {
94@@ -935,7 +978,8 @@ generate_grub_menu() {94@@ -938,7 +981,8 @@ generate_grub_menu() {
95 main_dataset_name="${name}"95 main_dataset_name="${name}"
96 main_dataset="${dataset}"96 main_dataset="${dataset}"
97 97
@@ -101,7 +101,7 @@ index efdb8afae..d748f6a20 100755
101 at_least_one_entry=1101 at_least_one_entry=1
102 ;;102 ;;
103 advanced)103 advanced)
104@@ -951,12 +995,12 @@ generate_grub_menu() {104@@ -954,12 +998,12 @@ generate_grub_menu() {
105 105
106 kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")106 kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
107 title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"107 title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"
@@ -116,7 +116,7 @@ index efdb8afae..d748f6a20 100755
116 fi116 fi
117 at_least_one_entry=1117 at_least_one_entry=1
118 ;;118 ;;
119@@ -974,33 +1018,24 @@ generate_grub_menu() {119@@ -977,33 +1021,24 @@ generate_grub_menu() {
120 fi120 fi
121 echo " submenu '${title}' \${menuentry_id_option} 'gnulinux-history-${dataset}' {"121 echo " submenu '${title}' \${menuentry_id_option} 'gnulinux-history-${dataset}' {"
122 122
diff --git a/debian/patches/ubuntu-support-initrd-less-boot.patch b/debian/patches/ubuntu-support-initrd-less-boot.patch
index 7fad44d..fe868ce 100644
--- a/debian/patches/ubuntu-support-initrd-less-boot.patch
+++ b/debian/patches/ubuntu-support-initrd-less-boot.patch
@@ -1,4 +1,4 @@
1From f4cacdb13661017c82bf3414833ad351146dded2 Mon Sep 17 00:00:00 20011From 102bdde2eae083973dfa11de9f6289680bb03594 Mon Sep 17 00:00:00 2001
2From: Chris Glass <chris.glass@canonical.com>2From: Chris Glass <chris.glass@canonical.com>
3Date: Thu, 10 Nov 2016 13:44:25 -05003Date: Thu, 10 Nov 2016 13:44:25 -0500
4Subject: UBUNTU: Added knobs to allow non-initrd boot config4Subject: UBUNTU: Added knobs to allow non-initrd boot config
@@ -18,7 +18,7 @@ Patch-Name: ubuntu-support-initrd-less-boot.patch
18 4 files changed, 38 insertions(+), 4 deletions(-)18 4 files changed, 38 insertions(+), 4 deletions(-)
1919
20diff --git a/docs/grub.info b/docs/grub.info20diff --git a/docs/grub.info b/docs/grub.info
21index 7cc7d9212..f804b7800 10064421index 7cc7d92128..f804b7800e 100644
22--- a/docs/grub.info22--- a/docs/grub.info
23+++ b/docs/grub.info23+++ b/docs/grub.info
24@@ -1436,6 +1436,19 @@ it must be quoted. For example:24@@ -1436,6 +1436,19 @@ it must be quoted. For example:
@@ -42,7 +42,7 @@ index 7cc7d9212..f804b7800 100644
42 existing configurations, but have better replacements:42 existing configurations, but have better replacements:
43 43
44diff --git a/docs/grub.texi b/docs/grub.texi44diff --git a/docs/grub.texi b/docs/grub.texi
45index 3ec35d315..1baa0fa20 10064445index 3ec35d315a..1baa0fa20f 100644
46--- a/docs/grub.texi46--- a/docs/grub.texi
47+++ b/docs/grub.texi47+++ b/docs/grub.texi
48@@ -1541,6 +1541,19 @@ This option sets the English text of the string that will be displayed in48@@ -1541,6 +1541,19 @@ This option sets the English text of the string that will be displayed in
@@ -66,7 +66,7 @@ index 3ec35d315..1baa0fa20 100644
66 66
67 The following options are still accepted for compatibility with existing67 The following options are still accepted for compatibility with existing
68diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in68diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
69index 9c1da6477..29bdad0c1 10064469index 9c1da64771..29bdad0c12 100644
70--- a/util/grub-mkconfig.in70--- a/util/grub-mkconfig.in
71+++ b/util/grub-mkconfig.in71+++ b/util/grub-mkconfig.in
72@@ -256,7 +256,9 @@ export GRUB_DEFAULT \72@@ -256,7 +256,9 @@ export GRUB_DEFAULT \
@@ -81,7 +81,7 @@ index 9c1da6477..29bdad0c1 100644
81 if test "x${grub_cfg}" != "x"; then81 if test "x${grub_cfg}" != "x"; then
82 rm -f "${grub_cfg}.new"82 rm -f "${grub_cfg}.new"
83diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in83diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
84index dff84edea..aa9666e5a 10064484index dff84edea5..aa9666e5ad 100644
85--- a/util/grub.d/10_linux.in85--- a/util/grub.d/10_linux.in
86+++ b/util/grub.d/10_linux.in86+++ b/util/grub.d/10_linux.in
87@@ -193,11 +193,17 @@ EOF87@@ -193,11 +193,17 @@ EOF
diff --git a/debian/patches/ubuntu-temp-keep-auto-nvram.patch b/debian/patches/ubuntu-temp-keep-auto-nvram.patch
index 03cf74c..18842f2 100644
--- a/debian/patches/ubuntu-temp-keep-auto-nvram.patch
+++ b/debian/patches/ubuntu-temp-keep-auto-nvram.patch
@@ -1,4 +1,4 @@
1From b2c200320645a00cfcb98017c9564716429723bc Mon Sep 17 00:00:00 20011From 698e98751624982b8367c1cfde1beeec0d4c5cea Mon Sep 17 00:00:00 2001
2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3Date: Tue, 16 Jul 2019 09:52:10 -04003Date: Tue, 16 Jul 2019 09:52:10 -0400
4Subject: UBUNTU: Temporarily keep grub-install's --auto-nvram.4Subject: UBUNTU: Temporarily keep grub-install's --auto-nvram.
@@ -10,7 +10,7 @@ Patch-Name: ubuntu-temp-keep-auto-nvram.patch
10 1 file changed, 3 insertions(+)10 1 file changed, 3 insertions(+)
1111
12diff --git a/util/grub-install.c b/util/grub-install.c12diff --git a/util/grub-install.c b/util/grub-install.c
13index 63462e4e0..bf8eb65b3 10064413index 63462e4e09..bf8eb65b33 100644
14--- a/util/grub-install.c14--- a/util/grub-install.c
15+++ b/util/grub-install.c15+++ b/util/grub-install.c
16@@ -98,6 +98,7 @@ enum16@@ -98,6 +98,7 @@ enum
diff --git a/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch b/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
index 3174186..a342e2b 100644
--- a/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
+++ b/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
@@ -1,4 +1,4 @@
1From ec6589e2746dd882cc10122bad74b0e41074e23b Mon Sep 17 00:00:00 20011From 5b7a5ab1640387e1d0275adc5acf16918218c6d9 Mon Sep 17 00:00:00 2001
2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3Date: Fri, 25 Oct 2019 10:25:04 -04003Date: Fri, 25 Oct 2019 10:25:04 -0400
4Subject: tpm: Pass unknown error as non-fatal, but debug print the error we4Subject: tpm: Pass unknown error as non-fatal, but debug print the error we
@@ -11,7 +11,7 @@ Patch-Name: ubuntu-tpm-unknown-error-non-fatal.patch
11 1 file changed, 8 insertions(+), 4 deletions(-)11 1 file changed, 8 insertions(+), 4 deletions(-)
1212
13diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c13diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
14index 32909c192..fdbaaee19 10064414index 32909c192f..fdbaaee195 100644
15--- a/grub-core/commands/efi/tpm.c15--- a/grub-core/commands/efi/tpm.c
16+++ b/grub-core/commands/efi/tpm.c16+++ b/grub-core/commands/efi/tpm.c
17@@ -155,7 +155,8 @@ grub_tpm1_execute (grub_efi_handle_t tpm_handle,17@@ -155,7 +155,8 @@ grub_tpm1_execute (grub_efi_handle_t tpm_handle,
diff --git a/debian/patches/ubuntu-zfs-enhance-support.patch b/debian/patches/ubuntu-zfs-enhance-support.patch
index fc0ece7..2e98aaa 100644
--- a/debian/patches/ubuntu-zfs-enhance-support.patch
+++ b/debian/patches/ubuntu-zfs-enhance-support.patch
@@ -1,4 +1,4 @@
1From daa4db81742e0363c2b8c85b6a88ec3eca1efc19 Mon Sep 17 00:00:00 20011From 0f3f67aa23be0fa1ad5e0b4cda1c4a50225b8272 Mon Sep 17 00:00:00 2001
2From: Didier Roche <didrocks@ubuntu.com>2From: Didier Roche <didrocks@ubuntu.com>
3Date: Fri, 12 Jul 2019 11:06:06 -04003Date: Fri, 12 Jul 2019 11:06:06 -0400
4Subject: UBUNTU: Enhance ZFS grub support4Subject: UBUNTU: Enhance ZFS grub support
@@ -22,12 +22,12 @@ Signed-off-by: Didier Roche <didier.roche@canonical.com>
22---22---
23 Makefile.util.def | 7 +23 Makefile.util.def | 7 +
24 util/grub.d/10_linux.in | 4 +24 util/grub.d/10_linux.in | 4 +
25 util/grub.d/10_linux_zfs.in | 961 ++++++++++++++++++++++++++++++++++++25 util/grub.d/10_linux_zfs.in | 964 ++++++++++++++++++++++++++++++++++++
26 3 files changed, 972 insertions(+)26 3 files changed, 975 insertions(+)
27 create mode 100755 util/grub.d/10_linux_zfs.in27 create mode 100755 util/grub.d/10_linux_zfs.in
2828
29diff --git a/Makefile.util.def b/Makefile.util.def29diff --git a/Makefile.util.def b/Makefile.util.def
30index 969d32f00..bac85e284 10064430index 969d32f009..bac85e2840 100644
31--- a/Makefile.util.def31--- a/Makefile.util.def
32+++ b/Makefile.util.def32+++ b/Makefile.util.def
33@@ -482,6 +482,13 @@ script = {33@@ -482,6 +482,13 @@ script = {
@@ -45,7 +45,7 @@ index 969d32f00..bac85e284 100644
45 name = '10_xnu';45 name = '10_xnu';
46 common = util/grub.d/10_xnu.in;46 common = util/grub.d/10_xnu.in;
47diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in47diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
48index 4532266be..a75096609 10064448index 4532266be6..a75096609a 100644
49--- a/util/grub.d/10_linux.in49--- a/util/grub.d/10_linux.in
50+++ b/util/grub.d/10_linux.in50+++ b/util/grub.d/10_linux.in
51@@ -71,6 +71,10 @@ case x"$GRUB_FS" in51@@ -71,6 +71,10 @@ case x"$GRUB_FS" in
@@ -61,10 +61,10 @@ index 4532266be..a75096609 100644
61 LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"61 LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
62diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in62diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
63new file mode 10075563new file mode 100755
64index 000000000..f50e1231a64index 0000000000..5ec65fa941
65--- /dev/null65--- /dev/null
66+++ b/util/grub.d/10_linux_zfs.in66+++ b/util/grub.d/10_linux_zfs.in
67@@ -0,0 +1,961 @@67@@ -0,0 +1,964 @@
68+#! /bin/sh68+#! /bin/sh
69+set -e69+set -e
70+70+
@@ -470,7 +470,10 @@ index 000000000..f50e1231a
470+470+
471+ initrd_list=""471+ initrd_list=""
472+ kernel_list=""472+ kernel_list=""
473+ for linux in $(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*'|sort -V); do473+ list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
474+ while [ "x$list" != "x" ] ; do
475+ linux=`version_find_latest $list`
476+ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
474+ if ! grub_file_is_not_garbage "${linux}" ; then477+ if ! grub_file_is_not_garbage "${linux}" ; then
475+ continue478+ continue
476+ fi479+ fi
@@ -506,12 +509,12 @@ index 000000000..f50e1231a
506+509+
507+ rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")510+ rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
508+511+
509+ initrd_list="${rel_linux_dirname}/${initrd}|${initrd_list}"512+ initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
510+ kernel_list="${rel_linux_dirname}/${linux_basename}|${kernel_list}"513+ kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
511+ done514+ done
512+515+
513+ initrd_list="${initrd_list%|}"516+ initrd_list="${initrd_list#|}"
514+ kernel_list="${kernel_list%|}"517+ kernel_list="${kernel_list#|}"
515+518+
516+ initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)519+ initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
517+520+
diff --git a/debian/patches/uefi-firmware-setup.patch b/debian/patches/uefi-firmware-setup.patch
index d6da9a6..4bf493d 100644
--- a/debian/patches/uefi-firmware-setup.patch
+++ b/debian/patches/uefi-firmware-setup.patch
@@ -1,4 +1,4 @@
1From 460169bfbef18f982e6bc0ad586c33aa0e14a316 Mon Sep 17 00:00:00 20011From e7b118f6f16c5c0b78d4963d8643d6afa72611f7 Mon Sep 17 00:00:00 2001
2From: Steve Langasek <steve.langasek@ubuntu.com>2From: Steve Langasek <steve.langasek@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:12 +00003Date: Mon, 13 Jan 2014 12:13:12 +0000
4Subject: Output a menu entry for firmware setup on UEFI FastBoot systems4Subject: Output a menu entry for firmware setup on UEFI FastBoot systems
@@ -14,7 +14,7 @@ Patch-Name: uefi-firmware-setup.patch
14 create mode 100644 util/grub.d/30_uefi-firmware.in14 create mode 100644 util/grub.d/30_uefi-firmware.in
1515
16diff --git a/Makefile.util.def b/Makefile.util.def16diff --git a/Makefile.util.def b/Makefile.util.def
17index eec1924b0..ce133e694 10064417index eec1924b0e..ce133e694e 100644
18--- a/Makefile.util.def18--- a/Makefile.util.def
19+++ b/Makefile.util.def19+++ b/Makefile.util.def
20@@ -526,6 +526,12 @@ script = {20@@ -526,6 +526,12 @@ script = {
@@ -32,7 +32,7 @@ index eec1924b0..ce133e694 100644
32 common = util/grub.d/40_custom.in;32 common = util/grub.d/40_custom.in;
33diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in33diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
34new file mode 10064434new file mode 100644
35index 000000000..3c9f533d835index 0000000000..3c9f533d8c
36--- /dev/null36--- /dev/null
37+++ b/util/grub.d/30_uefi-firmware.in37+++ b/util/grub.d/30_uefi-firmware.in
38@@ -0,0 +1,46 @@38@@ -0,0 +1,46 @@
diff --git a/debian/patches/uefi-secure-boot-cryptomount.patch b/debian/patches/uefi-secure-boot-cryptomount.patch
index 8478d5d..025fcc9 100644
--- a/debian/patches/uefi-secure-boot-cryptomount.patch
+++ b/debian/patches/uefi-secure-boot-cryptomount.patch
@@ -1,4 +1,4 @@
1From ed1f06e92f0a40b338d11723e0f4008c544ef712 Mon Sep 17 00:00:00 20011From 237dfe21cf3ec834fd96b65c4691f6386dd49680 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Herv=C3=A9=20Werner?= <dud225@hotmail.com>2From: =?UTF-8?q?Herv=C3=A9=20Werner?= <dud225@hotmail.com>
3Date: Mon, 28 Jan 2019 17:24:23 +01003Date: Mon, 28 Jan 2019 17:24:23 +0100
4Subject: Fix setup on Secure Boot systems where cryptodisk is in use4Subject: Fix setup on Secure Boot systems where cryptodisk is in use
@@ -19,7 +19,7 @@ Patch-Name: uefi-secure-boot-cryptomount.patch
19 1 file changed, 17 insertions(+)19 1 file changed, 17 insertions(+)
2020
21diff --git a/util/grub-install.c b/util/grub-install.c21diff --git a/util/grub-install.c b/util/grub-install.c
22index 030464645..4bad8de61 10064422index 0304646453..4bad8de612 100644
23--- a/util/grub-install.c23--- a/util/grub-install.c
24+++ b/util/grub-install.c24+++ b/util/grub-install.c
25@@ -1546,6 +1546,23 @@ main (int argc, char *argv[])25@@ -1546,6 +1546,23 @@ main (int argc, char *argv[])
diff --git a/debian/patches/vsnprintf-upper-case-hex.patch b/debian/patches/vsnprintf-upper-case-hex.patch
index 4917b71..7385257 100644
--- a/debian/patches/vsnprintf-upper-case-hex.patch
+++ b/debian/patches/vsnprintf-upper-case-hex.patch
@@ -1,4 +1,4 @@
1From 9ec15b6602d6505bfc04dd1cd651a6c760ef4fe2 Mon Sep 17 00:00:00 20011From 03f49a87ffe7cbcf3737170935772818875ccbdb Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 11 Mar 2019 11:15:12 +00003Date: Mon, 11 Mar 2019 11:15:12 +0000
4Subject: Add %X to grub_vsnprintf_real and friends4Subject: Add %X to grub_vsnprintf_real and friends
@@ -18,7 +18,7 @@ Patch-Name: vsnprintf-upper-case-hex.patch
18 1 file changed, 5 insertions(+), 2 deletions(-)18 1 file changed, 5 insertions(+), 2 deletions(-)
1919
20diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c20diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
21index 3b633d51f..18cad5803 10064421index 3b633d51f4..18cad5803b 100644
22--- a/grub-core/kern/misc.c22--- a/grub-core/kern/misc.c
23+++ b/grub-core/kern/misc.c23+++ b/grub-core/kern/misc.c
24@@ -588,7 +588,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)24@@ -588,7 +588,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
diff --git a/debian/patches/vt-handoff.patch b/debian/patches/vt-handoff.patch
index 4db1344..75282e4 100644
--- a/debian/patches/vt-handoff.patch
+++ b/debian/patches/vt-handoff.patch
@@ -1,4 +1,4 @@
1From 378d93f9c2491ef7df49ed7ce3f413025998a0c0 Mon Sep 17 00:00:00 20011From 37413be89bbd62718b9a5f5295aa83ab6f7616b1 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:30 +00003Date: Mon, 13 Jan 2014 12:13:30 +0000
4Subject: Add configure option to use vt.handoff=74Subject: Add configure option to use vt.handoff=7
@@ -19,7 +19,7 @@ Patch-Name: vt-handoff.patch
19 3 files changed, 65 insertions(+), 2 deletions(-)19 3 files changed, 65 insertions(+), 2 deletions(-)
2020
21diff --git a/configure.ac b/configure.ac21diff --git a/configure.ac b/configure.ac
22index dbc429ce0..e382c7480 10064422index dbc429ce0a..e382c7480d 100644
23--- a/configure.ac23--- a/configure.ac
24+++ b/configure.ac24+++ b/configure.ac
25@@ -1890,6 +1890,17 @@ else25@@ -1890,6 +1890,17 @@ else
@@ -41,7 +41,7 @@ index dbc429ce0..e382c7480 100644
41 41
42 AC_SUBST([FONT_SOURCE])42 AC_SUBST([FONT_SOURCE])
43diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in43diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
44index 09393c28e..cc2dd855a 10064444index 09393c28ee..cc2dd855ab 100644
45--- a/util/grub.d/10_linux.in45--- a/util/grub.d/10_linux.in
46+++ b/util/grub.d/10_linux.in46+++ b/util/grub.d/10_linux.in
47@@ -24,6 +24,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"47@@ -24,6 +24,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"
@@ -101,7 +101,7 @@ index 09393c28e..cc2dd855a 100644
101 # FIXME: We need an interface to select vesafb in case efifb can't be used.101 # FIXME: We need an interface to select vesafb in case efifb can't be used.
102 if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then102 if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then
103diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in103diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
104index fc99f16e7..b636dc7bb 100755104index 8cd7d12851..48a4e68976 100755
105--- a/util/grub.d/10_linux_zfs.in105--- a/util/grub.d/10_linux_zfs.in
106+++ b/util/grub.d/10_linux_zfs.in106+++ b/util/grub.d/10_linux_zfs.in
107@@ -23,6 +23,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"107@@ -23,6 +23,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"
@@ -112,7 +112,7 @@ index fc99f16e7..b636dc7bb 100755
112 112
113 . "${pkgdatadir}/grub-mkconfig_lib"113 . "${pkgdatadir}/grub-mkconfig_lib"
114 114
115@@ -718,6 +719,23 @@ generate_grub_menu_metadata() {115@@ -721,6 +722,23 @@ generate_grub_menu_metadata() {
116 # Note:116 # Note:
117 # If 10_linux runs these part will be defined twice in grub configuration117 # If 10_linux runs these part will be defined twice in grub configuration
118 print_menu_prologue() {118 print_menu_prologue() {
@@ -136,7 +136,7 @@ index fc99f16e7..b636dc7bb 100755
136 # Use ELILO's generic "efifb" when it's known to be available.136 # Use ELILO's generic "efifb" when it's known to be available.
137 # FIXME: We need an interface to select vesafb in case efifb can't be used.137 # FIXME: We need an interface to select vesafb in case efifb can't be used.
138 GRUB_GFXPAYLOAD_LINUX="${GRUB_GFXPAYLOAD_LINUX:-}"138 GRUB_GFXPAYLOAD_LINUX="${GRUB_GFXPAYLOAD_LINUX:-}"
139@@ -813,7 +831,7 @@ zfs_linux_entry () {139@@ -816,7 +834,7 @@ zfs_linux_entry () {
140 140
141 if ([ "${ubuntu_recovery}" = 0 ] || [ "${type}" != "recovery" ]) && \141 if ([ "${ubuntu_recovery}" = 0 ] || [ "${type}" != "recovery" ]) && \
142 ([ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 1 ]); then142 ([ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 1 ]); then
@@ -145,7 +145,7 @@ index fc99f16e7..b636dc7bb 100755
145 fi145 fi
146 146
147 echo "${submenu_indentation} insmod gzio"147 echo "${submenu_indentation} insmod gzio"
148@@ -876,6 +894,14 @@ generate_grub_menu() {148@@ -879,6 +897,14 @@ generate_grub_menu() {
149 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"149 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
150 fi150 fi
151 151
diff --git a/debian/patches/wubi-no-windows.patch b/debian/patches/wubi-no-windows.patch
index 29350c5..47385b7 100644
--- a/debian/patches/wubi-no-windows.patch
+++ b/debian/patches/wubi-no-windows.patch
@@ -1,4 +1,4 @@
1From e683b76e9278216d50c327b71dfbb7b722385503 Mon Sep 17 00:00:00 20011From 5d7c681c059de5af7dda174c8375c0cbfaa2d45a Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Mon, 13 Jan 2014 12:13:24 +00003Date: Mon, 13 Jan 2014 12:13:24 +0000
4Subject: Skip Windows os-prober entries on Wubi systems4Subject: Skip Windows os-prober entries on Wubi systems
@@ -19,7 +19,7 @@ Patch-Name: wubi-no-windows.patch
19 1 file changed, 19 insertions(+)19 1 file changed, 19 insertions(+)
2020
21diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in21diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
22index b7e1147c4..271044f59 10064422index b7e1147c41..271044f592 100644
23--- a/util/grub.d/30_os-prober.in23--- a/util/grub.d/30_os-prober.in
24+++ b/util/grub.d/30_os-prober.in24+++ b/util/grub.d/30_os-prober.in
25@@ -110,6 +110,8 @@ EOF25@@ -110,6 +110,8 @@ EOF
diff --git a/debian/patches/zpool-full-device-name.patch b/debian/patches/zpool-full-device-name.patch
index 09e00fc..f23b055 100644
--- a/debian/patches/zpool-full-device-name.patch
+++ b/debian/patches/zpool-full-device-name.patch
@@ -1,4 +1,4 @@
1From 5bea13466c5d9048cf20139498dcba94f5500477 Mon Sep 17 00:00:00 20011From 45859b7aff8eb963b8dcb4b83c19579f8687a637 Mon Sep 17 00:00:00 2001
2From: Chad MILLER <chad.miller@canonical.com>2From: Chad MILLER <chad.miller@canonical.com>
3Date: Thu, 27 Oct 2016 17:15:07 -04003Date: Thu, 27 Oct 2016 17:15:07 -0400
4Subject: Tell zpool to emit full device names4Subject: Tell zpool to emit full device names
@@ -20,7 +20,7 @@ Patch-Name: zpool-full-device-name.patch
20 1 file changed, 1 insertion(+)20 1 file changed, 1 insertion(+)
2121
22diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c22diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
23index 46d7116c6..da102918d 10064423index 46d7116c6e..da102918dc 100644
24--- a/grub-core/osdep/unix/getroot.c24--- a/grub-core/osdep/unix/getroot.c
25+++ b/grub-core/osdep/unix/getroot.c25+++ b/grub-core/osdep/unix/getroot.c
26@@ -243,6 +243,7 @@ grub_util_find_root_devices_from_poolname (char *poolname)26@@ -243,6 +243,7 @@ grub_util_find_root_devices_from_poolname (char *poolname)
diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
index ccb4b16..210201d 100644
--- a/grub-core/disk/loopback.c
+++ b/grub-core/disk/loopback.c
@@ -86,7 +86,8 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
86 return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));86 return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
8787
88 file = grub_file_open (args[1], GRUB_FILE_TYPE_LOOPBACK88 file = grub_file_open (args[1], GRUB_FILE_TYPE_LOOPBACK
89 | GRUB_FILE_TYPE_NO_DECOMPRESS);89 | GRUB_FILE_TYPE_NO_DECOMPRESS |
90 GRUB_FILE_TYPE_SKIP_SIGNATURE);
90 if (! file)91 if (! file)
91 return grub_errno;92 return grub_errno;
9293
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 72f1e25..6c8988f 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -260,7 +260,8 @@ export GRUB_DEFAULT \
260 GRUB_RECORDFAIL_TIMEOUT \260 GRUB_RECORDFAIL_TIMEOUT \
261 GRUB_RECOVERY_TITLE \261 GRUB_RECOVERY_TITLE \
262 GRUB_FORCE_PARTUUID \262 GRUB_FORCE_PARTUUID \
263 GRUB_DISABLE_INITRD263 GRUB_DISABLE_INITRD \
264 GRUB_FLAVOUR_ORDER
264265
265if test "x${grub_cfg}" != "x"; then266if test "x${grub_cfg}" != "x"; then
266 rm -f "${grub_cfg}.new"267 rm -f "${grub_cfg}.new"
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index fe6319a..7e2d1bc 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -270,6 +270,21 @@ version_test_gt ()
270 if [ "x$version_test_gt_b" = "x" ] ; then270 if [ "x$version_test_gt_b" = "x" ] ; then
271 return 0271 return 0
272 fi272 fi
273
274 # GRUB_FLAVOUR_ORDER is an ordered list of kernels, in decreasing
275 # priority. Any items in the list take precedence over other kernels,
276 # and earlier flavours are preferred over later ones.
277 for flavour in ${GRUB_FLAVOUR_ORDER:-}; do
278 version_test_gt_a_preferred=$(echo "$version_test_gt_a" | grep -- "-[0-9]*-$flavour\$")
279 version_test_gt_b_preferred=$(echo "$version_test_gt_b" | grep -- "-[0-9]*-$flavour\$")
280
281 if [ -n "$version_test_gt_a_preferred" -a -z "$version_test_gt_b_preferred" ] ; then
282 return 0
283 elif [ -z "$version_test_gt_a_preferred" -a -n "$version_test_gt_b_preferred" ] ; then
284 return 1
285 fi
286 done
287
273 case "$version_test_gt_a:$version_test_gt_b" in288 case "$version_test_gt_a:$version_test_gt_b" in
274 *.old:*.old) ;;289 *.old:*.old) ;;
275 *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;290 *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 3eb0e69..49e6272 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -245,6 +245,14 @@ EOF
245 linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"245 linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
246 fi246 fi
247 message="$(gettext_printf "Loading initial ramdisk ...")"247 message="$(gettext_printf "Loading initial ramdisk ...")"
248 initrd_path=
249 for i in ${initrd}; do
250 initrd_path="${initrd_path} ${rel_dirname}/${i}"
251 done
252 initrd_path_only_early=
253 for i in ${initrd_early}; do
254 initrd_path_only_early="${initrd_path_only_early} ${rel_dirname}/${i}"
255 done
248 if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then256 if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
249 sed "s/^/$submenu_indentation/" << EOF257 sed "s/^/$submenu_indentation/" << EOF
250 if [ "\${initrdfail}" = 1 ]; then258 if [ "\${initrdfail}" = 1 ]; then
@@ -255,11 +263,17 @@ EOF
255 echo '$(echo "$message" | grub_quote)'263 echo '$(echo "$message" | grub_quote)'
256EOF264EOF
257 fi265 fi
258
259 sed "s/^/$submenu_indentation/" << EOF266 sed "s/^/$submenu_indentation/" << EOF
260 initrd ${rel_dirname}/${initrd}267 initrd $(echo $initrd_path)
261 else268 else
262 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1269 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
270EOF
271 if [ -n "$initrd_path_only_early" ]; then
272 sed "s/^/$submenu_indentation/" << EOF
273 initrd $(echo $initrd_path_only_early)
274EOF
275 fi
276 sed "s/^/$submenu_indentation/" << EOF
263 fi277 fi
264 initrdfail278 initrdfail
265EOF279EOF
@@ -277,7 +291,7 @@ EOF
277EOF291EOF
278 fi292 fi
279 sed "s/^/$submenu_indentation/" << EOF293 sed "s/^/$submenu_indentation/" << EOF
280 initrd ${rel_dirname}/${initrd}294 initrd $(echo $initrd_path)
281EOF295EOF
282 fi296 fi
283 fi297 fi
@@ -320,6 +334,10 @@ case "$machine" in
320 *) GENKERNEL_ARCH="$machine" ;;334 *) GENKERNEL_ARCH="$machine" ;;
321esac335esac
322336
337case "$GENKERNEL_ARCH" in
338 x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
339esac
340
323prepare_boot_cache=341prepare_boot_cache=
324prepare_root_cache=342prepare_root_cache=
325boot_device_id=343boot_device_id=
@@ -418,10 +436,7 @@ while [ "x$list" != "x" ] ; do
418436
419 initrd=437 initrd=
420 if test -n "${initrd_early}" || test -n "${initrd_real}"; then438 if test -n "${initrd_early}" || test -n "${initrd_real}"; then
421 initrd="${initrd_real}"439 initrd="${initrd_early} ${initrd_real}"
422 if test -n "${initrd_early}"; then
423 initrd="${initrd_early} ${initrd}"
424 fi
425440
426 initrd_display=441 initrd_display=
427 for i in ${initrd}; do442 for i in ${initrd}; do
diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
index d748f6a..d9b79e2 100755
--- a/util/grub.d/10_linux_zfs.in
+++ b/util/grub.d/10_linux_zfs.in
@@ -41,6 +41,16 @@ imported_pools=""
41MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"41MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
42ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"42ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
4343
44
45machine="$(uname -m)"
46case "${machine}" in
47 i?86) GENKERNEL_ARCH="x86" ;;
48 mips|mips64) GENKERNEL_ARCH="mips" ;;
49 mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
50 arm*) GENKERNEL_ARCH="arm" ;;
51 *) GENKERNEL_ARCH="${machine}" ;;
52esac
53
44RC=054RC=0
45on_exit() {55on_exit() {
46 # Restore initial zpool import state56 # Restore initial zpool import state
@@ -407,18 +417,12 @@ get_dataset_info() {
407 return417 return
408 fi418 fi
409419
410 machine="$(uname -m)"
411 case "${machine}" in
412 i?86) GENKERNEL_ARCH="x86" ;;
413 mips|mips64) GENKERNEL_ARCH="mips" ;;
414 mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
415 arm*) GENKERNEL_ARCH="arm" ;;
416 *) GENKERNEL_ARCH="${machine}" ;;
417 esac
418
419 initrd_list=""420 initrd_list=""
420 kernel_list=""421 kernel_list=""
421 for linux in $(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*'|sort -V); do422 list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
423 while [ "x$list" != "x" ] ; do
424 linux=`version_find_latest $list`
425 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
422 if ! grub_file_is_not_garbage "${linux}" ; then426 if ! grub_file_is_not_garbage "${linux}" ; then
423 continue427 continue
424 fi428 fi
@@ -465,12 +469,12 @@ get_dataset_info() {
465469
466 rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")470 rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
467471
468 initrd_list="${rel_linux_dirname}/${initrd}|${initrd_list}"472 initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
469 kernel_list="${rel_linux_dirname}/${linux_basename}|${kernel_list}"473 kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
470 done474 done
471475
472 initrd_list="${initrd_list%|}"476 initrd_list="${initrd_list#|}"
473 kernel_list="${kernel_list%|}"477 kernel_list="${kernel_list#|}"
474478
475 initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)479 initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
476480
@@ -904,6 +908,11 @@ generate_grub_menu() {
904 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"908 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
905 fi909 fi
906910
911 case "$GENKERNEL_ARCH" in
912 x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
913 esac
914
915
907 if [ "${vt_handoff}" = 1 ]; then916 if [ "${vt_handoff}" = 1 ]; then
908 for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do917 for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
909 if [ "${word}" = splash ]; then918 if [ "${word}" = splash ]; then

Subscribers

People subscribed via source and target branches