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
1diff --git a/debian/.git-dpm b/debian/.git-dpm
2index 19c2663..3314490 100644
3--- a/debian/.git-dpm
4+++ b/debian/.git-dpm
5@@ -1,6 +1,11 @@
6 # see git-dpm(1) from git-dpm package
7+<<<<<<< debian/.git-dpm
8 ec83738b990d5008c23fa820edbfd9580df95e51
9 ec83738b990d5008c23fa820edbfd9580df95e51
10+=======
11+3eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b
12+3eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b
13+>>>>>>> debian/.git-dpm
14 578bb115fbd47e1c464696f1f8d6183e5443975d
15 578bb115fbd47e1c464696f1f8d6183e5443975d
16 grub2_2.04.orig.tar.xz
17diff --git a/debian/changelog b/debian/changelog
18index 4d388c9..c8c3d77 100644
19--- a/debian/changelog
20+++ b/debian/changelog
21@@ -1,3 +1,4 @@
22+<<<<<<< debian/changelog
23 grub2 (2.04-1ubuntu26.1) focal; urgency=medium
24
25 [ Julian Andres Klode ]
26@@ -68,6 +69,32 @@ grub2 (2.04-1ubuntu26.1) focal; urgency=medium
27 - Fail kernel validation if the shim protocol isn't available
28
29 -- Chris Coulson <chris.coulson@canonical.com> Mon, 20 Jul 2020 19:19:08 +0100
30+=======
31+grub2 (2.04-1ubuntu26.2) focal; urgency=medium
32+
33+ * debian/patches/ubuntu-flavour-order.patch: Remove debugging message and
34+ export the variable so it actually works from /etc/default/grub.
35+
36+ -- Julian Andres Klode <juliank@ubuntu.com> Fri, 26 Jun 2020 12:43:20 +0200
37+
38+grub2 (2.04-1ubuntu26.1) focal; urgency=medium
39+
40+ * Move gettext patches out of git-dpm's way, so it does not delete them
41+ * debian/patches/ubuntu-flavour-order.patch:
42+ - Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
43+ flavours as preferred, and specify an order between those preferred
44+ flavours (LP: #1882663)
45+ * debian/patches/ubuntu-zfs-enhance-support.patch:
46+ - Use version_find_latest for ordering kernels, so it also supports
47+ the GRUB_FLAVOUR_ORDER setting.
48+ * debian/patches/ubuntu-dont-verify-loopback-images.patch:
49+ - disk/loopback: Don't verify loopback images (LP: #1878541),
50+ Thanks to Chris Coulson for the patch
51+ * Merge changes from xnox to fix multiple initrds support (LP: #1878705)
52+ * Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)
53+
54+ -- Julian Andres Klode <juliank@ubuntu.com> Mon, 22 Jun 2020 13:30:46 +0200
55+>>>>>>> debian/changelog
56
57 grub2 (2.04-1ubuntu26) focal; urgency=medium
58
59diff --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
60similarity index 90%
61rename from debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
62rename to debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
63index 0bab37b..a05249e 100644
64--- a/debian/patches/0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
65+++ b/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
66@@ -1,4 +1,4 @@
67-From 4d3c59dd378362f4e0e30aaaf77068bea97ebd24 Mon Sep 17 00:00:00 2001
68+From c4966fe70800e0b8740bf45b02d63b51383d16ce Mon Sep 17 00:00:00 2001
69 From: Dimitri John Ledkov <xnox@ubuntu.com>
70 Date: Mon, 24 Feb 2020 20:29:53 +0000
71 Subject: uefi-firmware: rename fwsetup menuentry to UEFI Firmware Settings
72@@ -9,7 +9,7 @@ LP: #1864547
73 1 file changed, 2 insertions(+), 2 deletions(-)
74
75 diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
76-index 3c9f533d8..b072d219f 100644
77+index 3c9f533d8c..b072d219f6 100644
78 --- a/util/grub.d/30_uefi-firmware.in
79 +++ b/util/grub.d/30_uefi-firmware.in
80 @@ -32,9 +32,9 @@ OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
81diff --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
82similarity index 97%
83rename from debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
84rename to debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
85index c1bbac6..1b8e6eb 100644
86--- a/debian/patches/0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
87+++ b/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
88@@ -1,4 +1,4 @@
89-From b7ae50d78035e0e73f5ea212fab7b728353c988b Mon Sep 17 00:00:00 2001
90+From cd73cd59b7e210a3e66af073c649c162930989ad Mon Sep 17 00:00:00 2001
91 From: Julian Andres Klode <julian.klode@canonical.com>
92 Date: Tue, 3 Mar 2020 16:06:34 +0100
93 Subject: smbios: Add a --linux argument to apply linux modalias-like filtering
94@@ -16,7 +16,7 @@ Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=87049f97
95 1 file changed, 24 insertions(+)
96
97 diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
98-index 7a6a391fc..1a9086ddd 100644
99+index 7a6a391fc1..1a9086ddd4 100644
100 --- a/grub-core/commands/smbios.c
101 +++ b/grub-core/commands/smbios.c
102 @@ -64,6 +64,21 @@ grub_smbios_get_eps3 (void)
103diff --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
104similarity index 97%
105rename from debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
106rename to debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
107index 13e098e..5c44c1d 100644
108--- a/debian/patches/0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
109+++ b/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
110@@ -1,4 +1,4 @@
111-From 3004e78bbfe6acb5e38290b2e5c7fff277ea1628 Mon Sep 17 00:00:00 2001
112+From 9a93d0f5a9216f71c4b9cbd041805911f476089e Mon Sep 17 00:00:00 2001
113 From: Chris Coulson <chris.coulson@canonical.com>
114 Date: Wed, 11 Mar 2020 16:46:00 +0100
115 Subject: ubuntu: Make the linux command in EFI grub always try EFI handover
116@@ -18,7 +18,7 @@ only if secure boot is disabled.
117 2 files changed, 35 insertions(+), 26 deletions(-)
118
119 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
120-index 6b6aef87f..fe3ca2c59 100644
121+index 6b6aef87f7..fe3ca2c596 100644
122 --- a/grub-core/loader/i386/efi/linux.c
123 +++ b/grub-core/loader/i386/efi/linux.c
124 @@ -27,6 +27,7 @@
125@@ -51,7 +51,7 @@ index 6b6aef87f..fe3ca2c59 100644
126
127 params = grub_efi_allocate_pages_max (0x3fffffff,
128 diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
129-index 4328bcbdb..991eb29db 100644
130+index 4328bcbdb0..991eb29db9 100644
131 --- a/grub-core/loader/i386/linux.c
132 +++ b/grub-core/loader/i386/linux.c
133 @@ -658,35 +658,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
134diff --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
135similarity index 91%
136rename from debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch
137rename to debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
138index 07e93a4..4727ee1 100644
139--- a/debian/patches/0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch
140+++ b/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
141@@ -1,4 +1,4 @@
142-From 05c83490bed811e5dd5cde7c59bb56cc2db751d6 Mon Sep 17 00:00:00 2001
143+From b2c861f6f5da96ecda0ef8d962bb0fa804a56825 Mon Sep 17 00:00:00 2001
144 From: Chris Coulson <chris.coulson@canonical.com>
145 Date: Wed, 11 Mar 2020 16:46:41 +0100
146 Subject: ubuntu: Update the linux boot protocol version check.
147@@ -11,7 +11,7 @@ check accordingly.
148 1 file changed, 1 insertion(+), 1 deletion(-)
149
150 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
151-index fe3ca2c59..2929da7a2 100644
152+index fe3ca2c596..2929da7a29 100644
153 --- a/grub-core/loader/i386/efi/linux.c
154 +++ b/grub-core/loader/i386/efi/linux.c
155 @@ -245,7 +245,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
156diff --git a/debian/patches/at_keyboard-module-init.patch b/debian/patches/at_keyboard-module-init.patch
157index faafb46..5f504c8 100644
158--- a/debian/patches/at_keyboard-module-init.patch
159+++ b/debian/patches/at_keyboard-module-init.patch
160@@ -1,4 +1,4 @@
161-From 2fa183df8ec4037976444a92810672b0fa3f75b4 Mon Sep 17 00:00:00 2001
162+From fd386a087b6c64b28f1b80d03b35d7dcf552b143 Mon Sep 17 00:00:00 2001
163 From: Jeroen Dekkers <jeroen@dekkers.ch>
164 Date: Sat, 12 Jan 2019 21:02:18 +0100
165 Subject: at_keyboard: initialize keyboard in module init if keyboard is ready
166@@ -16,7 +16,7 @@ Patch-Name: at_keyboard-module-init.patch
167 1 file changed, 9 insertions(+)
168
169 diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
170-index f0a986eb1..d4395c201 100644
171+index f0a986eb17..d4395c2019 100644
172 --- a/grub-core/term/at_keyboard.c
173 +++ b/grub-core/term/at_keyboard.c
174 @@ -244,6 +244,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
175diff --git a/debian/patches/bash-completion-drop-have-checks.patch b/debian/patches/bash-completion-drop-have-checks.patch
176index acb2021..e7eaa80 100644
177--- a/debian/patches/bash-completion-drop-have-checks.patch
178+++ b/debian/patches/bash-completion-drop-have-checks.patch
179@@ -1,4 +1,4 @@
180-From 1eee32e5a695ce788c97203f0fba724bf5dc3a19 Mon Sep 17 00:00:00 2001
181+From b4b380c0cbec13b3797a570e651e94cdc349bb2f Mon Sep 17 00:00:00 2001
182 From: Colin Watson <cjwatson@debian.org>
183 Date: Fri, 16 Nov 2018 16:37:02 +0000
184 Subject: bash-completion: Drop "have" checks
185@@ -16,7 +16,7 @@ Patch-Name: bash-completion-drop-have-checks.patch
186 1 file changed, 13 insertions(+), 26 deletions(-)
187
188 diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
189-index 44bf135b9..d4235e7ef 100644
190+index 44bf135b9f..d4235e7ef8 100644
191 --- a/util/bash-completion.d/grub-completion.bash.in
192 +++ b/util/bash-completion.d/grub-completion.bash.in
193 @@ -166,13 +166,11 @@ _grub_set_entry () {
194diff --git a/debian/patches/blacklist-1440x900x32.patch b/debian/patches/blacklist-1440x900x32.patch
195index 5043cf4..10062b6 100644
196--- a/debian/patches/blacklist-1440x900x32.patch
197+++ b/debian/patches/blacklist-1440x900x32.patch
198@@ -1,4 +1,4 @@
199-From a7d121953a5158ccd4e8789a475cd43b83c2b779 Mon Sep 17 00:00:00 2001
200+From 9633a0226ecad133582225d7d5decd7f344b376d Mon Sep 17 00:00:00 2001
201 From: Colin Watson <cjwatson@ubuntu.com>
202 Date: Mon, 13 Jan 2014 12:13:11 +0000
203 Subject: Blacklist 1440x900x32 from VBE preferred mode handling
204@@ -13,7 +13,7 @@ Patch-Name: blacklist-1440x900x32.patch
205 1 file changed, 9 insertions(+)
206
207 diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c
208-index b7f911926..4b1bd7d5e 100644
209+index b7f911926d..4b1bd7d5ea 100644
210 --- a/grub-core/video/i386/pc/vbe.c
211 +++ b/grub-core/video/i386/pc/vbe.c
212 @@ -1054,6 +1054,15 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,
213diff --git a/debian/patches/bootp-new-net_bootp6-command.patch b/debian/patches/bootp-new-net_bootp6-command.patch
214index d53a2f2..dd56826 100644
215--- a/debian/patches/bootp-new-net_bootp6-command.patch
216+++ b/debian/patches/bootp-new-net_bootp6-command.patch
217@@ -1,4 +1,4 @@
218-From 8624974d81aaa8eabd6328c99ec5c7d204c80638 Mon Sep 17 00:00:00 2001
219+From 5376a44e70409088670de36d2ec82a1b48259cbd Mon Sep 17 00:00:00 2001
220 From: Michael Chang <mchang@suse.com>
221 Date: Thu, 27 Oct 2016 17:41:04 -0400
222 Subject: bootp: New net_bootp6 command
223@@ -17,7 +17,7 @@ Patch-Name: bootp-new-net_bootp6-command.patch
224 3 files changed, 1018 insertions(+), 1 deletion(-)
225
226 diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
227-index 04cfbb045..21c1824ef 100644
228+index 04cfbb0450..21c1824efb 100644
229 --- a/grub-core/net/bootp.c
230 +++ b/grub-core/net/bootp.c
231 @@ -24,6 +24,98 @@
232@@ -969,7 +969,7 @@ index 04cfbb045..21c1824ef 100644
233 + grub_unregister_command (cmd_bootp6);
234 }
235 diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
236-index ea5edf8f1..01410798b 100644
237+index ea5edf8f1f..01410798b3 100644
238 --- a/grub-core/net/ip.c
239 +++ b/grub-core/net/ip.c
240 @@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb,
241@@ -1019,7 +1019,7 @@ index ea5edf8f1..01410798b 100644
242 {
243 const struct grub_net_bootp_packet *bootp;
244 diff --git a/include/grub/net.h b/include/grub/net.h
245-index cc114286e..58cff96d2 100644
246+index cc114286ea..58cff96d2a 100644
247 --- a/include/grub/net.h
248 +++ b/include/grub/net.h
249 @@ -448,6 +448,66 @@ struct grub_net_bootp_packet
250diff --git a/debian/patches/bootp-process-dhcpack-http-boot.patch b/debian/patches/bootp-process-dhcpack-http-boot.patch
251index 74e9508..075eeca 100644
252--- a/debian/patches/bootp-process-dhcpack-http-boot.patch
253+++ b/debian/patches/bootp-process-dhcpack-http-boot.patch
254@@ -1,4 +1,4 @@
255-From 3de9845e404a99dc3122efbf7c2570482097c412 Mon Sep 17 00:00:00 2001
256+From 583bf554edc8aae87c44e7c9f984835b246e2f0b Mon Sep 17 00:00:00 2001
257 From: Michael Chang <mchang@suse.com>
258 Date: Thu, 27 Oct 2016 17:42:19 -0400
259 Subject: bootp: Add processing DHCPACK packet from HTTP Boot
260@@ -24,7 +24,7 @@ Patch-Name: bootp-process-dhcpack-http-boot.patch
261 2 files changed, 60 insertions(+), 1 deletion(-)
262
263 diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
264-index 21c1824ef..558d97ba1 100644
265+index 21c1824efb..558d97ba1e 100644
266 --- a/grub-core/net/bootp.c
267 +++ b/grub-core/net/bootp.c
268 @@ -154,7 +154,7 @@ struct grub_dhcp_request_options
269@@ -109,7 +109,7 @@ index 21c1824ef..558d97ba1 100644
270 },
271 GRUB_NET_BOOTP_END,
272 diff --git a/include/grub/net.h b/include/grub/net.h
273-index 58cff96d2..b5f9e617e 100644
274+index 58cff96d2a..b5f9e617e5 100644
275 --- a/include/grub/net.h
276 +++ b/include/grub/net.h
277 @@ -523,6 +523,7 @@ enum
278diff --git a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
279index 612fc32..2744692 100644
280--- a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
281+++ b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
282@@ -1,4 +1,4 @@
283-From 0bc1e64554d9dfbcfaf5e384fcb772f861a548d8 Mon Sep 17 00:00:00 2001
284+From 552a1e20296307d177e1d679cae45bc78e101ecc Mon Sep 17 00:00:00 2001
285 From: David Michael <fedora.dm0@gmail.com>
286 Date: Fri, 5 Jul 2019 08:47:02 -0400
287 Subject: lsefisystab: Define SMBIOS3 entry point structures for EFI
288@@ -16,7 +16,7 @@ Patch-Name: cherrypick-lsefisystab-define-smbios3.patch
289 2 files changed, 6 insertions(+)
290
291 diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
292-index df1030221..7c039c509 100644
293+index df10302218..7c039c5097 100644
294 --- a/grub-core/commands/efi/lsefisystab.c
295 +++ b/grub-core/commands/efi/lsefisystab.c
296 @@ -48,6 +48,7 @@ static const struct guid_mapping guid_mappings[] =
297@@ -28,7 +28,7 @@ index df1030221..7c039c509 100644
298 { GRUB_EFI_TIANO_CUSTOM_DECOMPRESS_GUID, "TIANO CUSTOM DECOMPRESS"},
299 { GRUB_EFI_TSC_FREQUENCY_GUID, "TSC FREQUENCY"},
300 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
301-index 75befd10e..9824fbcd0 100644
302+index 75befd10e5..9824fbcd0d 100644
303 --- a/include/grub/efi/api.h
304 +++ b/include/grub/efi/api.h
305 @@ -314,6 +314,11 @@
306diff --git a/debian/patches/cherrypick-lsefisystab-show-dtb.patch b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
307index 6516840..8c17a83 100644
308--- a/debian/patches/cherrypick-lsefisystab-show-dtb.patch
309+++ b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
310@@ -1,4 +1,4 @@
311-From b5a07214b83812f0b8b42dc576021e98237498e6 Mon Sep 17 00:00:00 2001
312+From ffba11952bfc8ec3456d8b72db122550386a25ae Mon Sep 17 00:00:00 2001
313 From: Heinrich Schuchardt <xypron.glpk@gmx.de>
314 Date: Sat, 6 Jul 2019 11:11:02 +0200
315 Subject: lsefisystab: Add support for device tree table
316@@ -27,7 +27,7 @@ Patch-Name: cherrypick-lsefisystab-show-dtb.patch
317 1 file changed, 1 insertion(+)
318
319 diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
320-index 7c039c509..902788250 100644
321+index 7c039c5097..902788250e 100644
322 --- a/grub-core/commands/efi/lsefisystab.c
323 +++ b/grub-core/commands/efi/lsefisystab.c
324 @@ -40,6 +40,7 @@ static const struct guid_mapping guid_mappings[] =
325diff --git a/debian/patches/cherrypick-smbios-module.patch b/debian/patches/cherrypick-smbios-module.patch
326index 8bbe12b..7318eaa 100644
327--- a/debian/patches/cherrypick-smbios-module.patch
328+++ b/debian/patches/cherrypick-smbios-module.patch
329@@ -1,4 +1,4 @@
330-From 982cd5b597e964da666ebdab41c727823a50c776 Mon Sep 17 00:00:00 2001
331+From 4dcbe95e3769a3665139e88cf1e179a802984493 Mon Sep 17 00:00:00 2001
332 From: David Michael <fedora.dm0@gmail.com>
333 Date: Fri, 5 Jul 2019 08:47:09 -0400
334 Subject: smbios: Add a module for retrieving SMBIOS information
335@@ -33,7 +33,7 @@ Patch-Name: cherrypick-smbios-module.patch
336 create mode 100644 include/grub/smbios.h
337
338 diff --git a/docs/grub.texi b/docs/grub.texi
339-index 1baa0fa20..d573f32cb 100644
340+index 1baa0fa20f..d573f32cbb 100644
341 --- a/docs/grub.texi
342 +++ b/docs/grub.texi
343 @@ -3976,6 +3976,7 @@ you forget a command, you can run the command @command{help}
344@@ -126,7 +126,7 @@ index 1baa0fa20..d573f32cb 100644
345 @subsection source
346
347 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
348-index 33e75021d..9b20f3335 100644
349+index 33e75021da..9b20f33355 100644
350 --- a/grub-core/Makefile.core.def
351 +++ b/grub-core/Makefile.core.def
352 @@ -1106,6 +1106,21 @@ module = {
353@@ -153,7 +153,7 @@ index 33e75021d..9b20f3335 100644
354 ieee1275 = commands/ieee1275/suspend.c;
355 diff --git a/grub-core/commands/efi/smbios.c b/grub-core/commands/efi/smbios.c
356 new file mode 100644
357-index 000000000..75202d5aa
358+index 0000000000..75202d5aad
359 --- /dev/null
360 +++ b/grub-core/commands/efi/smbios.c
361 @@ -0,0 +1,61 @@
362@@ -220,7 +220,7 @@ index 000000000..75202d5aa
363 +}
364 diff --git a/grub-core/commands/i386/pc/smbios.c b/grub-core/commands/i386/pc/smbios.c
365 new file mode 100644
366-index 000000000..069d66367
367+index 0000000000..069d663673
368 --- /dev/null
369 +++ b/grub-core/commands/i386/pc/smbios.c
370 @@ -0,0 +1,52 @@
371@@ -278,7 +278,7 @@ index 000000000..069d66367
372 +}
373 diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
374 new file mode 100644
375-index 000000000..7a6a391fc
376+index 0000000000..7a6a391fc1
377 --- /dev/null
378 +++ b/grub-core/commands/smbios.c
379 @@ -0,0 +1,374 @@
380@@ -657,7 +657,7 @@ index 000000000..7a6a391fc
381 + grub_unregister_extcmd (cmd);
382 +}
383 diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c
384-index 492c07c46..e5fffb7d4 100644
385+index 492c07c468..e5fffb7d4a 100644
386 --- a/grub-core/efiemu/i386/pc/cfgtables.c
387 +++ b/grub-core/efiemu/i386/pc/cfgtables.c
388 @@ -22,11 +22,11 @@
389@@ -696,7 +696,7 @@ index 492c07c46..e5fffb7d4 100644
390 }
391 diff --git a/include/grub/smbios.h b/include/grub/smbios.h
392 new file mode 100644
393-index 000000000..15ec260b3
394+index 0000000000..15ec260b32
395 --- /dev/null
396 +++ b/include/grub/smbios.h
397 @@ -0,0 +1,69 @@
398diff --git a/debian/patches/core-in-fs.patch b/debian/patches/core-in-fs.patch
399index 1ba3b4b..b8e13d3 100644
400--- a/debian/patches/core-in-fs.patch
401+++ b/debian/patches/core-in-fs.patch
402@@ -11,7 +11,7 @@ Patch-Name: core-in-fs.patch
403 1 file changed, 8 insertions(+)
404
405 diff --git a/util/setup.c b/util/setup.c
406-index 6f88f3cc4..fbdf2fcc5 100644
407+index 6f88f3cc43..fbdf2fcc59 100644
408 --- a/util/setup.c
409 +++ b/util/setup.c
410 @@ -58,6 +58,8 @@
411diff --git a/debian/patches/default-grub-d.patch b/debian/patches/default-grub-d.patch
412index dc61a66..0837cbd 100644
413--- a/debian/patches/default-grub-d.patch
414+++ b/debian/patches/default-grub-d.patch
415@@ -1,4 +1,4 @@
416-From e1e966557a634500e95e2ec691a0cb8fca144aae Mon Sep 17 00:00:00 2001
417+From 43da93f26fcd81893edb2bbe10f87879a95dcbc5 Mon Sep 17 00:00:00 2001
418 From: Colin Watson <cjwatson@ubuntu.com>
419 Date: Mon, 13 Jan 2014 12:13:10 +0000
420 Subject: Read /etc/default/grub.d/*.cfg after /etc/default/grub
421@@ -14,7 +14,7 @@ Patch-Name: default-grub-d.patch
422 2 files changed, 98 insertions(+), 21 deletions(-)
423
424 diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
425-index 65effa9f3..5478030fd 100644
426+index 65effa9f3a..5478030fde 100644
427 --- a/grub-core/osdep/unix/config.c
428 +++ b/grub-core/osdep/unix/config.c
429 @@ -24,6 +24,8 @@
430@@ -178,7 +178,7 @@ index 65effa9f3..5478030fd 100644
431 + free (cfgdir);
432 }
433 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
434-index b506d63bf..d18bf972f 100644
435+index b506d63bf9..d18bf972f7 100644
436 --- a/util/grub-mkconfig.in
437 +++ b/util/grub-mkconfig.in
438 @@ -164,6 +164,11 @@ fi
439diff --git a/debian/patches/disable-floppies.patch b/debian/patches/disable-floppies.patch
440index 7d4835e..981b9ec 100644
441--- a/debian/patches/disable-floppies.patch
442+++ b/debian/patches/disable-floppies.patch
443@@ -13,7 +13,7 @@ Patch-Name: disable-floppies.patch
444 1 file changed, 12 insertions(+)
445
446 diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
447-index e9ec680cd..8ac523953 100644
448+index e9ec680cdb..8ac5239538 100644
449 --- a/grub-core/kern/emu/hostdisk.c
450 +++ b/grub-core/kern/emu/hostdisk.c
451 @@ -532,6 +532,18 @@ read_device_map (const char *dev_map)
452diff --git a/debian/patches/dpkg-version-comparison.patch b/debian/patches/dpkg-version-comparison.patch
453index 86e5c7e..929070f 100644
454--- a/debian/patches/dpkg-version-comparison.patch
455+++ b/debian/patches/dpkg-version-comparison.patch
456@@ -12,7 +12,7 @@ Patch-Name: dpkg-version-comparison.patch
457 1 file changed, 4 insertions(+), 3 deletions(-)
458
459 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
460-index 0f801cab3..b6606c16e 100644
461+index 0f801cab3e..b6606c16e0 100644
462 --- a/util/grub-mkconfig_lib.in
463 +++ b/util/grub-mkconfig_lib.in
464 @@ -239,8 +239,9 @@ version_test_numeric ()
465diff --git a/debian/patches/efi-variable-storage-minimise-writes.patch b/debian/patches/efi-variable-storage-minimise-writes.patch
466index 5078aa3..1cd6507 100644
467--- a/debian/patches/efi-variable-storage-minimise-writes.patch
468+++ b/debian/patches/efi-variable-storage-minimise-writes.patch
469@@ -1,4 +1,4 @@
470-From 20dd578ec8d17d92790121ce010de0e49eaf9cef Mon Sep 17 00:00:00 2001
471+From 5028184f2c8baf38d6849aa771c4d064fdcd0529 Mon Sep 17 00:00:00 2001
472 From: Colin Watson <cjwatson@ubuntu.com>
473 Date: Mon, 11 Mar 2019 11:17:43 +0000
474 Subject: Minimise writes to EFI variable storage
475@@ -60,7 +60,7 @@ Patch-Name: efi-variable-storage-minimise-writes.patch
476 create mode 100644 grub-core/osdep/unix/efivar.c
477
478 diff --git a/INSTALL b/INSTALL
479-index 8acb40902..342c158e9 100644
480+index 8acb409023..342c158e91 100644
481 --- a/INSTALL
482 +++ b/INSTALL
483 @@ -41,6 +41,11 @@ configuring the GRUB.
484@@ -76,7 +76,7 @@ index 8acb40902..342c158e9 100644
485
486 * libdevmapper 1.02.34 or later (recommended)
487 diff --git a/Makefile.util.def b/Makefile.util.def
488-index ce133e694..504d1c058 100644
489+index ce133e694e..504d1c0581 100644
490 --- a/Makefile.util.def
491 +++ b/Makefile.util.def
492 @@ -565,6 +565,8 @@ program = {
493@@ -180,7 +180,7 @@ index ce133e694..504d1c058 100644
494
495 script = {
496 diff --git a/configure.ac b/configure.ac
497-index e382c7480..883245553 100644
498+index e382c7480d..883245553d 100644
499 --- a/configure.ac
500 +++ b/configure.ac
501 @@ -443,6 +443,18 @@ AC_CHECK_HEADER([util.h], [
502@@ -204,7 +204,7 @@ index e382c7480..883245553 100644
503 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
504 diff --git a/grub-core/osdep/efivar.c b/grub-core/osdep/efivar.c
505 new file mode 100644
506-index 000000000..d2750e252
507+index 0000000000..d2750e2524
508 --- /dev/null
509 +++ b/grub-core/osdep/efivar.c
510 @@ -0,0 +1,3 @@
511@@ -213,7 +213,7 @@ index 000000000..d2750e252
512 +#endif
513 diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
514 new file mode 100644
515-index 000000000..4a58328b4
516+index 0000000000..4a58328b42
517 --- /dev/null
518 +++ b/grub-core/osdep/unix/efivar.c
519 @@ -0,0 +1,508 @@
520@@ -726,7 +726,7 @@ index 000000000..4a58328b4
521 +
522 +#endif /* HAVE_EFIVAR */
523 diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
524-index 9c439326a..b561174ea 100644
525+index 9c439326a0..b561174ea9 100644
526 --- a/grub-core/osdep/unix/platform.c
527 +++ b/grub-core/osdep/unix/platform.c
528 @@ -19,15 +19,12 @@
529@@ -856,7 +856,7 @@ index 9c439326a..b561174ea 100644
530
531 void
532 diff --git a/include/grub/util/install.h b/include/grub/util/install.h
533-index 8aeb5c4f2..a521f1663 100644
534+index 8aeb5c4f20..a521f1663f 100644
535 --- a/include/grub/util/install.h
536 +++ b/include/grub/util/install.h
537 @@ -219,6 +219,11 @@ grub_install_get_default_x86_platform (void);
538@@ -872,7 +872,7 @@ index 8aeb5c4f2..a521f1663 100644
539 grub_install_register_efi (grub_device_t efidir_grub_dev,
540 const char *efifile_path,
541 diff --git a/util/grub-install.c b/util/grub-install.c
542-index 4bad8de61..63462e4e0 100644
543+index 4bad8de612..63462e4e09 100644
544 --- a/util/grub-install.c
545 +++ b/util/grub-install.c
546 @@ -2084,7 +2084,7 @@ main (int argc, char *argv[])
547diff --git a/debian/patches/efinet-set-dns-from-uefi-proto.patch b/debian/patches/efinet-set-dns-from-uefi-proto.patch
548index e500199..730ad3a 100644
549--- a/debian/patches/efinet-set-dns-from-uefi-proto.patch
550+++ b/debian/patches/efinet-set-dns-from-uefi-proto.patch
551@@ -1,4 +1,4 @@
552-From 6a014b8846142de23cb5254f653facc8f3456a8c Mon Sep 17 00:00:00 2001
553+From 747f4241696cf526d68ff7de1efac04e1871567b Mon Sep 17 00:00:00 2001
554 From: Michael Chang <mchang@suse.com>
555 Date: Thu, 27 Oct 2016 17:43:21 -0400
556 Subject: efinet: Setting DNS server from UEFI protocol
557@@ -35,7 +35,7 @@ Patch-Name: efinet-set-dns-from-uefi-proto.patch
558 2 files changed, 239 insertions(+)
559
560 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
561-index 2d3b00f0e..82a28fb6e 100644
562+index 2d3b00f0e1..82a28fb6e9 100644
563 --- a/grub-core/net/drivers/efi/efinet.c
564 +++ b/grub-core/net/drivers/efi/efinet.c
565 @@ -30,6 +30,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
566@@ -244,7 +244,7 @@ index 2d3b00f0e..82a28fb6e 100644
567 }
568
569 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
570-index 664cea37b..75befd10e 100644
571+index 664cea37b5..75befd10e5 100644
572 --- a/include/grub/efi/api.h
573 +++ b/include/grub/efi/api.h
574 @@ -334,6 +334,16 @@
575diff --git a/debian/patches/efinet-set-network-from-uefi-devpath.patch b/debian/patches/efinet-set-network-from-uefi-devpath.patch
576index bba19a4..b844b7f 100644
577--- a/debian/patches/efinet-set-network-from-uefi-devpath.patch
578+++ b/debian/patches/efinet-set-network-from-uefi-devpath.patch
579@@ -1,4 +1,4 @@
580-From 1bacee679cef6c6f56af81108288c6468d8f6295 Mon Sep 17 00:00:00 2001
581+From 36785761748dd2ba5a38ec8c7fc412c8f875b0e2 Mon Sep 17 00:00:00 2001
582 From: Michael Chang <mchang@suse.com>
583 Date: Thu, 27 Oct 2016 17:43:05 -0400
584 Subject: efinet: Setting network from UEFI device path
585@@ -34,7 +34,7 @@ Patch-Name: efinet-set-network-from-uefi-devpath.patch
586 2 files changed, 270 insertions(+), 9 deletions(-)
587
588 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
589-index fc90415f2..2d3b00f0e 100644
590+index fc90415f29..2d3b00f0e1 100644
591 --- a/grub-core/net/drivers/efi/efinet.c
592 +++ b/grub-core/net/drivers/efi/efinet.c
593 @@ -23,6 +23,7 @@
594@@ -358,7 +358,7 @@ index fc90415f2..2d3b00f0e 100644
595 }
596 }
597 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
598-index ca6cdc159..664cea37b 100644
599+index ca6cdc1596..664cea37b5 100644
600 --- a/include/grub/efi/api.h
601 +++ b/include/grub/efi/api.h
602 @@ -825,6 +825,8 @@ struct grub_efi_ipv4_device_path
603diff --git a/debian/patches/efinet-uefi-ipv6-pxe-support.patch b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
604index 531e73d..f500a04 100644
605--- a/debian/patches/efinet-uefi-ipv6-pxe-support.patch
606+++ b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
607@@ -1,4 +1,4 @@
608-From 9afb0c174814d7235fc18623725cd037a76ff541 Mon Sep 17 00:00:00 2001
609+From aa6426e9b8ce15c152af7d20686b26caadb2f28a Mon Sep 17 00:00:00 2001
610 From: Michael Chang <mchang@suse.com>
611 Date: Thu, 27 Oct 2016 17:41:21 -0400
612 Subject: efinet: UEFI IPv6 PXE support
613@@ -17,7 +17,7 @@ Patch-Name: efinet-uefi-ipv6-pxe-support.patch
614 2 files changed, 73 insertions(+), 6 deletions(-)
615
616 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
617-index 5388f952b..fc90415f2 100644
618+index 5388f952ba..fc90415f29 100644
619 --- a/grub-core/net/drivers/efi/efinet.c
620 +++ b/grub-core/net/drivers/efi/efinet.c
621 @@ -378,11 +378,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
622@@ -52,7 +52,7 @@ index 5388f952b..fc90415f2 100644
623 }
624 }
625 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
626-index addcbfa8f..ca6cdc159 100644
627+index addcbfa8fb..ca6cdc1596 100644
628 --- a/include/grub/efi/api.h
629 +++ b/include/grub/efi/api.h
630 @@ -1452,14 +1452,67 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output
631diff --git a/debian/patches/gettext-quiet.patch b/debian/patches/gettext-quiet.patch
632index 11a7e6f..7248d6c 100644
633--- a/debian/patches/gettext-quiet.patch
634+++ b/debian/patches/gettext-quiet.patch
635@@ -1,4 +1,4 @@
636-From 259b7fa08b66717709735370d05fc9eb64682484 Mon Sep 17 00:00:00 2001
637+From 510fb7381e095c4212907e6b45e58f24e1889acf Mon Sep 17 00:00:00 2001
638 From: Colin Watson <cjwatson@ubuntu.com>
639 Date: Mon, 13 Jan 2014 12:13:02 +0000
640 Subject: Silence error messages when translations are unavailable
641@@ -13,7 +13,7 @@ Patch-Name: gettext-quiet.patch
642 1 file changed, 5 insertions(+)
643
644 diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
645-index 4d02e62c1..2a19389f2 100644
646+index 4d02e62c10..2a19389f2a 100644
647 --- a/grub-core/gettext/gettext.c
648 +++ b/grub-core/gettext/gettext.c
649 @@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
650diff --git a/debian/patches/gfxpayload-dynamic.patch b/debian/patches/gfxpayload-dynamic.patch
651index 8545c4d..826c65a 100644
652--- a/debian/patches/gfxpayload-dynamic.patch
653+++ b/debian/patches/gfxpayload-dynamic.patch
654@@ -1,4 +1,4 @@
655-From 2e91d5ab9adfb6a86b82b89715d6d9a7b3b52005 Mon Sep 17 00:00:00 2001
656+From 66ef92ba8ac39f919415f8687b8d0d9032c4a079 Mon Sep 17 00:00:00 2001
657 From: Evan Broder <evan@ebroder.net>
658 Date: Mon, 13 Jan 2014 12:13:29 +0000
659 Subject: Add configure option to enable gfxpayload=keep dynamically
660@@ -23,7 +23,7 @@ Patch-Name: gfxpayload-dynamic.patch
661 create mode 100644 grub-core/commands/i386/pc/hwmatch.c
662
663 diff --git a/configure.ac b/configure.ac
664-index 7dda5bb32..dbc429ce0 100644
665+index 7dda5bb32b..dbc429ce0a 100644
666 --- a/configure.ac
667 +++ b/configure.ac
668 @@ -1879,6 +1879,17 @@ else
669@@ -45,7 +45,7 @@ index 7dda5bb32..dbc429ce0 100644
670
671 AC_SUBST([FONT_SOURCE])
672 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
673-index 474a63e68..aadb4cdff 100644
674+index 474a63e68c..aadb4cdff8 100644
675 --- a/grub-core/Makefile.core.def
676 +++ b/grub-core/Makefile.core.def
677 @@ -971,6 +971,14 @@ module = {
678@@ -65,7 +65,7 @@ index 474a63e68..aadb4cdff 100644
679 common = commands/keystatus.c;
680 diff --git a/grub-core/commands/i386/pc/hwmatch.c b/grub-core/commands/i386/pc/hwmatch.c
681 new file mode 100644
682-index 000000000..6de07cecc
683+index 0000000000..6de07cecc8
684 --- /dev/null
685 +++ b/grub-core/commands/i386/pc/hwmatch.c
686 @@ -0,0 +1,146 @@
687@@ -216,7 +216,7 @@ index 000000000..6de07cecc
688 + grub_unregister_command (cmd);
689 +}
690 diff --git a/include/grub/file.h b/include/grub/file.h
691-index 31567483c..e3c4cae2b 100644
692+index 31567483cc..e3c4cae2b5 100644
693 --- a/include/grub/file.h
694 +++ b/include/grub/file.h
695 @@ -122,6 +122,7 @@ enum grub_file_type
696@@ -228,7 +228,7 @@ index 31567483c..e3c4cae2b 100644
697 GRUB_FILE_TYPE_LOADENV,
698 GRUB_FILE_TYPE_SAVEENV,
699 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
700-index 2be66c702..09393c28e 100644
701+index 2be66c7028..09393c28ee 100644
702 --- a/util/grub.d/10_linux.in
703 +++ b/util/grub.d/10_linux.in
704 @@ -23,6 +23,7 @@ datarootdir="@datarootdir@"
705@@ -290,7 +290,7 @@ index 2be66c702..09393c28e 100644
706 # yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
707 submenu_indentation=""
708 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
709-index 548e14856..fc99f16e7 100755
710+index ec4b49d9d7..8cd7d12851 100755
711 --- a/util/grub.d/10_linux_zfs.in
712 +++ b/util/grub.d/10_linux_zfs.in
713 @@ -22,6 +22,7 @@ datarootdir="@datarootdir@"
714@@ -301,7 +301,7 @@ index 548e14856..fc99f16e7 100755
715
716 . "${pkgdatadir}/grub-mkconfig_lib"
717
718-@@ -713,6 +714,41 @@ generate_grub_menu_metadata() {
719+@@ -716,6 +717,41 @@ generate_grub_menu_metadata() {
720 done
721 }
722
723@@ -343,7 +343,7 @@ index 548e14856..fc99f16e7 100755
724 # Cache for prepare_grub_to_access_device call
725 # $1: boot_device
726 # $2: submenu_level
727-@@ -773,9 +809,11 @@ zfs_linux_entry () {
728+@@ -776,9 +812,11 @@ zfs_linux_entry () {
729 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
730 echo "${submenu_indentation} load_video"
731 fi
732@@ -358,7 +358,7 @@ index 548e14856..fc99f16e7 100755
733 fi
734
735 echo "${submenu_indentation} insmod gzio"
736-@@ -838,6 +876,8 @@ generate_grub_menu() {
737+@@ -841,6 +879,8 @@ generate_grub_menu() {
738 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
739 fi
740
741diff --git a/debian/patches/gfxpayload-keep-default.patch b/debian/patches/gfxpayload-keep-default.patch
742index 114ce62..23b668f 100644
743--- a/debian/patches/gfxpayload-keep-default.patch
744+++ b/debian/patches/gfxpayload-keep-default.patch
745@@ -1,4 +1,4 @@
746-From 6da735cfaac928da6dc1283a15a669b1ddd07979 Mon Sep 17 00:00:00 2001
747+From e848d8754210095660b229f4639a065e8d96a0d0 Mon Sep 17 00:00:00 2001
748 From: Didier Roche <didrocks@ubuntu.com>
749 Date: Tue, 31 Mar 2020 15:09:45 +0200
750 Subject: Disable gfxpayload=keep by default
751@@ -24,7 +24,7 @@ Patch-Name: gfxpayload-keep-default.patch
752 2 files changed, 8 deletions(-)
753
754 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
755-index a75096609..f839b3b55 100644
756+index a75096609a..f839b3b55f 100644
757 --- a/util/grub.d/10_linux.in
758 +++ b/util/grub.d/10_linux.in
759 @@ -118,10 +118,6 @@ linux_entry ()
760@@ -39,10 +39,10 @@ index a75096609..f839b3b55 100644
761 if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
762 echo " load_video" | sed "s/^/$submenu_indentation/"
763 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
764-index f50e1231a..d27634738 100755
765+index 5ec65fa941..b24587f0a5 100755
766 --- a/util/grub.d/10_linux_zfs.in
767 +++ b/util/grub.d/10_linux_zfs.in
768-@@ -741,10 +741,6 @@ zfs_linux_entry () {
769+@@ -744,10 +744,6 @@ zfs_linux_entry () {
770 # FIXME: We need an interface to select vesafb in case efifb can't be used.
771 if [ "${GRUB_GFXPAYLOAD_LINUX}" = "" ]; then
772 echo "${submenu_indentation} load_video"
773diff --git a/debian/patches/grub-install-pvxen-paths.patch b/debian/patches/grub-install-pvxen-paths.patch
774index a160a43..d2002ff 100644
775--- a/debian/patches/grub-install-pvxen-paths.patch
776+++ b/debian/patches/grub-install-pvxen-paths.patch
777@@ -1,4 +1,4 @@
778-From 4e813c89c93bba7da480824d617e87659295841b Mon Sep 17 00:00:00 2001
779+From 34f053ee85aaa87fd40682a0f9c4e8c5858eeb55 Mon Sep 17 00:00:00 2001
780 From: Ian Campbell <ijc@hellion.org.uk>
781 Date: Sat, 6 Sep 2014 12:20:12 +0100
782 Subject: grub-install: Install PV Xen binaries into the upstream specified
783@@ -28,7 +28,7 @@ v2: Respect bootdir, create /boot/xen as needed.
784 1 file changed, 22 insertions(+), 2 deletions(-)
785
786 diff --git a/util/grub-install.c b/util/grub-install.c
787-index 70d6700de..64c292383 100644
788+index 70d6700de8..64c292383f 100644
789 --- a/util/grub-install.c
790 +++ b/util/grub-install.c
791 @@ -2058,6 +2058,28 @@ main (int argc, char *argv[])
792diff --git a/debian/patches/grub-legacy-0-based-partitions.patch b/debian/patches/grub-legacy-0-based-partitions.patch
793index 2039c3f..09439dc 100644
794--- a/debian/patches/grub-legacy-0-based-partitions.patch
795+++ b/debian/patches/grub-legacy-0-based-partitions.patch
796@@ -13,7 +13,7 @@ Patch-Name: grub-legacy-0-based-partitions.patch
797 1 file changed, 14 insertions(+)
798
799 diff --git a/util/getroot.c b/util/getroot.c
800-index 847406fba..cdd41153c 100644
801+index 847406fbab..cdd41153c5 100644
802 --- a/util/getroot.c
803 +++ b/util/getroot.c
804 @@ -245,6 +245,20 @@ find_partition (grub_disk_t dsk __attribute__ ((unused)),
805diff --git a/debian/patches/grub.cfg-400.patch b/debian/patches/grub.cfg-400.patch
806index 1fee91a..4731767 100644
807--- a/debian/patches/grub.cfg-400.patch
808+++ b/debian/patches/grub.cfg-400.patch
809@@ -9,7 +9,7 @@ Patch-Name: grub.cfg-400.patch
810 1 file changed, 4 insertions(+)
811
812 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
813-index 9f477ff05..45cd4cc54 100644
814+index 9f477ff054..45cd4cc541 100644
815 --- a/util/grub-mkconfig.in
816 +++ b/util/grub-mkconfig.in
817 @@ -276,6 +276,10 @@ for i in "${grub_mkconfig_dir}"/* ; do
818diff --git a/debian/patches/ieee1275-clear-reset.patch b/debian/patches/ieee1275-clear-reset.patch
819index 1d082e6..1bd0bfc 100644
820--- a/debian/patches/ieee1275-clear-reset.patch
821+++ b/debian/patches/ieee1275-clear-reset.patch
822@@ -1,4 +1,4 @@
823-From 07e29f9e7e317d74d41fed30c6a8ade4f301652c Mon Sep 17 00:00:00 2001
824+From 406f5fc7f97315af793414d9e0ca14972bf6de0f Mon Sep 17 00:00:00 2001
825 From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
826 Date: Thu, 25 Sep 2014 18:41:29 -0300
827 Subject: Include a text attribute reset in the clear command for ppc
828@@ -18,7 +18,7 @@ Patch-Name: ieee1275-clear-reset.patch
829 1 file changed, 1 insertion(+), 1 deletion(-)
830
831 diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
832-index d317efa36..63892ad42 100644
833+index d317efa368..63892ad427 100644
834 --- a/grub-core/term/terminfo.c
835 +++ b/grub-core/term/terminfo.c
836 @@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
837diff --git a/debian/patches/ignore-grub_func_test-failures.patch b/debian/patches/ignore-grub_func_test-failures.patch
838index cbbd3b2..9cd2c60 100644
839--- a/debian/patches/ignore-grub_func_test-failures.patch
840+++ b/debian/patches/ignore-grub_func_test-failures.patch
841@@ -1,4 +1,4 @@
842-From 11457a76c942775508953575e1b284f4c03ee192 Mon Sep 17 00:00:00 2001
843+From c944dea56be3cce4bf4895a9915d35e75099f420 Mon Sep 17 00:00:00 2001
844 From: Colin Watson <cjwatson@debian.org>
845 Date: Mon, 13 Jan 2014 12:13:32 +0000
846 Subject: Ignore functional test failures for now as they are broken
847@@ -14,7 +14,7 @@ Patch-Name: ignore-grub_func_test-failures.patch
848 1 file changed, 3 insertions(+), 1 deletion(-)
849
850 diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in
851-index c67f9e422..728cd6e06 100644
852+index c67f9e4225..728cd6e066 100644
853 --- a/tests/grub_func_test.in
854 +++ b/tests/grub_func_test.in
855 @@ -16,6 +16,8 @@ out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/b
856diff --git a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
857index b16f128..82991d0 100644
858--- a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
859+++ b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
860@@ -1,4 +1,4 @@
861-From 125b4317bafb66a6e9381041102c7d789c296ea4 Mon Sep 17 00:00:00 2001
862+From d6fd02df51bc1b062fe70b2c4f6d33728d4219ee Mon Sep 17 00:00:00 2001
863 From: Ian Campbell <ijc@debian.org>
864 Date: Sun, 30 Nov 2014 12:12:52 +0000
865 Subject: Arrange to insmod xzio and lzopio when booting a kernel as a Xen
866@@ -21,7 +21,7 @@ Patch-Name: insmod-xzio-and-lzopio-on-xen.patch
867 2 files changed, 2 insertions(+)
868
869 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
870-index 2c418c5ec..85b30084a 100644
871+index 2c418c5ec8..85b30084ad 100644
872 --- a/util/grub.d/10_linux.in
873 +++ b/util/grub.d/10_linux.in
874 @@ -166,6 +166,7 @@ linux_entry ()
875@@ -33,10 +33,10 @@ index 2c418c5ec..85b30084a 100644
876 if [ x$dirname = x/ ]; then
877 if [ -z "${prepare_root_cache}" ]; then
878 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
879-index b068f0e96..efdb8afae 100755
880+index 4477fa6061..4c48abef01 100755
881 --- a/util/grub.d/10_linux_zfs.in
882 +++ b/util/grub.d/10_linux_zfs.in
883-@@ -835,6 +835,7 @@ zfs_linux_entry () {
884+@@ -838,6 +838,7 @@ zfs_linux_entry () {
885 fi
886
887 echo "${submenu_indentation} insmod gzio"
888diff --git a/debian/patches/install-efi-fallback.patch b/debian/patches/install-efi-fallback.patch
889index 6c0f0cf..c4cf303 100644
890--- a/debian/patches/install-efi-fallback.patch
891+++ b/debian/patches/install-efi-fallback.patch
892@@ -1,4 +1,4 @@
893-From 342cbb4b33a6d47e7c1b645ace365203f31165e2 Mon Sep 17 00:00:00 2001
894+From 70a2610a5392e09978ff7ccd9d69c942f60c522d Mon Sep 17 00:00:00 2001
895 From: Colin Watson <cjwatson@ubuntu.com>
896 Date: Mon, 13 Jan 2014 12:13:05 +0000
897 Subject: Fall back to non-EFI if booted using EFI but -efi is missing
898@@ -19,7 +19,7 @@ Patch-Name: install-efi-fallback.patch
899 1 file changed, 35 insertions(+), 5 deletions(-)
900
901 diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
902-index e28a79dab..2e7f72086 100644
903+index e28a79dab3..2e7f720869 100644
904 --- a/grub-core/osdep/linux/platform.c
905 +++ b/grub-core/osdep/linux/platform.c
906 @@ -19,10 +19,12 @@
907diff --git a/debian/patches/install-efi-ubuntu-flavours.patch b/debian/patches/install-efi-ubuntu-flavours.patch
908index 31a74c8..d666dae 100644
909--- a/debian/patches/install-efi-ubuntu-flavours.patch
910+++ b/debian/patches/install-efi-ubuntu-flavours.patch
911@@ -1,4 +1,4 @@
912-From 6def03933e04c3f0d3bbcb37b96dc08d1ba67d74 Mon Sep 17 00:00:00 2001
913+From dc18a17ef4f437fe9edfcf58747b70690e4ad32e Mon Sep 17 00:00:00 2001
914 From: Colin Watson <cjwatson@ubuntu.com>
915 Date: Mon, 13 Jan 2014 12:13:27 +0000
916 Subject: Cope with Kubuntu setting GRUB_DISTRIBUTOR
917@@ -17,7 +17,7 @@ Patch-Name: install-efi-ubuntu-flavours.patch
918 1 file changed, 2 insertions(+)
919
920 diff --git a/util/grub-install.c b/util/grub-install.c
921-index e1e40cf2b..f0d59c180 100644
922+index e1e40cf2b5..f0d59c1809 100644
923 --- a/util/grub-install.c
924 +++ b/util/grub-install.c
925 @@ -1115,6 +1115,8 @@ main (int argc, char *argv[])
926diff --git a/debian/patches/install-locale-langpack.patch b/debian/patches/install-locale-langpack.patch
927index 4537170..91dd7c4 100644
928--- a/debian/patches/install-locale-langpack.patch
929+++ b/debian/patches/install-locale-langpack.patch
930@@ -1,4 +1,4 @@
931-From 4f4b15148b61872395936b083eae7b843ac7d373 Mon Sep 17 00:00:00 2001
932+From 7b60caf762c21f914b0d55b1d1b05dd54106e040 Mon Sep 17 00:00:00 2001
933 From: Colin Watson <cjwatson@ubuntu.com>
934 Date: Mon, 13 Jan 2014 12:13:07 +0000
935 Subject: Prefer translations from Ubuntu language packs if available
936@@ -13,7 +13,7 @@ Patch-Name: install-locale-langpack.patch
937 1 file changed, 30 insertions(+), 7 deletions(-)
938
939 diff --git a/util/grub-install-common.c b/util/grub-install-common.c
940-index ca0ac612a..fdfe2c7ea 100644
941+index ca0ac612ac..fdfe2c7ead 100644
942 --- a/util/grub-install-common.c
943 +++ b/util/grub-install-common.c
944 @@ -609,17 +609,25 @@ get_localedir (void)
945diff --git a/debian/patches/install-powerpc-machtypes.patch b/debian/patches/install-powerpc-machtypes.patch
946index bbc8d71..c94c436 100644
947--- a/debian/patches/install-powerpc-machtypes.patch
948+++ b/debian/patches/install-powerpc-machtypes.patch
949@@ -1,4 +1,4 @@
950-From 6468fe3eb25e597acd0c80e3f7b5930472328d89 Mon Sep 17 00:00:00 2001
951+From 15fb6fc1774a74152ad3070d2f14b88c00759577 Mon Sep 17 00:00:00 2001
952 From: Colin Watson <cjwatson@debian.org>
953 Date: Tue, 28 Jan 2014 14:40:02 +0000
954 Subject: Port yaboot logic for various powerpc machine types
955@@ -25,7 +25,7 @@ Patch-Name: install-powerpc-machtypes.patch
956 6 files changed, 119 insertions(+), 6 deletions(-)
957
958 diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c
959-index a7dafd85a..6c293ed2d 100644
960+index a7dafd85a9..6c293ed2d0 100644
961 --- a/grub-core/osdep/basic/platform.c
962 +++ b/grub-core/osdep/basic/platform.c
963 @@ -30,3 +30,8 @@ grub_install_get_default_x86_platform (void)
964@@ -38,7 +38,7 @@ index a7dafd85a..6c293ed2d 100644
965 + return "generic";
966 +}
967 diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
968-index 2e7f72086..5b37366d4 100644
969+index 2e7f720869..5b37366d4d 100644
970 --- a/grub-core/osdep/linux/platform.c
971 +++ b/grub-core/osdep/linux/platform.c
972 @@ -24,6 +24,7 @@
973@@ -125,7 +125,7 @@ index 2e7f72086..5b37366d4 100644
974 + return machtype;
975 +}
976 diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
977-index 55b8f4016..9c439326a 100644
978+index 55b8f40162..9c439326a0 100644
979 --- a/grub-core/osdep/unix/platform.c
980 +++ b/grub-core/osdep/unix/platform.c
981 @@ -218,13 +218,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
982@@ -165,7 +165,7 @@ index 55b8f4016..9c439326a 100644
983
984 free (boot_device);
985 diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
986-index 7eb53fe01..e19a3d9a8 100644
987+index 7eb53fe01b..e19a3d9a8a 100644
988 --- a/grub-core/osdep/windows/platform.c
989 +++ b/grub-core/osdep/windows/platform.c
990 @@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void)
991@@ -182,7 +182,7 @@ index 7eb53fe01..e19a3d9a8 100644
992 get_efi_variable (const wchar_t *varname, ssize_t *len)
993 {
994 diff --git a/include/grub/util/install.h b/include/grub/util/install.h
995-index 2631b1074..8aeb5c4f2 100644
996+index 2631b10745..8aeb5c4f20 100644
997 --- a/include/grub/util/install.h
998 +++ b/include/grub/util/install.h
999 @@ -216,6 +216,9 @@ grub_install_get_default_arm_platform (void);
1000@@ -196,7 +196,7 @@ index 2631b1074..8aeb5c4f2 100644
1001 grub_install_register_efi (grub_device_t efidir_grub_dev,
1002 const char *efifile_path,
1003 diff --git a/util/grub-install.c b/util/grub-install.c
1004-index f0d59c180..70d6700de 100644
1005+index f0d59c1809..70d6700de8 100644
1006 --- a/util/grub-install.c
1007 +++ b/util/grub-install.c
1008 @@ -1177,7 +1177,18 @@ main (int argc, char *argv[])
1009diff --git a/debian/patches/install-stage2-confusion.patch b/debian/patches/install-stage2-confusion.patch
1010index a803a68..6451234 100644
1011--- a/debian/patches/install-stage2-confusion.patch
1012+++ b/debian/patches/install-stage2-confusion.patch
1013@@ -1,4 +1,4 @@
1014-From d9969cb0267a40684bf7a60d70bfc3fc8a962a90 Mon Sep 17 00:00:00 2001
1015+From 65b6b662d6379652ca1bef129a686494669997a1 Mon Sep 17 00:00:00 2001
1016 From: Colin Watson <cjwatson@debian.org>
1017 Date: Mon, 13 Jan 2014 12:12:58 +0000
1018 Subject: If GRUB Legacy is still around, tell packaging to ignore it
1019@@ -13,7 +13,7 @@ Patch-Name: install-stage2-confusion.patch
1020 1 file changed, 14 insertions(+)
1021
1022 diff --git a/util/grub-install.c b/util/grub-install.c
1023-index 8a55ad4b8..3b4606eef 100644
1024+index 8a55ad4b8d..3b4606eef1 100644
1025 --- a/util/grub-install.c
1026 +++ b/util/grub-install.c
1027 @@ -42,6 +42,7 @@
1028diff --git a/debian/patches/maybe-quiet.patch b/debian/patches/maybe-quiet.patch
1029index 64e8d68..3706357 100644
1030--- a/debian/patches/maybe-quiet.patch
1031+++ b/debian/patches/maybe-quiet.patch
1032@@ -1,4 +1,4 @@
1033-From f93cd4fda2916af2b70228878f97cb7bbdeb234d Mon Sep 17 00:00:00 2001
1034+From e5e64092c5dfeab61f1de2ef270827ba84f88c0e Mon Sep 17 00:00:00 2001
1035 From: Didier Roche <didrocks@ubuntu.com>
1036 Date: Tue, 31 Mar 2020 15:20:15 +0200
1037 Subject: Add configure option to reduce visual clutter at boot time
1038@@ -47,7 +47,7 @@ Patch-Name: maybe-quiet.patch
1039 10 files changed, 118 insertions(+), 8 deletions(-)
1040
1041 diff --git a/config.h.in b/config.h.in
1042-index 9e8f9911b..d2c4ce8e5 100644
1043+index 9e8f9911b1..d2c4ce8e51 100644
1044 --- a/config.h.in
1045 +++ b/config.h.in
1046 @@ -12,6 +12,8 @@
1047@@ -60,7 +60,7 @@ index 9e8f9911b..d2c4ce8e5 100644
1048 /* We don't need those. */
1049 #define MINILZO_CFG_SKIP_LZO_PTR 1
1050 diff --git a/configure.ac b/configure.ac
1051-index 1e5abc67d..ea00ccd69 100644
1052+index 1e5abc67d9..ea00ccd691 100644
1053 --- a/configure.ac
1054 +++ b/configure.ac
1055 @@ -1857,6 +1857,17 @@ else
1056@@ -93,7 +93,7 @@ index 1e5abc67d..ea00ccd69 100644
1057 echo "*******************************************************"
1058 ]
1059 diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
1060-index 2bd0b2d28..b0c0f2225 100644
1061+index 2bd0b2d286..b0c0f2225e 100644
1062 --- a/grub-core/boot/i386/pc/boot.S
1063 +++ b/grub-core/boot/i386/pc/boot.S
1064 @@ -19,6 +19,9 @@
1065@@ -125,7 +125,7 @@ index 2bd0b2d28..b0c0f2225 100644
1066 movw $disk_address_packet, %si
1067
1068 diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
1069-index c1addc0df..9b6d7a7ed 100644
1070+index c1addc0df2..9b6d7a7edc 100644
1071 --- a/grub-core/boot/i386/pc/diskboot.S
1072 +++ b/grub-core/boot/i386/pc/diskboot.S
1073 @@ -18,6 +18,9 @@
1074@@ -205,7 +205,7 @@ index c1addc0df..9b6d7a7ed 100644
1075
1076 notification_step: .asciz "."
1077 diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
1078-index 9cad0c448..714b63d67 100644
1079+index 9cad0c4485..714b63d674 100644
1080 --- a/grub-core/kern/main.c
1081 +++ b/grub-core/kern/main.c
1082 @@ -264,15 +264,25 @@ reclaim_module_space (void)
1083@@ -248,7 +248,7 @@ index 9cad0c448..714b63d67 100644
1084 grub_rescue_run ();
1085 }
1086 diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c
1087-index dcd7d4439..a93524eab 100644
1088+index dcd7d44397..a93524eabb 100644
1089 --- a/grub-core/kern/rescue_reader.c
1090 +++ b/grub-core/kern/rescue_reader.c
1091 @@ -78,7 +78,9 @@ grub_rescue_read_line (char **line, int cont,
1092@@ -262,7 +262,7 @@ index dcd7d4439..a93524eab 100644
1093 while (1)
1094 {
1095 diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
1096-index 1b03dfd57..0aa389fa1 100644
1097+index 1b03dfd57b..0aa389fa16 100644
1098 --- a/grub-core/normal/main.c
1099 +++ b/grub-core/normal/main.c
1100 @@ -389,6 +389,15 @@ static grub_err_t
1101@@ -292,7 +292,7 @@ index 1b03dfd57..0aa389fa1 100644
1102 while (1)
1103 {
1104 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
1105-index 3611ee9ea..ebf5a0f10 100644
1106+index 3611ee9ea7..ebf5a0f109 100644
1107 --- a/grub-core/normal/menu.c
1108 +++ b/grub-core/normal/menu.c
1109 @@ -827,12 +827,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
1110@@ -339,7 +339,7 @@ index 3611ee9ea..ebf5a0f10 100644
1111 if (auto_boot)
1112 grub_menu_execute_with_fallback (menu, e, autobooted,
1113 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1114-index cb1cc200e..479a8bf4e 100644
1115+index cb1cc200e4..479a8bf4e5 100644
1116 --- a/util/grub.d/10_linux.in
1117 +++ b/util/grub.d/10_linux.in
1118 @@ -21,6 +21,7 @@ prefix="@prefix@"
1119@@ -386,7 +386,7 @@ index cb1cc200e..479a8bf4e 100644
1120 EOF
1121 fi
1122 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1123-index c1dfe8ae8..1a656b2dd 100755
1124+index bd4f1a2123..3a0e6d1035 100755
1125 --- a/util/grub.d/10_linux_zfs.in
1126 +++ b/util/grub.d/10_linux_zfs.in
1127 @@ -20,6 +20,7 @@ set -e
1128@@ -397,7 +397,7 @@ index c1dfe8ae8..1a656b2dd 100755
1129
1130 . "${pkgdatadir}/grub-mkconfig_lib"
1131
1132-@@ -776,7 +777,9 @@ zfs_linux_entry () {
1133+@@ -779,7 +780,9 @@ zfs_linux_entry () {
1134
1135 echo "$(prepare_grub_to_access_device_cached "${boot_device}" "${submenu_level}")"
1136
1137@@ -408,7 +408,7 @@ index c1dfe8ae8..1a656b2dd 100755
1138
1139 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
1140 if [ ${type} = "recovery" ]; then
1141-@@ -785,7 +788,9 @@ zfs_linux_entry () {
1142+@@ -788,7 +791,9 @@ zfs_linux_entry () {
1143
1144 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"
1145
1146diff --git a/debian/patches/mkconfig-loopback.patch b/debian/patches/mkconfig-loopback.patch
1147index 0c7498b..0398786 100644
1148--- a/debian/patches/mkconfig-loopback.patch
1149+++ b/debian/patches/mkconfig-loopback.patch
1150@@ -1,4 +1,4 @@
1151-From 4750b94c28b61e29d3f1bfce6bc7fa8f48c45526 Mon Sep 17 00:00:00 2001
1152+From 797776285ad55df88f81c3c17656e03a187e7140 Mon Sep 17 00:00:00 2001
1153 From: Colin Watson <cjwatson@debian.org>
1154 Date: Mon, 13 Jan 2014 12:13:00 +0000
1155 Subject: Handle filesystems loop-mounted on file images
1156@@ -21,7 +21,7 @@ Patch-Name: mkconfig-loopback.patch
1157 3 files changed, 34 insertions(+)
1158
1159 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
1160-index b6606c16e..b05df554d 100644
1161+index b6606c16e0..b05df554da 100644
1162 --- a/util/grub-mkconfig_lib.in
1163 +++ b/util/grub-mkconfig_lib.in
1164 @@ -133,6 +133,22 @@ prepare_grub_to_access_device ()
1165@@ -63,7 +63,7 @@ index b6606c16e..b05df554d 100644
1166
1167 grub_get_device_id ()
1168 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1169-index f839b3b55..d927b60ae 100644
1170+index f839b3b55f..d927b60ae2 100644
1171 --- a/util/grub.d/10_linux.in
1172 +++ b/util/grub.d/10_linux.in
1173 @@ -40,6 +40,11 @@ fi
1174@@ -79,7 +79,7 @@ index f839b3b55..d927b60ae 100644
1175 esac
1176
1177 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
1178-index 96179ea61..9a8d42fb5 100644
1179+index 96179ea613..9a8d42fb57 100644
1180 --- a/util/grub.d/20_linux_xen.in
1181 +++ b/util/grub.d/20_linux_xen.in
1182 @@ -40,6 +40,11 @@ fi
1183diff --git a/debian/patches/mkconfig-mid-upgrade.patch b/debian/patches/mkconfig-mid-upgrade.patch
1184index 248f6c3..74eb2da 100644
1185--- a/debian/patches/mkconfig-mid-upgrade.patch
1186+++ b/debian/patches/mkconfig-mid-upgrade.patch
1187@@ -1,4 +1,4 @@
1188-From 8ce50d6419c04a49070868a4245664419e0901fa Mon Sep 17 00:00:00 2001
1189+From 1033aefcd66f55eb12dedee2311b217beb1d9349 Mon Sep 17 00:00:00 2001
1190 From: Colin Watson <cjwatson@ubuntu.com>
1191 Date: Mon, 13 Jan 2014 12:13:03 +0000
1192 Subject: Bail out if trying to run grub-mkconfig during upgrade to 2.00
1193@@ -20,7 +20,7 @@ Patch-Name: mkconfig-mid-upgrade.patch
1194 1 file changed, 7 insertions(+)
1195
1196 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
1197-index 45cd4cc54..b506d63bf 100644
1198+index 45cd4cc541..b506d63bf9 100644
1199 --- a/util/grub-mkconfig.in
1200 +++ b/util/grub-mkconfig.in
1201 @@ -102,6 +102,13 @@ do
1202diff --git a/debian/patches/mkconfig-nonexistent-loopback.patch b/debian/patches/mkconfig-nonexistent-loopback.patch
1203index 9b8b848..1450a08 100644
1204--- a/debian/patches/mkconfig-nonexistent-loopback.patch
1205+++ b/debian/patches/mkconfig-nonexistent-loopback.patch
1206@@ -1,4 +1,4 @@
1207-From c754f6529f31d14b1110f457e9244f6454a2ed4e Mon Sep 17 00:00:00 2001
1208+From 615a0ad44bd41bf58f71ac391416ce9be1b4b7ae Mon Sep 17 00:00:00 2001
1209 From: Colin Watson <cjwatson@ubuntu.com>
1210 Date: Mon, 13 Jan 2014 12:13:08 +0000
1211 Subject: Avoid getting confused by inaccessible loop device backing paths
1212@@ -14,7 +14,7 @@ Patch-Name: mkconfig-nonexistent-loopback.patch
1213 2 files changed, 6 insertions(+), 5 deletions(-)
1214
1215 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
1216-index b05df554d..fe6319abe 100644
1217+index b05df554da..fe6319abe0 100644
1218 --- a/util/grub-mkconfig_lib.in
1219 +++ b/util/grub-mkconfig_lib.in
1220 @@ -143,7 +143,7 @@ prepare_grub_to_access_device ()
1221@@ -27,7 +27,7 @@ index b05df554d..fe6319abe 100644
1222 esac
1223 ;;
1224 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
1225-index 775ceb2e0..b7e1147c4 100644
1226+index 775ceb2e04..b7e1147c41 100644
1227 --- a/util/grub.d/30_os-prober.in
1228 +++ b/util/grub.d/30_os-prober.in
1229 @@ -219,6 +219,11 @@ EOF
1230diff --git a/debian/patches/mkconfig-other-inits.patch b/debian/patches/mkconfig-other-inits.patch
1231index e7dd0b6..13f8bfd 100644
1232--- a/debian/patches/mkconfig-other-inits.patch
1233+++ b/debian/patches/mkconfig-other-inits.patch
1234@@ -1,4 +1,4 @@
1235-From 0564e92b1f182280d433e829406bdf91dd19a357 Mon Sep 17 00:00:00 2001
1236+From 2015389b99c6a5eda55aa56a14dd4c65cf2a0d59 Mon Sep 17 00:00:00 2001
1237 From: Colin Watson <cjwatson@debian.org>
1238 Date: Sat, 3 Jan 2015 12:04:59 +0000
1239 Subject: Generate alternative init entries in advanced menu
1240@@ -18,7 +18,7 @@ Patch-Name: mkconfig-other-inits.patch
1241 2 files changed, 21 insertions(+)
1242
1243 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1244-index 85b30084a..dff84edea 100644
1245+index 85b30084ad..dff84edea5 100644
1246 --- a/util/grub.d/10_linux.in
1247 +++ b/util/grub.d/10_linux.in
1248 @@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@
1249@@ -53,7 +53,7 @@ index 85b30084a..dff84edea 100644
1250 linux_entry "${OS}" "${version}" recovery \
1251 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
1252 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
1253-index f2ee0532b..81e5f0d7e 100644
1254+index f2ee0532bd..81e5f0d7e4 100644
1255 --- a/util/grub.d/20_linux_xen.in
1256 +++ b/util/grub.d/20_linux_xen.in
1257 @@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@
1258diff --git a/debian/patches/mkconfig-recovery-title.patch b/debian/patches/mkconfig-recovery-title.patch
1259index 869fc30..185d1d2 100644
1260--- a/debian/patches/mkconfig-recovery-title.patch
1261+++ b/debian/patches/mkconfig-recovery-title.patch
1262@@ -1,4 +1,4 @@
1263-From 0636b004bd56946dd24ce0afff820f9ed76da34b Mon Sep 17 00:00:00 2001
1264+From d8fd4cbf012ffc87a49de8cc28ed27c82f2eec1b Mon Sep 17 00:00:00 2001
1265 From: Colin Watson <cjwatson@ubuntu.com>
1266 Date: Mon, 13 Jan 2014 12:13:33 +0000
1267 Subject: Add GRUB_RECOVERY_TITLE option
1268@@ -22,7 +22,7 @@ Patch-Name: mkconfig-recovery-title.patch
1269 8 files changed, 21 insertions(+), 11 deletions(-)
1270
1271 diff --git a/docs/grub.texi b/docs/grub.texi
1272-index a835d0ae4..3ec35d315 100644
1273+index a835d0ae42..3ec35d315a 100644
1274 --- a/docs/grub.texi
1275 +++ b/docs/grub.texi
1276 @@ -1536,6 +1536,11 @@ a console is restricted or limited.
1277@@ -38,7 +38,7 @@ index a835d0ae4..3ec35d315 100644
1278
1279 The following options are still accepted for compatibility with existing
1280 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
1281-index 307214310..9c1da6477 100644
1282+index 3072143105..9c1da64771 100644
1283 --- a/util/grub-mkconfig.in
1284 +++ b/util/grub-mkconfig.in
1285 @@ -196,6 +196,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
1286@@ -63,7 +63,7 @@ index 307214310..9c1da6477 100644
1287 if test "x${grub_cfg}" != "x"; then
1288 rm -f "${grub_cfg}.new"
1289 diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
1290-index 59a9a48a2..7fa3a3fbd 100644
1291+index 59a9a48a2f..7fa3a3fbd8 100644
1292 --- a/util/grub.d/10_hurd.in
1293 +++ b/util/grub.d/10_hurd.in
1294 @@ -88,8 +88,8 @@ hurd_entry () {
1295@@ -78,7 +78,7 @@ index 59a9a48a2..7fa3a3fbd 100644
1296 title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")"
1297 oldtitle="$OS using $kernel_base"
1298 diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
1299-index 9d8e8fd85..8301d361a 100644
1300+index 9d8e8fd852..8301d361a1 100644
1301 --- a/util/grub.d/10_kfreebsd.in
1302 +++ b/util/grub.d/10_kfreebsd.in
1303 @@ -76,7 +76,7 @@ kfreebsd_entry ()
1304@@ -91,7 +91,7 @@ index 9d8e8fd85..8301d361a 100644
1305 title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")"
1306 fi
1307 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1308-index cc2dd855a..2c418c5ec 100644
1309+index cc2dd855ab..2c418c5ec8 100644
1310 --- a/util/grub.d/10_linux.in
1311 +++ b/util/grub.d/10_linux.in
1312 @@ -130,7 +130,7 @@ linux_entry ()
1313@@ -104,10 +104,10 @@ index cc2dd855a..2c418c5ec 100644
1314 title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
1315 esac
1316 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1317-index b636dc7bb..b068f0e96 100755
1318+index 48a4e68976..4477fa6061 100755
1319 --- a/util/grub.d/10_linux_zfs.in
1320 +++ b/util/grub.d/10_linux_zfs.in
1321-@@ -954,7 +954,7 @@ generate_grub_menu() {
1322+@@ -957,7 +957,7 @@ generate_grub_menu() {
1323
1324 GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}
1325 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
1326@@ -116,7 +116,7 @@ index b636dc7bb..b068f0e96 100755
1327 zfs_linux_entry 1 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}"
1328 fi
1329 at_least_one_entry=1
1330-@@ -982,9 +982,9 @@ generate_grub_menu() {
1331+@@ -985,9 +985,9 @@ generate_grub_menu() {
1332
1333 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
1334 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
1335@@ -128,7 +128,7 @@ index b636dc7bb..b068f0e96 100755
1336 zfs_linux_entry 2 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "zsys-revert=userdata"
1337 fi
1338 # Non-zsys: boot temporarly on snapshots or rollback (destroying intermediate snapshots)
1339-@@ -994,7 +994,7 @@ generate_grub_menu() {
1340+@@ -997,7 +997,7 @@ generate_grub_menu() {
1341
1342 GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
1343 if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
1344@@ -138,7 +138,7 @@ index b636dc7bb..b068f0e96 100755
1345 fi
1346
1347 diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
1348-index 874f59969..bb29cc046 100644
1349+index 874f59969e..bb29cc0468 100644
1350 --- a/util/grub.d/10_netbsd.in
1351 +++ b/util/grub.d/10_netbsd.in
1352 @@ -102,7 +102,7 @@ netbsd_entry ()
1353@@ -151,7 +151,7 @@ index 874f59969..bb29cc046 100644
1354 title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"
1355 fi
1356 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
1357-index 9a8d42fb5..f2ee0532b 100644
1358+index 9a8d42fb57..f2ee0532bd 100644
1359 --- a/util/grub.d/20_linux_xen.in
1360 +++ b/util/grub.d/20_linux_xen.in
1361 @@ -105,7 +105,7 @@ linux_entry ()
1362diff --git a/debian/patches/mkconfig-signed-kernel.patch b/debian/patches/mkconfig-signed-kernel.patch
1363index ea7cdb0..625cc4d 100644
1364--- a/debian/patches/mkconfig-signed-kernel.patch
1365+++ b/debian/patches/mkconfig-signed-kernel.patch
1366@@ -1,4 +1,4 @@
1367-From 956c3d193e7c756f52fc0cfda463eb17ed58b4ce Mon Sep 17 00:00:00 2001
1368+From 72835133813a3e59c58d6908a82cbc3f36adf34a Mon Sep 17 00:00:00 2001
1369 From: Didier Roche <didrocks@ubuntu.com>
1370 Date: Tue, 31 Mar 2020 15:17:45 +0200
1371 Subject: Generate configuration for signed UEFI kernels if available
1372@@ -13,7 +13,7 @@ Patch-Name: mkconfig-signed-kernel.patch
1373 2 files changed, 36 insertions(+)
1374
1375 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1376-index 19e4df4ad..cb1cc200e 100644
1377+index 19e4df4ad8..cb1cc200e4 100644
1378 --- a/util/grub.d/10_linux.in
1379 +++ b/util/grub.d/10_linux.in
1380 @@ -165,8 +165,16 @@ linux_entry ()
1381@@ -48,7 +48,7 @@ index 19e4df4ad..cb1cc200e 100644
1382 basename=`basename $linux`
1383 dirname=`dirname $linux`
1384 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1385-index bd5b963b6..c1dfe8ae8 100755
1386+index 7f88e771e0..bd4f1a2123 100755
1387 --- a/util/grub.d/10_linux_zfs.in
1388 +++ b/util/grub.d/10_linux_zfs.in
1389 @@ -339,6 +339,16 @@ try_default_layout_bpool() {
1390@@ -68,7 +68,7 @@ index bd5b963b6..c1dfe8ae8 100755
1391 # Given a filesystem or snapshot dataset, returns dataset|machine id|pretty name|last used
1392 # $1 is dataset we want information from
1393 # $2 is the temporary mount directory to use
1394-@@ -409,6 +419,17 @@ get_dataset_info() {
1395+@@ -412,6 +422,17 @@ get_dataset_info() {
1396 continue
1397 fi
1398
1399diff --git a/debian/patches/mkconfig-ubuntu-distributor.patch b/debian/patches/mkconfig-ubuntu-distributor.patch
1400index 6ae0bef..679db1f 100644
1401--- a/debian/patches/mkconfig-ubuntu-distributor.patch
1402+++ b/debian/patches/mkconfig-ubuntu-distributor.patch
1403@@ -1,4 +1,4 @@
1404-From 5cddc9390afad242b31604806e8fb46ca92bf891 Mon Sep 17 00:00:00 2001
1405+From 01c7c86b01698ebf65fe99c34d2d79a39b76b4c1 Mon Sep 17 00:00:00 2001
1406 From: Mario Limonciello <Mario_Limonciello@dell.com>
1407 Date: Mon, 13 Jan 2014 12:13:14 +0000
1408 Subject: Remove GNU/Linux from default distributor string for Ubuntu
1409@@ -17,7 +17,7 @@ Patch-Name: mkconfig-ubuntu-distributor.patch
1410 2 files changed, 16 insertions(+), 2 deletions(-)
1411
1412 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1413-index fcd303387..19e4df4ad 100644
1414+index fcd3033872..19e4df4ad8 100644
1415 --- a/util/grub.d/10_linux.in
1416 +++ b/util/grub.d/10_linux.in
1417 @@ -32,7 +32,14 @@ CLASS="--class gnu-linux --class gnu --class os"
1418@@ -37,10 +37,10 @@ index fcd303387..19e4df4ad 100644
1419 fi
1420
1421 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1422-index 5db1f6682..bd5b963b6 100755
1423+index de4d215900..7f88e771e0 100755
1424 --- a/util/grub.d/10_linux_zfs.in
1425 +++ b/util/grub.d/10_linux_zfs.in
1426-@@ -787,7 +787,14 @@ generate_grub_menu() {
1427+@@ -790,7 +790,14 @@ generate_grub_menu() {
1428 if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then
1429 OS=GNU/Linux
1430 else
1431diff --git a/debian/patches/mkconfig-ubuntu-recovery.patch b/debian/patches/mkconfig-ubuntu-recovery.patch
1432index f81ab40..3f64f55 100644
1433--- a/debian/patches/mkconfig-ubuntu-recovery.patch
1434+++ b/debian/patches/mkconfig-ubuntu-recovery.patch
1435@@ -1,4 +1,4 @@
1436-From fb4d204572ca4dec63b3d3f25a3b69da97815726 Mon Sep 17 00:00:00 2001
1437+From 3699711858d0aead05bc9a8e057022a90644cda6 Mon Sep 17 00:00:00 2001
1438 From: Didier Roche <didrocks@ubuntu.com>
1439 Date: Tue, 31 Mar 2020 15:16:36 +0200
1440 Subject: "single" -> "recovery" when friendly-recovery is installed
1441@@ -24,7 +24,7 @@ Patch-Name: mkconfig-ubuntu-recovery.patch
1442 4 files changed, 39 insertions(+), 5 deletions(-)
1443
1444 diff --git a/configure.ac b/configure.ac
1445-index 7656f2434..1e5abc67d 100644
1446+index 7656f2434e..1e5abc67d9 100644
1447 --- a/configure.ac
1448 +++ b/configure.ac
1449 @@ -1846,6 +1846,17 @@ fi
1450@@ -46,7 +46,7 @@ index 7656f2434..1e5abc67d 100644
1451
1452 AC_SUBST([FONT_SOURCE])
1453 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1454-index d927b60ae..fcd303387 100644
1455+index d927b60ae2..fcd3033872 100644
1456 --- a/util/grub.d/10_linux.in
1457 +++ b/util/grub.d/10_linux.in
1458 @@ -20,6 +20,7 @@ set -e
1459@@ -94,7 +94,7 @@ index d927b60ae..fcd303387 100644
1460
1461 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
1462 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1463-index d27634738..5db1f6682 100755
1464+index b24587f0a5..de4d215900 100755
1465 --- a/util/grub.d/10_linux_zfs.in
1466 +++ b/util/grub.d/10_linux_zfs.in
1467 @@ -19,6 +19,7 @@ set -e
1468@@ -105,7 +105,7 @@ index d27634738..5db1f6682 100755
1469
1470 . "${pkgdatadir}/grub-mkconfig_lib"
1471
1472-@@ -745,7 +746,9 @@ zfs_linux_entry () {
1473+@@ -748,7 +749,9 @@ zfs_linux_entry () {
1474 if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
1475 echo "${submenu_indentation} load_video"
1476 fi
1477@@ -116,7 +116,7 @@ index d27634738..5db1f6682 100755
1478 fi
1479
1480 echo "${submenu_indentation} insmod gzio"
1481-@@ -756,7 +759,7 @@ zfs_linux_entry () {
1482+@@ -759,7 +762,7 @@ zfs_linux_entry () {
1483
1484 linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
1485 if [ ${type} = "recovery" ]; then
1486@@ -125,7 +125,7 @@ index d27634738..5db1f6682 100755
1487 fi
1488
1489 echo "${submenu_indentation} linux ${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"
1490-@@ -788,6 +791,14 @@ generate_grub_menu() {
1491+@@ -791,6 +794,14 @@ generate_grub_menu() {
1492 CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1 | LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
1493 fi
1494
1495@@ -141,7 +141,7 @@ index d27634738..5db1f6682 100755
1496 # IFS is set to TAB (ASCII 0x09)
1497 echo "${menu_metadata}" |
1498 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
1499-index 515a68c7a..775ceb2e0 100644
1500+index 515a68c7aa..775ceb2e04 100644
1501 --- a/util/grub.d/30_os-prober.in
1502 +++ b/util/grub.d/30_os-prober.in
1503 @@ -220,7 +220,7 @@ EOF
1504diff --git a/debian/patches/mkrescue-efi-modules.patch b/debian/patches/mkrescue-efi-modules.patch
1505index d0e0688..6221e79 100644
1506--- a/debian/patches/mkrescue-efi-modules.patch
1507+++ b/debian/patches/mkrescue-efi-modules.patch
1508@@ -1,4 +1,4 @@
1509-From 40df0707380bf528d9f849b065c3a5e4e96113ac Mon Sep 17 00:00:00 2001
1510+From 73f95865a1ffacb1e10e431e114baa67d36a27e1 Mon Sep 17 00:00:00 2001
1511 From: Mario Limonciello <Mario_Limonciello@dell.com>
1512 Date: Mon, 13 Jan 2014 12:12:59 +0000
1513 Subject: Build vfat into EFI boot images
1514@@ -14,7 +14,7 @@ Patch-Name: mkrescue-efi-modules.patch
1515 1 file changed, 2 insertions(+)
1516
1517 diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
1518-index ce2cbc4f1..45d6140d3 100644
1519+index ce2cbc4f10..45d6140d3e 100644
1520 --- a/util/grub-mkrescue.c
1521 +++ b/util/grub-mkrescue.c
1522 @@ -750,6 +750,7 @@ main (int argc, char *argv[])
1523diff --git a/debian/patches/net-read-bracketed-ipv6-addr.patch b/debian/patches/net-read-bracketed-ipv6-addr.patch
1524index 9afab37..bf711fc 100644
1525--- a/debian/patches/net-read-bracketed-ipv6-addr.patch
1526+++ b/debian/patches/net-read-bracketed-ipv6-addr.patch
1527@@ -1,4 +1,4 @@
1528-From 5b535ee06d2b6e98a6b9c7d1a79ff611e10e1b0a Mon Sep 17 00:00:00 2001
1529+From b16ad7afe148eb58e1443bc6c20cd017cee3d7aa Mon Sep 17 00:00:00 2001
1530 From: Aaron Miller <aaronmiller@fb.com>
1531 Date: Thu, 27 Oct 2016 17:39:49 -0400
1532 Subject: net: read bracketed ipv6 addrs and port numbers
1533@@ -16,7 +16,7 @@ Patch-Name: net-read-bracketed-ipv6-addr.patch
1534 4 files changed, 110 insertions(+), 11 deletions(-)
1535
1536 diff --git a/grub-core/net/http.c b/grub-core/net/http.c
1537-index 5aa4ad3be..f182d7b87 100644
1538+index 5aa4ad3bef..f182d7b871 100644
1539 --- a/grub-core/net/http.c
1540 +++ b/grub-core/net/http.c
1541 @@ -312,12 +312,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
1542@@ -74,7 +74,7 @@ index 5aa4ad3be..f182d7b87 100644
1543 file);
1544 if (!data->sock)
1545 diff --git a/grub-core/net/net.c b/grub-core/net/net.c
1546-index d5d726a31..b917a75d5 100644
1547+index d5d726a315..b917a75d54 100644
1548 --- a/grub-core/net/net.c
1549 +++ b/grub-core/net/net.c
1550 @@ -437,6 +437,12 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)
1551@@ -211,7 +211,7 @@ index d5d726a31..b917a75d5 100644
1552 }
1553 }
1554 diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
1555-index 7d90bf66e..a0817a075 100644
1556+index 7d90bf66e7..a0817a075d 100644
1557 --- a/grub-core/net/tftp.c
1558 +++ b/grub-core/net/tftp.c
1559 @@ -314,6 +314,7 @@ tftp_open (struct grub_file *file, const char *filename)
1560@@ -241,7 +241,7 @@ index 7d90bf66e..a0817a075 100644
1561 if (!data->sock)
1562 {
1563 diff --git a/include/grub/net.h b/include/grub/net.h
1564-index 4a9069a14..cc114286e 100644
1565+index 4a9069a147..cc114286ea 100644
1566 --- a/include/grub/net.h
1567 +++ b/include/grub/net.h
1568 @@ -270,6 +270,7 @@ typedef struct grub_net
1569diff --git a/debian/patches/no-devicetree-if-secure-boot.patch b/debian/patches/no-devicetree-if-secure-boot.patch
1570index 2c20d15..c6b9a75 100644
1571--- a/debian/patches/no-devicetree-if-secure-boot.patch
1572+++ b/debian/patches/no-devicetree-if-secure-boot.patch
1573@@ -1,4 +1,4 @@
1574-From e7c4e6c655bc9eebdd22fb6f3d9b2aafabffa1b4 Mon Sep 17 00:00:00 2001
1575+From 107663390a84f31f304094df29dd31a5584fa0b9 Mon Sep 17 00:00:00 2001
1576 From: Peter Jones <pjones@redhat.com>
1577 Date: Wed, 24 Apr 2019 10:03:04 -0400
1578 Subject: Forbid the "devicetree" command when Secure Boot is enabled.
1579@@ -17,7 +17,7 @@ Patch-Name: no-devicetree-if-secure-boot.patch
1580 2 files changed, 20 insertions(+)
1581
1582 diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
1583-index 51684914c..092e8e307 100644
1584+index 51684914cf..092e8e3077 100644
1585 --- a/grub-core/loader/arm/linux.c
1586 +++ b/grub-core/loader/arm/linux.c
1587 @@ -30,6 +30,10 @@
1588@@ -47,7 +47,7 @@ index 51684914c..092e8e307 100644
1589 if (!dtb)
1590 return grub_errno;
1591 diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
1592-index ee9c5592c..f0c2d91be 100644
1593+index ee9c5592c7..f0c2d91be2 100644
1594 --- a/grub-core/loader/efi/fdt.c
1595 +++ b/grub-core/loader/efi/fdt.c
1596 @@ -123,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
1597diff --git a/debian/patches/no-insmod-on-sb.patch b/debian/patches/no-insmod-on-sb.patch
1598index 95a34cd..475d5b6 100644
1599--- a/debian/patches/no-insmod-on-sb.patch
1600+++ b/debian/patches/no-insmod-on-sb.patch
1601@@ -1,4 +1,4 @@
1602-From 98ac694bdd7938cdfcd5615cc78e3211a0bcba93 Mon Sep 17 00:00:00 2001
1603+From f80581266f3dc0cfa3be1e8cf2097f6cb880cfa4 Mon Sep 17 00:00:00 2001
1604 From: Matthew Garrett <mjg@redhat.com>
1605 Date: Mon, 13 Jan 2014 12:13:09 +0000
1606 Subject: Don't permit loading modules on UEFI secure boot
1607@@ -16,7 +16,7 @@ Patch-Name: no-insmod-on-sb.patch
1608 3 files changed, 42 insertions(+)
1609
1610 diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
1611-index 48eb5e7b6..074dfc3c6 100644
1612+index 48eb5e7b62..074dfc3c6f 100644
1613 --- a/grub-core/kern/dl.c
1614 +++ b/grub-core/kern/dl.c
1615 @@ -38,6 +38,10 @@
1616@@ -47,7 +47,7 @@ index 48eb5e7b6..074dfc3c6 100644
1617
1618 file = grub_file_open (filename, GRUB_FILE_TYPE_GRUB_MODULE);
1619 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
1620-index 6e1ceb905..96204e39b 100644
1621+index 6e1ceb9051..96204e39b9 100644
1622 --- a/grub-core/kern/efi/efi.c
1623 +++ b/grub-core/kern/efi/efi.c
1624 @@ -273,6 +273,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
1625@@ -86,7 +86,7 @@ index 6e1ceb905..96204e39b 100644
1626
1627 /* Search the mods section from the PE32/PE32+ image. This code uses
1628 diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
1629-index e90e00dc4..a237952b3 100644
1630+index e90e00dc43..a237952b37 100644
1631 --- a/include/grub/efi/efi.h
1632 +++ b/include/grub/efi/efi.h
1633 @@ -82,6 +82,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
1634diff --git a/debian/patches/olpc-prefix-hack.patch b/debian/patches/olpc-prefix-hack.patch
1635index b14c333..d40729f 100644
1636--- a/debian/patches/olpc-prefix-hack.patch
1637+++ b/debian/patches/olpc-prefix-hack.patch
1638@@ -11,7 +11,7 @@ Patch-Name: olpc-prefix-hack.patch
1639 1 file changed, 11 insertions(+)
1640
1641 diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
1642-index d483e35ee..8b089b48d 100644
1643+index d483e35eed..8b089b48d0 100644
1644 --- a/grub-core/kern/ieee1275/init.c
1645 +++ b/grub-core/kern/ieee1275/init.c
1646 @@ -76,6 +76,7 @@ grub_exit (void)
1647diff --git a/debian/patches/ppc64el-disable-vsx.patch b/debian/patches/ppc64el-disable-vsx.patch
1648index ab96b1d..69e2aa0 100644
1649--- a/debian/patches/ppc64el-disable-vsx.patch
1650+++ b/debian/patches/ppc64el-disable-vsx.patch
1651@@ -1,4 +1,4 @@
1652-From 0bdaf481feca277ee87f42052fad4a59ede0c8e4 Mon Sep 17 00:00:00 2001
1653+From 156930a8fe9525c51ec9608b8aff8c561dd6cc40 Mon Sep 17 00:00:00 2001
1654 From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
1655 Date: Thu, 25 Sep 2014 19:33:39 -0300
1656 Subject: Disable VSX instruction
1657@@ -21,7 +21,7 @@ Patch-Name: ppc64el-disable-vsx.patch
1658 1 file changed, 12 insertions(+)
1659
1660 diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
1661-index 21c884b43..de9a9601a 100644
1662+index 21c884b433..de9a9601a9 100644
1663 --- a/grub-core/kern/powerpc/ieee1275/startup.S
1664 +++ b/grub-core/kern/powerpc/ieee1275/startup.S
1665 @@ -20,6 +20,8 @@
1666diff --git a/debian/patches/probe-fusionio.patch b/debian/patches/probe-fusionio.patch
1667index 7756341..1610f03 100644
1668--- a/debian/patches/probe-fusionio.patch
1669+++ b/debian/patches/probe-fusionio.patch
1670@@ -1,4 +1,4 @@
1671-From 738369f06f930cedd51f22f9d519a09aa7e73176 Mon Sep 17 00:00:00 2001
1672+From 81099f3b80801da7d591ab4ae14a568345c79119 Mon Sep 17 00:00:00 2001
1673 From: Colin Watson <cjwatson@ubuntu.com>
1674 Date: Mon, 13 Jan 2014 12:13:31 +0000
1675 Subject: Probe FusionIO devices
1676@@ -14,7 +14,7 @@ Patch-Name: probe-fusionio.patch
1677 2 files changed, 32 insertions(+)
1678
1679 diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
1680-index 90d92d3ad..7adc0f30e 100644
1681+index 90d92d3ad5..7adc0f30ee 100644
1682 --- a/grub-core/osdep/linux/getroot.c
1683 +++ b/grub-core/osdep/linux/getroot.c
1684 @@ -950,6 +950,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
1685@@ -38,7 +38,7 @@ index 90d92d3ad..7adc0f30e 100644
1686
1687 return path;
1688 diff --git a/util/deviceiter.c b/util/deviceiter.c
1689-index a4971ef42..dddc50da7 100644
1690+index a4971ef429..dddc50da7a 100644
1691 --- a/util/deviceiter.c
1692 +++ b/util/deviceiter.c
1693 @@ -383,6 +383,12 @@ get_nvme_disk_name (char *name, int controller, int namespace)
1694diff --git a/debian/patches/quick-boot-lvm.patch b/debian/patches/quick-boot-lvm.patch
1695index 23a9989..e5dd415 100644
1696--- a/debian/patches/quick-boot-lvm.patch
1697+++ b/debian/patches/quick-boot-lvm.patch
1698@@ -1,4 +1,4 @@
1699-From ff47caaf5a89c61bb85e7ed22570b24481b9ff15 Mon Sep 17 00:00:00 2001
1700+From ac0a158a4841bbc10112fa398d8ad65221792107 Mon Sep 17 00:00:00 2001
1701 From: Steve Langasek <steve.langasek@ubuntu.com>
1702 Date: Tue, 30 Oct 2018 15:04:16 -0700
1703 Subject: If we don't have writable grubenv and we're on EFI, always show the
1704@@ -26,7 +26,7 @@ Patch-Name: quick-boot-lvm.patch
1705 1 file changed, 15 insertions(+), 3 deletions(-)
1706
1707 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
1708-index 674a76140..b7135b655 100644
1709+index 674a761402..b7135b655f 100644
1710 --- a/util/grub.d/00_header.in
1711 +++ b/util/grub.d/00_header.in
1712 @@ -115,7 +115,7 @@ EOF
1713diff --git a/debian/patches/quick-boot.patch b/debian/patches/quick-boot.patch
1714index 01fc3c9..b5ddaff 100644
1715--- a/debian/patches/quick-boot.patch
1716+++ b/debian/patches/quick-boot.patch
1717@@ -1,4 +1,4 @@
1718-From a62555d9b0bc27ecf2c018018d61589ebdf15321 Mon Sep 17 00:00:00 2001
1719+From f8150f56df7110d17b71cdacc79b451593f17feb Mon Sep 17 00:00:00 2001
1720 From: Colin Watson <cjwatson@ubuntu.com>
1721 Date: Mon, 13 Jan 2014 12:13:28 +0000
1722 Subject: Add configure option to bypass boot menu if possible
1723@@ -34,7 +34,7 @@ Patch-Name: quick-boot.patch
1724 8 files changed, 146 insertions(+), 13 deletions(-)
1725
1726 diff --git a/configure.ac b/configure.ac
1727-index ea00ccd69..7dda5bb32 100644
1728+index ea00ccd691..7dda5bb32b 100644
1729 --- a/configure.ac
1730 +++ b/configure.ac
1731 @@ -1868,6 +1868,17 @@ else
1732@@ -56,7 +56,7 @@ index ea00ccd69..7dda5bb32 100644
1733
1734 AC_SUBST([FONT_SOURCE])
1735 diff --git a/docs/grub.texi b/docs/grub.texi
1736-index 87795075a..a835d0ae4 100644
1737+index 87795075a8..a835d0ae42 100644
1738 --- a/docs/grub.texi
1739 +++ b/docs/grub.texi
1740 @@ -1522,6 +1522,20 @@ This option may be set to a list of GRUB module names separated by spaces.
1741@@ -81,7 +81,7 @@ index 87795075a..a835d0ae4 100644
1742
1743 The following options are still accepted for compatibility with existing
1744 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
1745-index ebf5a0f10..42c82290d 100644
1746+index ebf5a0f109..42c82290de 100644
1747 --- a/grub-core/normal/menu.c
1748 +++ b/grub-core/normal/menu.c
1749 @@ -604,6 +604,30 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
1750@@ -116,7 +116,7 @@ index ebf5a0f10..42c82290d 100644
1751 {
1752 pos = grub_term_save_pos ();
1753 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
1754-index d18bf972f..307214310 100644
1755+index d18bf972f7..3072143105 100644
1756 --- a/util/grub-mkconfig.in
1757 +++ b/util/grub-mkconfig.in
1758 @@ -250,7 +250,8 @@ export GRUB_DEFAULT \
1759@@ -130,7 +130,7 @@ index d18bf972f..307214310 100644
1760 if test "x${grub_cfg}" != "x"; then
1761 rm -f "${grub_cfg}.new"
1762 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
1763-index 93a90233e..674a76140 100644
1764+index 93a90233ea..674a761402 100644
1765 --- a/util/grub.d/00_header.in
1766 +++ b/util/grub.d/00_header.in
1767 @@ -21,6 +21,8 @@ prefix="@prefix@"
1768@@ -259,7 +259,7 @@ index 93a90233e..674a76140 100644
1769 EOF
1770 }
1771 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1772-index 479a8bf4e..2be66c702 100644
1773+index 479a8bf4e5..2be66c7028 100644
1774 --- a/util/grub.d/10_linux.in
1775 +++ b/util/grub.d/10_linux.in
1776 @@ -22,6 +22,7 @@ exec_prefix="@exec_prefix@"
1777@@ -281,7 +281,7 @@ index 479a8bf4e..2be66c702 100644
1778 save_default_entry | grub_add_tab
1779 fi
1780 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
1781-index 1a656b2dd..548e14856 100755
1782+index 3a0e6d1035..ec4b49d9d7 100755
1783 --- a/util/grub.d/10_linux_zfs.in
1784 +++ b/util/grub.d/10_linux_zfs.in
1785 @@ -21,6 +21,7 @@ prefix="@prefix@"
1786@@ -292,7 +292,7 @@ index 1a656b2dd..548e14856 100755
1787
1788 . "${pkgdatadir}/grub-mkconfig_lib"
1789
1790-@@ -752,6 +753,10 @@ zfs_linux_entry () {
1791+@@ -755,6 +756,10 @@ zfs_linux_entry () {
1792
1793 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
1794
1795@@ -304,7 +304,7 @@ index 1a656b2dd..548e14856 100755
1796 GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}
1797 default_entry="$(save_default_entry)"
1798 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
1799-index 271044f59..da5f28876 100644
1800+index 271044f592..da5f28876d 100644
1801 --- a/util/grub.d/30_os-prober.in
1802 +++ b/util/grub.d/30_os-prober.in
1803 @@ -20,12 +20,26 @@ set -e
1804diff --git a/debian/patches/restore-mkdevicemap.patch b/debian/patches/restore-mkdevicemap.patch
1805index 267b972..8ffbfa4 100644
1806--- a/debian/patches/restore-mkdevicemap.patch
1807+++ b/debian/patches/restore-mkdevicemap.patch
1808@@ -1,4 +1,4 @@
1809-From 6db8234a46f194578fb414730dd3ea80a60b13d4 Mon Sep 17 00:00:00 2001
1810+From 660f98d4548f4327954fba9410041a75893ad338 Mon Sep 17 00:00:00 2001
1811 From: Colin Watson <cjwatson@debian.org>
1812 Date: Mon, 13 Jan 2014 12:13:01 +0000
1813 Subject: Restore grub-mkdevicemap
1814@@ -28,7 +28,7 @@ Patch-Name: restore-mkdevicemap.patch
1815 create mode 100644 util/grub-mkdevicemap.c
1816
1817 diff --git a/Makefile.util.def b/Makefile.util.def
1818-index bac85e284..eec1924b0 100644
1819+index bac85e2840..eec1924b0e 100644
1820 --- a/Makefile.util.def
1821 +++ b/Makefile.util.def
1822 @@ -324,6 +324,23 @@ program = {
1823@@ -57,7 +57,7 @@ index bac85e284..eec1924b0 100644
1824 installdir = sbin;
1825 diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m
1826 new file mode 100644
1827-index 000000000..96cd6ee72
1828+index 0000000000..96cd6ee723
1829 --- /dev/null
1830 +++ b/docs/man/grub-mkdevicemap.h2m
1831 @@ -0,0 +1,4 @@
1832@@ -67,7 +67,7 @@ index 000000000..96cd6ee72
1833 +.BR grub-probe (8)
1834 diff --git a/include/grub/util/deviceiter.h b/include/grub/util/deviceiter.h
1835 new file mode 100644
1836-index 000000000..85374978c
1837+index 0000000000..85374978c5
1838 --- /dev/null
1839 +++ b/include/grub/util/deviceiter.h
1840 @@ -0,0 +1,14 @@
1841@@ -87,7 +87,7 @@ index 000000000..85374978c
1842 +#endif /* ! GRUB_DEVICEITER_MACHINE_UTIL_HEADER */
1843 diff --git a/util/deviceiter.c b/util/deviceiter.c
1844 new file mode 100644
1845-index 000000000..a4971ef42
1846+index 0000000000..a4971ef429
1847 --- /dev/null
1848 +++ b/util/deviceiter.c
1849 @@ -0,0 +1,1021 @@
1850@@ -1114,7 +1114,7 @@ index 000000000..a4971ef42
1851 +}
1852 diff --git a/util/devicemap.c b/util/devicemap.c
1853 new file mode 100644
1854-index 000000000..c61864420
1855+index 0000000000..c61864420a
1856 --- /dev/null
1857 +++ b/util/devicemap.c
1858 @@ -0,0 +1,13 @@
1859@@ -1133,7 +1133,7 @@ index 000000000..c61864420
1860 +}
1861 diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c
1862 new file mode 100644
1863-index 000000000..c4bbdbf69
1864+index 0000000000..c4bbdbf69c
1865 --- /dev/null
1866 +++ b/util/grub-mkdevicemap.c
1867 @@ -0,0 +1,181 @@
1868diff --git a/debian/patches/series b/debian/patches/series
1869index 74189fd..3f64825 100644
1870--- a/debian/patches/series
1871+++ b/debian/patches/series
1872@@ -62,7 +62,6 @@ ubuntu-shorter-version-info.patch
1873 ubuntu-add-initrd-less-boot-fallback.patch
1874 ubuntu-mkconfig-leave-breadcrumbs.patch
1875 ubuntu-fix-lzma-decompressor-objcopy.patch
1876-ubuntu-clear-invalid-initrd-spacing.patch
1877 ubuntu-temp-keep-auto-nvram.patch
1878 ubuntu-add-devicetree-command-support.patch
1879 ubuntu-boot-from-multipath-dependent-symlink.patch
1880@@ -72,13 +71,14 @@ ubuntu-efi-allow-loopmount-chainload.patch
1881 cherrypick-lsefisystab-define-smbios3.patch
1882 cherrypick-smbios-module.patch
1883 cherrypick-lsefisystab-show-dtb.patch
1884-0075-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
1885-0076-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
1886-0077-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
1887-0078-ubuntu-Update-the-linux-boot-protocol-version-check.patch
1888+0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
1889+0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
1890+0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
1891+0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
1892 ubuntu-resilient-boot-ignore-alternative-esps.patch
1893 ubuntu-resilient-boot-boot-order.patch
1894 ubuntu-speed-zsys-history.patch
1895+<<<<<<< debian/patches/series
1896 0082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
1897 0083-safemath-Add-some-arithmetic-primitives-that-check-f.patch
1898 0084-calloc-Make-sure-we-always-have-an-overflow-checking.patch
1899@@ -104,3 +104,8 @@ ubuntu-speed-zsys-history.patch
1900 0104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch
1901 0105-linux-Fix-integer-overflows-in-initrd-size-handling.patch
1902 0106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
1903+=======
1904+ubuntu-flavour-order.patch
1905+ubuntu-dont-verify-loopback-images.patch
1906+ubuntu-recovery-dis_ucode_ldr.patch
1907+>>>>>>> debian/patches/series
1908diff --git a/debian/patches/skip-grub_cmd_set_date.patch b/debian/patches/skip-grub_cmd_set_date.patch
1909index 08e663b..31cae36 100644
1910--- a/debian/patches/skip-grub_cmd_set_date.patch
1911+++ b/debian/patches/skip-grub_cmd_set_date.patch
1912@@ -1,4 +1,4 @@
1913-From e37f5abdb9057be5d79ec34bab535ff059fa6b7f Mon Sep 17 00:00:00 2001
1914+From 7dfe0ce472f7f0bdbe07cbe67958f06951c88f59 Mon Sep 17 00:00:00 2001
1915 From: Colin Watson <cjwatson@debian.org>
1916 Date: Sun, 28 Oct 2018 19:45:56 +0000
1917 Subject: Skip flaky grub_cmd_set_date test
1918@@ -12,7 +12,7 @@ Patch-Name: skip-grub_cmd_set_date.patch
1919 1 file changed, 3 insertions(+)
1920
1921 diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
1922-index aac120a6c..1bb5be4ca 100644
1923+index aac120a6c5..1bb5be4ca7 100644
1924 --- a/tests/grub_cmd_set_date.in
1925 +++ b/tests/grub_cmd_set_date.in
1926 @@ -1,6 +1,9 @@
1927diff --git a/debian/patches/sleep-shift.patch b/debian/patches/sleep-shift.patch
1928index b739b45..957f36b 100644
1929--- a/debian/patches/sleep-shift.patch
1930+++ b/debian/patches/sleep-shift.patch
1931@@ -1,4 +1,4 @@
1932-From 8ff02f24d30da862a7ffe530aa2ff692ad8f1b06 Mon Sep 17 00:00:00 2001
1933+From dd350028f89cd033b832511d1888b49538ad2fd4 Mon Sep 17 00:00:00 2001
1934 From: Colin Watson <cjwatson@ubuntu.com>
1935 Date: Mon, 13 Jan 2014 12:13:23 +0000
1936 Subject: Allow Shift to interrupt 'sleep --interruptible'
1937@@ -17,7 +17,7 @@ Patch-Name: sleep-shift.patch
1938 2 files changed, 45 insertions(+), 1 deletion(-)
1939
1940 diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c
1941-index e77e7900f..3906b1410 100644
1942+index e77e7900fa..3906b14103 100644
1943 --- a/grub-core/commands/sleep.c
1944 +++ b/grub-core/commands/sleep.c
1945 @@ -46,6 +46,31 @@ do_print (int n)
1946@@ -62,7 +62,7 @@ index e77e7900f..3906b1410 100644
1947
1948 return 0;
1949 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
1950-index d5e0c79a7..3611ee9ea 100644
1951+index d5e0c79a70..3611ee9ea7 100644
1952 --- a/grub-core/normal/menu.c
1953 +++ b/grub-core/normal/menu.c
1954 @@ -615,8 +615,27 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
1955diff --git a/debian/patches/ubuntu-add-devicetree-command-support.patch b/debian/patches/ubuntu-add-devicetree-command-support.patch
1956index 316ed31..23b1a52 100644
1957--- a/debian/patches/ubuntu-add-devicetree-command-support.patch
1958+++ b/debian/patches/ubuntu-add-devicetree-command-support.patch
1959@@ -1,4 +1,4 @@
1960-From a30c330fb776934ef1dbaa9784960172650ecdfa Mon Sep 17 00:00:00 2001
1961+From fa7f363abb70ecb9b6368221b9a3c408aa82e605 Mon Sep 17 00:00:00 2001
1962 From: Dimitri John Ledkov <xnox@ubuntu.com>
1963 Date: Wed, 22 May 2019 19:57:29 +0100
1964 Subject: Add devicetree command, if a dtb is present.
1965@@ -14,10 +14,10 @@ Patch-Name: ubuntu-add-devicetree-command-support.patch
1966 1 file changed, 19 insertions(+)
1967
1968 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
1969-index a95992a77..d6937cfef 100644
1970+index af1e096bd6..bbf5d73e39 100644
1971 --- a/util/grub.d/10_linux.in
1972 +++ b/util/grub.d/10_linux.in
1973-@@ -240,6 +240,17 @@ EOF
1974+@@ -254,6 +254,17 @@ EOF
1975 EOF
1976 fi
1977 fi
1978@@ -35,7 +35,7 @@ index a95992a77..d6937cfef 100644
1979 fi
1980 sed "s/^/$submenu_indentation/" << EOF
1981 }
1982-@@ -378,6 +389,14 @@ while [ "x$list" != "x" ] ; do
1983+@@ -389,6 +400,14 @@ while [ "x$list" != "x" ] ; do
1984 gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
1985 fi
1986
1987diff --git a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
1988index 8778d34..eee209a 100644
1989--- a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
1990+++ b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
1991@@ -1,4 +1,4 @@
1992-From f44b20b94883a77b5f8ef8370bedb8457456907d Mon Sep 17 00:00:00 2001
1993+From ab2099f2c6c11ea45a6aadefeb785636477e7430 Mon Sep 17 00:00:00 2001
1994 From: Chris Glass <chris.glass@canonical.com>
1995 Date: Fri, 9 Mar 2018 13:47:07 +0100
1996 Subject: UBUNTU: Added initrd-less boot capabilities.
1997@@ -11,15 +11,15 @@ Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
1998 Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch
1999 ---
2000 Makefile.am | 3 ++
2001- configure.ac | 10 +++++++
2002- grub-initrd-fallback.service | 12 ++++++++
2003- util/grub.d/00_header.in | 27 +++++++++++++++++
2004- util/grub.d/10_linux.in | 56 +++++++++++++++++++++++++-----------
2005- 5 files changed, 91 insertions(+), 17 deletions(-)
2006+ configure.ac | 10 ++++++
2007+ grub-initrd-fallback.service | 12 +++++++
2008+ util/grub.d/00_header.in | 27 ++++++++++++++
2009+ util/grub.d/10_linux.in | 68 +++++++++++++++++++++++++++---------
2010+ 5 files changed, 104 insertions(+), 16 deletions(-)
2011 create mode 100644 grub-initrd-fallback.service
2012
2013 diff --git a/Makefile.am b/Makefile.am
2014-index 1f4bb9b8c..e6a220711 100644
2015+index 1f4bb9b8c5..e6a220711e 100644
2016 --- a/Makefile.am
2017 +++ b/Makefile.am
2018 @@ -473,6 +473,9 @@ ChangeLog: FORCE
2019@@ -33,7 +33,7 @@ index 1f4bb9b8c..e6a220711 100644
2020
2021 syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg
2022 diff --git a/configure.ac b/configure.ac
2023-index 883245553..1819188f9 100644
2024+index 883245553d..1819188f9f 100644
2025 --- a/configure.ac
2026 +++ b/configure.ac
2027 @@ -305,6 +305,16 @@ AC_SUBST(grubdirname)
2028@@ -55,7 +55,7 @@ index 883245553..1819188f9 100644
2029 #
2030 diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service
2031 new file mode 100644
2032-index 000000000..48778c9f7
2033+index 0000000000..48778c9f76
2034 --- /dev/null
2035 +++ b/grub-initrd-fallback.service
2036 @@ -0,0 +1,12 @@
2037@@ -72,7 +72,7 @@ index 000000000..48778c9f7
2038 +[Install]
2039 +WantedBy=multi-user.target rescue.target emergency.target
2040 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
2041-index b7135b655..2642f66c5 100644
2042+index b7135b655f..2642f66c59 100644
2043 --- a/util/grub.d/00_header.in
2044 +++ b/util/grub.d/00_header.in
2045 @@ -50,6 +50,18 @@ if [ -s \$prefix/grubenv ]; then
2046@@ -117,7 +117,7 @@ index b7135b655..2642f66c5 100644
2047 cat <<EOF
2048 function recordfail {
2049 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2050-index aa9666e5a..13f39b9f6 100644
2051+index aa9666e5ad..af1e096bd6 100644
2052 --- a/util/grub.d/10_linux.in
2053 +++ b/util/grub.d/10_linux.in
2054 @@ -118,6 +118,10 @@ if [ "$vt_handoff" = 1 ]; then
2055@@ -131,7 +131,7 @@ index aa9666e5a..13f39b9f6 100644
2056 linux_entry ()
2057 {
2058 os="$1"
2059-@@ -193,31 +197,49 @@ EOF
2060+@@ -193,31 +197,63 @@ EOF
2061 linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
2062 EOF
2063 else
2064@@ -143,6 +143,14 @@ index aa9666e5a..13f39b9f6 100644
2065 + linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
2066 + fi
2067 + message="$(gettext_printf "Loading initial ramdisk ...")"
2068++ initrd_path=
2069++ for i in ${initrd}; do
2070++ initrd_path="${initrd_path} ${rel_dirname}/${i}"
2071++ done
2072++ initrd_path_only_early=
2073++ for i in ${initrd_early}; do
2074++ initrd_path_only_early="${initrd_path_only_early} ${rel_dirname}/${i}"
2075++ done
2076 + if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
2077 + sed "s/^/$submenu_indentation/" << EOF
2078 + if [ "\${initrdfail}" = 1 ]; then
2079@@ -153,12 +161,18 @@ index aa9666e5a..13f39b9f6 100644
2080 + echo '$(echo "$message" | grub_quote)'
2081 +EOF
2082 + fi
2083-+
2084 sed "s/^/$submenu_indentation/" << EOF
2085 - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
2086-+ initrd ${rel_dirname}/${initrd}
2087++ initrd $(echo $initrd_path)
2088 + else
2089 + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
2090++EOF
2091++ if [ -n "$initrd_path_only_early" ]; then
2092++ sed "s/^/$submenu_indentation/" << EOF
2093++ initrd $(echo $initrd_path_only_early)
2094++EOF
2095++ fi
2096++ sed "s/^/$submenu_indentation/" << EOF
2097 + fi
2098 + initrdfail
2099 EOF
2100@@ -188,10 +202,9 @@ index aa9666e5a..13f39b9f6 100644
2101 - initrd_path="${initrd_path} ${rel_dirname}/${i}"
2102 - done
2103 - sed "s/^/$submenu_indentation/" << EOF
2104-- initrd $(echo $initrd_path)
2105 + fi
2106 + sed "s/^/$submenu_indentation/" << EOF
2107-+ initrd ${rel_dirname}/${initrd}
2108+ initrd $(echo $initrd_path)
2109 EOF
2110 + fi
2111 + fi
2112diff --git a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
2113index d8b8810..98571fd 100644
2114--- a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
2115+++ b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
2116@@ -1,4 +1,4 @@
2117-From 4f4f4b1ce88642c1c13f12b425484906098590b5 Mon Sep 17 00:00:00 2001
2118+From 704ab1283bad04e55ee7cd05281a17aa24e382c6 Mon Sep 17 00:00:00 2001
2119 From: Michael Hudson-Doyle <michael.hudson@canonical.com>
2120 Date: Tue, 6 Aug 2019 12:31:47 +1200
2121 Subject: UBUNTU: Boot from multipath-dependent symlink when / is multipathed.
2122@@ -16,7 +16,7 @@ Patch-Name: ubuntu-boot-from-multipath-dependent-symlink.patch
2123 1 file changed, 41 insertions(+)
2124
2125 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2126-index d6937cfef..3eb0e6936 100644
2127+index bbf5d73e39..14a89ba13d 100644
2128 --- a/util/grub.d/10_linux.in
2129 +++ b/util/grub.d/10_linux.in
2130 @@ -65,6 +65,47 @@ esac
2131diff --git a/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch b/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch
2132deleted file mode 100644
2133index 14951f6..0000000
2134--- a/debian/patches/ubuntu-clear-invalid-initrd-spacing.patch
2135+++ /dev/null
2136@@ -1,27 +0,0 @@
2137-From a5307d00cee7f22074b89f393cb99c968f657ddb Mon Sep 17 00:00:00 2001
2138-From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2139-Date: Thu, 11 Jul 2019 09:07:47 -0400
2140-Subject: UBUNTU: Clear up incorrect spacing when not using early initrds
2141-
2142-Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2143-Patch-Name: ubuntu-clear-invalid-initrd-spacing.patch
2144----
2145- util/grub.d/10_linux.in | 5 ++++-
2146- 1 file changed, 4 insertions(+), 1 deletion(-)
2147-
2148-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2149-index 13f39b9f6..a95992a77 100644
2150---- a/util/grub.d/10_linux.in
2151-+++ b/util/grub.d/10_linux.in
2152-@@ -366,7 +366,10 @@ while [ "x$list" != "x" ] ; do
2153-
2154- initrd=
2155- if test -n "${initrd_early}" || test -n "${initrd_real}"; then
2156-- initrd="${initrd_early} ${initrd_real}"
2157-+ initrd="${initrd_real}"
2158-+ if test -n "${initrd_early}"; then
2159-+ initrd="${initrd_early} ${initrd}"
2160-+ fi
2161-
2162- initrd_display=
2163- for i in ${initrd}; do
2164diff --git a/debian/patches/ubuntu-dont-verify-loopback-images.patch b/debian/patches/ubuntu-dont-verify-loopback-images.patch
2165new file mode 100644
2166index 0000000..0531814
2167--- /dev/null
2168+++ b/debian/patches/ubuntu-dont-verify-loopback-images.patch
2169@@ -0,0 +1,37 @@
2170+From 696a85aae06675d927e2942a0d550e0e66078239 Mon Sep 17 00:00:00 2001
2171+From: Chris Coulson <chris.coulson@canonical.com>
2172+Date: Mon, 1 Jun 2020 14:03:37 +0100
2173+Subject: UBUNTU: disk/loopback: Don't verify loopback images
2174+
2175+When a file is verified, the entire contents of the verified file are
2176+loaded in to memory and retained until the file handle is closed. A
2177+consequence of this is that opening a loopback image can incur a
2178+significant memory cost.
2179+
2180+As loopback devices are just another disk implementation, don't treat
2181+loopback images any differently to physical disk images, and skip
2182+verification of them. Files opened from the filesystem within a loopback
2183+image will still be passed to verifier modules where required.
2184+
2185+Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
2186+LP: #1878541
2187+Forwarded: yes, https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00002.html
2188+Patch-Name: ubuntu-dont-verify-loopback-images.patch
2189+---
2190+ grub-core/disk/loopback.c | 3 ++-
2191+ 1 file changed, 2 insertions(+), 1 deletion(-)
2192+
2193+diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
2194+index ccb4b167cc..210201d22d 100644
2195+--- a/grub-core/disk/loopback.c
2196++++ b/grub-core/disk/loopback.c
2197+@@ -86,7 +86,8 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
2198+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
2199+
2200+ file = grub_file_open (args[1], GRUB_FILE_TYPE_LOOPBACK
2201+- | GRUB_FILE_TYPE_NO_DECOMPRESS);
2202++ | GRUB_FILE_TYPE_NO_DECOMPRESS |
2203++ GRUB_FILE_TYPE_SKIP_SIGNATURE);
2204+ if (! file)
2205+ return grub_errno;
2206+
2207diff --git a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
2208index 94cd6db..3d274cf 100644
2209--- a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
2210+++ b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
2211@@ -1,4 +1,4 @@
2212-From fdcce3de9327b0c8009054baa1ed13fb8572e1ac Mon Sep 17 00:00:00 2001
2213+From 1cc5aadf105ba7037e2625ac22a89d7feea09109 Mon Sep 17 00:00:00 2001
2214 From: Dimitri John Ledkov <xnox@ubuntu.com>
2215 Date: Wed, 27 Nov 2019 23:12:35 +0000
2216 Subject: UBUNTU: Allow chainloading EFI apps from loop mounts.
2217@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-allow-loopmount-chainload.patch
2218 create mode 100644 include/grub/loopback.h
2219
2220 diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
2221-index cdf9123fa..ccb4b167c 100644
2222+index cdf9123fa5..ccb4b167cc 100644
2223 --- a/grub-core/disk/loopback.c
2224 +++ b/grub-core/disk/loopback.c
2225 @@ -21,20 +21,13 @@
2226@@ -41,7 +41,7 @@ index cdf9123fa..ccb4b167c 100644
2227 static unsigned long last_id = 0;
2228
2229 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
2230-index ec80f415b..04e815c05 100644
2231+index ec80f415b8..04e815c052 100644
2232 --- a/grub-core/loader/efi/chainloader.c
2233 +++ b/grub-core/loader/efi/chainloader.c
2234 @@ -24,6 +24,7 @@
2235@@ -91,7 +91,7 @@ index ec80f415b..04e815c05 100644
2236
2237 diff --git a/include/grub/loopback.h b/include/grub/loopback.h
2238 new file mode 100644
2239-index 000000000..3b9a9e32e
2240+index 0000000000..3b9a9e32e8
2241 --- /dev/null
2242 +++ b/include/grub/loopback.h
2243 @@ -0,0 +1,30 @@
2244diff --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
2245index b1efc2e..66749d2 100644
2246--- a/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
2247+++ b/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
2248@@ -1,4 +1,4 @@
2249-From ab83d387cda5158fd4a3940dc067c55a6ee7f9f4 Mon Sep 17 00:00:00 2001
2250+From a7f1a5663f165025c279dd0a13cdec06d27f03e8 Mon Sep 17 00:00:00 2001
2251 From: Hans de Goede <hdegoede@redhat.com>
2252 Date: Tue, 6 Mar 2018 17:11:15 +0100
2253 Subject: UBUNTU: EFI: Do not set text-mode until we actually need it
2254@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-console-set-text-mode-as-needed.patch
2255 1 file changed, 45 insertions(+), 23 deletions(-)
2256
2257 diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
2258-index 4840cc59d..b61da7d0d 100644
2259+index 4840cc59d3..b61da7d0d0 100644
2260 --- a/grub-core/term/efi/console.c
2261 +++ b/grub-core/term/efi/console.c
2262 @@ -24,6 +24,11 @@
2263diff --git a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
2264index ff9a6b1..20a2db3 100644
2265--- a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
2266+++ b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
2267@@ -1,4 +1,4 @@
2268-From 56715cae7b821ff8395078ff79a4a2ee937cb4db Mon Sep 17 00:00:00 2001
2269+From 4dfa975de0c2289b33ab76f06e70b01583f2c56d Mon Sep 17 00:00:00 2001
2270 From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2271 Date: Wed, 3 Jul 2019 15:21:16 -0400
2272 Subject: UBUNTU: Have the lzma decompressor image only contain the .text
2273@@ -16,7 +16,7 @@ Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2274 1 file changed, 1 insertion(+), 1 deletion(-)
2275
2276 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
2277-index 1731c53f0..33e75021d 100644
2278+index 1731c53f08..33e75021da 100644
2279 --- a/grub-core/Makefile.core.def
2280 +++ b/grub-core/Makefile.core.def
2281 @@ -547,7 +547,7 @@ image = {
2282diff --git a/debian/patches/ubuntu-flavour-order.patch b/debian/patches/ubuntu-flavour-order.patch
2283new file mode 100644
2284index 0000000..9308d1e
2285--- /dev/null
2286+++ b/debian/patches/ubuntu-flavour-order.patch
2287@@ -0,0 +1,61 @@
2288+From 2d236733ca4d74521cefab7fbf5e0f00967a028b Mon Sep 17 00:00:00 2001
2289+From: Julian Andres Klode <julian.klode@canonical.com>
2290+Date: Tue, 9 Jun 2020 11:50:23 +0200
2291+Subject: UBUNTU: Add GRUB_FLAVOUR_ORDER configuration item
2292+
2293+This allows you to specify flavours that will be preferred
2294+over other ones, and the order in which they are preferred
2295+- items in the list win over items not in the list, and items
2296+earlier in the list win over later ones.
2297+
2298+We still have to sort out storage of this, as we need to
2299+inject that from packages or the UA client and similar,
2300+and we can't just modify /etc/default/grub for that.
2301+
2302+LP: #1882663
2303+Patch-Name: ubuntu-flavour-order.patch
2304+---
2305+ util/grub-mkconfig.in | 3 ++-
2306+ util/grub-mkconfig_lib.in | 15 +++++++++++++++
2307+ 2 files changed, 17 insertions(+), 1 deletion(-)
2308+
2309+diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2310+index 72f1e25a03..6c8988fd60 100644
2311+--- a/util/grub-mkconfig.in
2312++++ b/util/grub-mkconfig.in
2313+@@ -260,7 +260,8 @@ export GRUB_DEFAULT \
2314+ GRUB_RECORDFAIL_TIMEOUT \
2315+ GRUB_RECOVERY_TITLE \
2316+ GRUB_FORCE_PARTUUID \
2317+- GRUB_DISABLE_INITRD
2318++ GRUB_DISABLE_INITRD \
2319++ GRUB_FLAVOUR_ORDER
2320+
2321+ if test "x${grub_cfg}" != "x"; then
2322+ rm -f "${grub_cfg}.new"
2323+diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
2324+index fe6319abe0..7e2d1bc214 100644
2325+--- a/util/grub-mkconfig_lib.in
2326++++ b/util/grub-mkconfig_lib.in
2327+@@ -270,6 +270,21 @@ version_test_gt ()
2328+ if [ "x$version_test_gt_b" = "x" ] ; then
2329+ return 0
2330+ fi
2331++
2332++ # GRUB_FLAVOUR_ORDER is an ordered list of kernels, in decreasing
2333++ # priority. Any items in the list take precedence over other kernels,
2334++ # and earlier flavours are preferred over later ones.
2335++ for flavour in ${GRUB_FLAVOUR_ORDER:-}; do
2336++ version_test_gt_a_preferred=$(echo "$version_test_gt_a" | grep -- "-[0-9]*-$flavour\$")
2337++ version_test_gt_b_preferred=$(echo "$version_test_gt_b" | grep -- "-[0-9]*-$flavour\$")
2338++
2339++ if [ -n "$version_test_gt_a_preferred" -a -z "$version_test_gt_b_preferred" ] ; then
2340++ return 0
2341++ elif [ -z "$version_test_gt_a_preferred" -a -n "$version_test_gt_b_preferred" ] ; then
2342++ return 1
2343++ fi
2344++ done
2345++
2346+ case "$version_test_gt_a:$version_test_gt_b" in
2347+ *.old:*.old) ;;
2348+ *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
2349diff --git a/debian/patches/ubuntu-grub-install-extra-removable.patch b/debian/patches/ubuntu-grub-install-extra-removable.patch
2350index 653d6db..0f1b7a5 100644
2351--- a/debian/patches/ubuntu-grub-install-extra-removable.patch
2352+++ b/debian/patches/ubuntu-grub-install-extra-removable.patch
2353@@ -1,4 +1,4 @@
2354-From a2c29740e83520a037e3aa6e88c874ca0b5b991a Mon Sep 17 00:00:00 2001
2355+From b87f13adb4998b9f68981636533b1d186030ac83 Mon Sep 17 00:00:00 2001
2356 From: Steve McIntyre <93sam@debian.org>
2357 Date: Wed, 3 Dec 2014 01:25:12 +0000
2358 Subject: UBUNTU: Add support for forcing EFI installation to the removable
2359@@ -23,7 +23,7 @@ Patch-Name: ubuntu-grub-install-extra-removable.patch
2360 1 file changed, 133 insertions(+), 2 deletions(-)
2361
2362 diff --git a/util/grub-install.c b/util/grub-install.c
2363-index 64c292383..030464645 100644
2364+index 64c292383f..0304646453 100644
2365 --- a/util/grub-install.c
2366 +++ b/util/grub-install.c
2367 @@ -56,6 +56,7 @@
2368diff --git a/debian/patches/ubuntu-install-signed.patch b/debian/patches/ubuntu-install-signed.patch
2369index 688b5ab..66f46b9 100644
2370--- a/debian/patches/ubuntu-install-signed.patch
2371+++ b/debian/patches/ubuntu-install-signed.patch
2372@@ -1,4 +1,4 @@
2373-From e66b6951c463ed36d7c3a8cff50c5dbdfa29e99a Mon Sep 17 00:00:00 2001
2374+From 4d418a4d382eeb84eb67c8581819dd10894ed048 Mon Sep 17 00:00:00 2001
2375 From: Colin Watson <cjwatson@ubuntu.com>
2376 Date: Mon, 13 Jan 2014 12:13:22 +0000
2377 Subject: UBUNTU: Install signed images if UEFI Secure Boot is enabled
2378@@ -19,7 +19,7 @@ Patch-Name: ubuntu-install-signed.patch
2379 1 file changed, 156 insertions(+), 59 deletions(-)
2380
2381 diff --git a/util/grub-install.c b/util/grub-install.c
2382-index 3b4606eef..e1e40cf2b 100644
2383+index 3b4606eef1..e1e40cf2b5 100644
2384 --- a/util/grub-install.c
2385 +++ b/util/grub-install.c
2386 @@ -80,6 +80,7 @@ static char *label_color;
2387diff --git a/debian/patches/ubuntu-linuxefi.patch b/debian/patches/ubuntu-linuxefi.patch
2388index 74fec04..4cfdc1c 100644
2389--- a/debian/patches/ubuntu-linuxefi.patch
2390+++ b/debian/patches/ubuntu-linuxefi.patch
2391@@ -1,4 +1,4 @@
2392-From 3451d405d55fd342aa581ecc23ee535ad533c61d Mon Sep 17 00:00:00 2001
2393+From 0e2ddafb154df1708801faef74aa4f2d40d55d35 Mon Sep 17 00:00:00 2001
2394 From: Matthew Garrett <mjg@redhat.com>
2395 Date: Wed, 27 Feb 2019 12:20:48 -0500
2396 Subject: UBUNTU: Add support for linuxefi
2397@@ -358,7 +358,7 @@ Last-Update: 2018-12-07
2398 create mode 100644 include/grub/sparc64/linux.h
2399
2400 diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
2401-index 3ea8e7ff4..c6ba5b2d7 100644
2402+index 3ea8e7ff45..c6ba5b2d76 100644
2403 --- a/grub-core/Makefile.am
2404 +++ b/grub-core/Makefile.am
2405 @@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
2406@@ -370,7 +370,7 @@ index 3ea8e7ff4..c6ba5b2d7 100644
2407 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
2408 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
2409 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
2410-index aadb4cdff..1731c53f0 100644
2411+index aadb4cdff8..1731c53f08 100644
2412 --- a/grub-core/Makefile.core.def
2413 +++ b/grub-core/Makefile.core.def
2414 @@ -207,6 +207,7 @@ kernel = {
2415@@ -428,7 +428,7 @@ index aadb4cdff..1731c53f0 100644
2416 enable = i386_coreboot;
2417 enable = efi;
2418 diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
2419-index a0c164e54..41a7f3f04 100644
2420+index a0c164e54f..41a7f3f046 100644
2421 --- a/grub-core/commands/iorw.c
2422 +++ b/grub-core/commands/iorw.c
2423 @@ -23,6 +23,7 @@
2424@@ -460,7 +460,7 @@ index a0c164e54..41a7f3f04 100644
2425 grub_unregister_extcmd (cmd_read_word);
2426 grub_unregister_extcmd (cmd_read_dword);
2427 diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c
2428-index 98769eadb..088cbe9e2 100644
2429+index 98769eadb3..088cbe9e2b 100644
2430 --- a/grub-core/commands/memrw.c
2431 +++ b/grub-core/commands/memrw.c
2432 @@ -22,6 +22,7 @@
2433@@ -492,7 +492,7 @@ index 98769eadb..088cbe9e2 100644
2434 grub_unregister_extcmd (cmd_read_word);
2435 grub_unregister_extcmd (cmd_read_dword);
2436 diff --git a/grub-core/kern/arm/coreboot/coreboot.S b/grub-core/kern/arm/coreboot/coreboot.S
2437-index a1104526c..70998c066 100644
2438+index a1104526c1..70998c066a 100644
2439 --- a/grub-core/kern/arm/coreboot/coreboot.S
2440 +++ b/grub-core/kern/arm/coreboot/coreboot.S
2441 @@ -42,3 +42,9 @@ FUNCTION(grub_armv7_get_timer_frequency)
2442@@ -506,7 +506,7 @@ index a1104526c..70998c066 100644
2443 + void *kernel_param);
2444 +
2445 diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
2446-index 074dfc3c6..d665c10fc 100644
2447+index 074dfc3c6f..d665c10fcc 100644
2448 --- a/grub-core/kern/dl.c
2449 +++ b/grub-core/kern/dl.c
2450 @@ -32,6 +32,7 @@
2451@@ -518,7 +518,7 @@ index 074dfc3c6..d665c10fc 100644
2452 /* Platforms where modules are in a readonly area of memory. */
2453 #if defined(GRUB_MACHINE_QEMU)
2454 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
2455-index 96204e39b..6e1ceb905 100644
2456+index 96204e39b9..6e1ceb9051 100644
2457 --- a/grub-core/kern/efi/efi.c
2458 +++ b/grub-core/kern/efi/efi.c
2459 @@ -273,34 +273,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
2460@@ -557,7 +557,7 @@ index 96204e39b..6e1ceb905 100644
2461
2462 /* Search the mods section from the PE32/PE32+ image. This code uses
2463 diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
2464-index b02fab1b1..a9e37108c 100644
2465+index b02fab1b10..a9e37108c6 100644
2466 --- a/grub-core/kern/efi/mm.c
2467 +++ b/grub-core/kern/efi/mm.c
2468 @@ -113,6 +113,38 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address,
2469@@ -601,7 +601,7 @@ index b02fab1b1..a9e37108c 100644
2470 grub_efi_allocate_pages_real (grub_efi_physical_address_t address,
2471 diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c
2472 new file mode 100644
2473-index 000000000..c14f401d7
2474+index 0000000000..c14f401d7e
2475 --- /dev/null
2476 +++ b/grub-core/kern/efi/sb.c
2477 @@ -0,0 +1,66 @@
2478@@ -672,7 +672,7 @@ index 000000000..c14f401d7
2479 +#endif
2480 +}
2481 diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
2482-index ef3e9f944..1a5296a60 100644
2483+index ef3e9f9444..1a5296a60c 100644
2484 --- a/grub-core/loader/arm64/linux.c
2485 +++ b/grub-core/loader/arm64/linux.c
2486 @@ -27,6 +27,7 @@
2487@@ -720,7 +720,7 @@ index ef3e9f944..1a5296a60 100644
2488 linux_args = grub_malloc (cmdline_size);
2489 if (!linux_args)
2490 diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
2491-index 74888c463..69c2a10d3 100644
2492+index 74888c463b..69c2a10d35 100644
2493 --- a/grub-core/loader/efi/appleloader.c
2494 +++ b/grub-core/loader/efi/appleloader.c
2495 @@ -24,6 +24,7 @@
2496@@ -751,7 +751,7 @@ index 74888c463..69c2a10d3 100644
2497 grub_unregister_command (cmd);
2498 }
2499 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
2500-index cd92ea3f2..ec80f415b 100644
2501+index cd92ea3f24..ec80f415b8 100644
2502 --- a/grub-core/loader/efi/chainloader.c
2503 +++ b/grub-core/loader/efi/chainloader.c
2504 @@ -32,6 +32,9 @@
2505@@ -1701,7 +1701,7 @@ index cd92ea3f2..ec80f415b 100644
2506
2507 return grub_errno;
2508 diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
2509-index f0c2d91be..5360e6c1f 100644
2510+index f0c2d91be2..5360e6c1f7 100644
2511 --- a/grub-core/loader/efi/fdt.c
2512 +++ b/grub-core/loader/efi/fdt.c
2513 @@ -25,6 +25,7 @@
2514@@ -1714,7 +1714,7 @@ index f0c2d91be..5360e6c1f 100644
2515 static void *fdt;
2516 diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
2517 new file mode 100644
2518-index 000000000..e372b26a1
2519+index 0000000000..e372b26a1b
2520 --- /dev/null
2521 +++ b/grub-core/loader/efi/linux.c
2522 @@ -0,0 +1,86 @@
2523@@ -1805,7 +1805,7 @@ index 000000000..e372b26a1
2524 + return GRUB_ERR_BUG;
2525 +}
2526 diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
2527-index 3730ed382..5b9b92d6b 100644
2528+index 3730ed3824..5b9b92d6ba 100644
2529 --- a/grub-core/loader/i386/bsd.c
2530 +++ b/grub-core/loader/i386/bsd.c
2531 @@ -39,6 +39,7 @@
2532@@ -1838,7 +1838,7 @@ index 3730ed382..5b9b92d6b 100644
2533 grub_unregister_extcmd (cmd_netbsd);
2534 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
2535 new file mode 100644
2536-index 000000000..6b6aef87f
2537+index 0000000000..6b6aef87f7
2538 --- /dev/null
2539 +++ b/grub-core/loader/i386/efi/linux.c
2540 @@ -0,0 +1,379 @@
2541@@ -2222,7 +2222,7 @@ index 000000000..6b6aef87f
2542 + grub_unregister_command (cmd_initrd);
2543 +}
2544 diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
2545-index d0501e229..4328bcbdb 100644
2546+index d0501e2295..4328bcbdb0 100644
2547 --- a/grub-core/loader/i386/linux.c
2548 +++ b/grub-core/loader/i386/linux.c
2549 @@ -45,6 +45,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
2550@@ -2390,7 +2390,7 @@ index d0501e229..4328bcbdb 100644
2551 {
2552 grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
2553 diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
2554-index 47ea2945e..3866f048b 100644
2555+index 47ea2945e4..3866f048bb 100644
2556 --- a/grub-core/loader/i386/pc/linux.c
2557 +++ b/grub-core/loader/i386/pc/linux.c
2558 @@ -35,6 +35,7 @@
2559@@ -2503,7 +2503,7 @@ index 47ea2945e..3866f048b 100644
2560 grub_unregister_command (cmd_initrd);
2561 }
2562 diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
2563-index 4a98d7082..3e6ad166d 100644
2564+index 4a98d70825..3e6ad166dc 100644
2565 --- a/grub-core/loader/multiboot.c
2566 +++ b/grub-core/loader/multiboot.c
2567 @@ -50,6 +50,7 @@
2568@@ -2535,7 +2535,7 @@ index 4a98d7082..3e6ad166d 100644
2569 grub_unregister_command (cmd_module);
2570 }
2571 diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
2572-index 7f74d1d6f..e0f47e72b 100644
2573+index 7f74d1d6fc..e0f47e72b0 100644
2574 --- a/grub-core/loader/xnu.c
2575 +++ b/grub-core/loader/xnu.c
2576 @@ -34,6 +34,7 @@
2577@@ -2567,7 +2567,7 @@ index 7f74d1d6f..e0f47e72b 100644
2578 grub_unregister_command (cmd_resume);
2579 #endif
2580 diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h
2581-index 4269adc6d..cc8174ccd 100644
2582+index 4269adc6da..cc8174ccdf 100644
2583 --- a/include/grub/arm64/linux.h
2584 +++ b/include/grub/arm64/linux.h
2585 @@ -20,6 +20,8 @@
2586@@ -2580,7 +2580,7 @@ index 4269adc6d..cc8174ccd 100644
2587 /* From linux/Documentation/arm64/booting.txt */
2588 struct linux_arm64_kernel_header
2589 diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
2590-index a237952b3..5b6387581 100644
2591+index a237952b37..5b63875812 100644
2592 --- a/include/grub/efi/efi.h
2593 +++ b/include/grub/efi/efi.h
2594 @@ -47,6 +47,9 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address,
2595@@ -2603,7 +2603,7 @@ index a237952b3..5b6387581 100644
2596 const grub_efi_device_path_t *dp2);
2597 diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h
2598 new file mode 100644
2599-index 000000000..0033d9305
2600+index 0000000000..0033d9305a
2601 --- /dev/null
2602 +++ b/include/grub/efi/linux.h
2603 @@ -0,0 +1,31 @@
2604@@ -2639,7 +2639,7 @@ index 000000000..0033d9305
2605 +
2606 +#endif /* ! GRUB_EFI_LINUX_HEADER */
2607 diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
2608-index 0ed8781f0..a43adf274 100644
2609+index 0ed8781f03..a43adf2746 100644
2610 --- a/include/grub/efi/pe32.h
2611 +++ b/include/grub/efi/pe32.h
2612 @@ -223,7 +223,11 @@ struct grub_pe64_optional_header
2613@@ -2730,7 +2730,7 @@ index 0ed8781f0..a43adf274 100644
2614 grub_uint32_t page_rva;
2615 diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h
2616 new file mode 100644
2617-index 000000000..9629fbb0f
2618+index 0000000000..9629fbb0f9
2619 --- /dev/null
2620 +++ b/include/grub/efi/sb.h
2621 @@ -0,0 +1,29 @@
2622@@ -2764,7 +2764,7 @@ index 000000000..9629fbb0f
2623 +
2624 +#endif /* ! GRUB_EFI_SB_HEADER */
2625 diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
2626-index ce30e7fb0..a093679cb 100644
2627+index ce30e7fb01..a093679cb8 100644
2628 --- a/include/grub/i386/linux.h
2629 +++ b/include/grub/i386/linux.h
2630 @@ -136,7 +136,12 @@ struct linux_i386_kernel_header
2631@@ -2783,13 +2783,13 @@ index ce30e7fb0..a093679cb 100644
2632 grub_uint64_t hardware_subarch_data;
2633 diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h
2634 new file mode 100644
2635-index 000000000..e69de29bb
2636+index 0000000000..e69de29bb2
2637 diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h
2638 new file mode 100644
2639-index 000000000..e69de29bb
2640+index 0000000000..e69de29bb2
2641 diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h
2642 new file mode 100644
2643-index 000000000..e69de29bb
2644+index 0000000000..e69de29bb2
2645 diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h
2646 new file mode 100644
2647-index 000000000..e69de29bb
2648+index 0000000000..e69de29bb2
2649diff --git a/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch b/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
2650index 0f51703..451de30 100644
2651--- a/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
2652+++ b/debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch
2653@@ -1,4 +1,4 @@
2654-From 7d3dea454253718d765c5dea62b893c5d5ef10ec Mon Sep 17 00:00:00 2001
2655+From f78a4044403841f4685924aa59cda87b8ffd4126 Mon Sep 17 00:00:00 2001
2656 From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2657 Date: Fri, 14 Dec 2018 13:46:14 -0500
2658 Subject: UBUNTU: grub-mkconfig: leave a trace of what files were sourced to
2659@@ -11,7 +11,7 @@ Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2660 1 file changed, 2 insertions(+)
2661
2662 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2663-index 29bdad0c1..72f1e25a0 100644
2664+index 29bdad0c12..72f1e25a03 100644
2665 --- a/util/grub-mkconfig.in
2666 +++ b/util/grub-mkconfig.in
2667 @@ -162,10 +162,12 @@ if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then
2668diff --git a/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch b/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
2669new file mode 100644
2670index 0000000..b387494
2671--- /dev/null
2672+++ b/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
2673@@ -0,0 +1,84 @@
2674+From 3eb630e8f5eddee6e6160e1f2bb33ce7c5f8762b Mon Sep 17 00:00:00 2001
2675+From: Julian Andres Klode <julian.klode@canonical.com>
2676+Date: Fri, 19 Jun 2020 12:57:19 +0200
2677+Subject: Pass dis_ucode_ldr to kernel for recovery mode
2678+
2679+In case of a botched microcode update, this allows people to
2680+easily roll back.
2681+
2682+It will of course break in the more unlikely event that you are
2683+missing a microcode update in your firmware that is needed to boot
2684+the system, but editing the entry to remove an option is easier than
2685+having to figure out the option and add it.
2686+
2687+LP: #1831789
2688+Patch-Name: ubuntu-recovery-dis_ucode_ldr.patch
2689+---
2690+ util/grub.d/10_linux.in | 4 ++++
2691+ util/grub.d/10_linux_zfs.in | 24 +++++++++++++++---------
2692+ 2 files changed, 19 insertions(+), 9 deletions(-)
2693+
2694+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2695+index 14a89ba13d..49e627228f 100644
2696+--- a/util/grub.d/10_linux.in
2697++++ b/util/grub.d/10_linux.in
2698+@@ -334,6 +334,10 @@ case "$machine" in
2699+ *) GENKERNEL_ARCH="$machine" ;;
2700+ esac
2701+
2702++case "$GENKERNEL_ARCH" in
2703++ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
2704++esac
2705++
2706+ prepare_boot_cache=
2707+ prepare_root_cache=
2708+ boot_device_id=
2709+diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2710+index 712d832802..d9b79e29a7 100755
2711+--- a/util/grub.d/10_linux_zfs.in
2712++++ b/util/grub.d/10_linux_zfs.in
2713+@@ -41,6 +41,16 @@ imported_pools=""
2714+ MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
2715+ ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
2716+
2717++
2718++machine="$(uname -m)"
2719++case "${machine}" in
2720++ i?86) GENKERNEL_ARCH="x86" ;;
2721++ mips|mips64) GENKERNEL_ARCH="mips" ;;
2722++ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
2723++ arm*) GENKERNEL_ARCH="arm" ;;
2724++ *) GENKERNEL_ARCH="${machine}" ;;
2725++esac
2726++
2727+ RC=0
2728+ on_exit() {
2729+ # Restore initial zpool import state
2730+@@ -407,15 +417,6 @@ get_dataset_info() {
2731+ return
2732+ fi
2733+
2734+- machine="$(uname -m)"
2735+- case "${machine}" in
2736+- i?86) GENKERNEL_ARCH="x86" ;;
2737+- mips|mips64) GENKERNEL_ARCH="mips" ;;
2738+- mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
2739+- arm*) GENKERNEL_ARCH="arm" ;;
2740+- *) GENKERNEL_ARCH="${machine}" ;;
2741+- esac
2742+-
2743+ initrd_list=""
2744+ kernel_list=""
2745+ list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
2746+@@ -907,6 +908,11 @@ generate_grub_menu() {
2747+ GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
2748+ fi
2749+
2750++ case "$GENKERNEL_ARCH" in
2751++ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
2752++ esac
2753++
2754++
2755+ if [ "${vt_handoff}" = 1 ]; then
2756+ for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
2757+ if [ "${word}" = splash ]; then
2758diff --git a/debian/patches/ubuntu-resilient-boot-boot-order.patch b/debian/patches/ubuntu-resilient-boot-boot-order.patch
2759index 89de3c2..6583945 100644
2760--- a/debian/patches/ubuntu-resilient-boot-boot-order.patch
2761+++ b/debian/patches/ubuntu-resilient-boot-boot-order.patch
2762@@ -1,4 +1,4 @@
2763-From dcd35364b7789ebb00a645b4fe35e0605ec141ef Mon Sep 17 00:00:00 2001
2764+From 7a471059af0b7a511d51d43a26662c6424d88f56 Mon Sep 17 00:00:00 2001
2765 From: Julian Andres Klode <julian.klode@canonical.com>
2766 Date: Wed, 8 Apr 2020 11:05:25 +0200
2767 Subject: UBUNTU: efivar: Correctly handle boot order of multiple ESPs
2768@@ -30,7 +30,7 @@ Patch-Name: ubuntu-resilient-boot-boot-order.patch
2769 6 files changed, 59 insertions(+), 24 deletions(-)
2770
2771 diff --git a/grub-core/osdep/basic/no_platform.c b/grub-core/osdep/basic/no_platform.c
2772-index d76c34c14..152a32873 100644
2773+index d76c34c148..152a328737 100644
2774 --- a/grub-core/osdep/basic/no_platform.c
2775 +++ b/grub-core/osdep/basic/no_platform.c
2776 @@ -31,7 +31,7 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
2777@@ -43,7 +43,7 @@ index d76c34c14..152a32873 100644
2778 const char *efi_distributor)
2779 {
2780 diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
2781-index 41d39c448..d34df0f70 100644
2782+index 41d39c4489..d34df0f70f 100644
2783 --- a/grub-core/osdep/unix/efivar.c
2784 +++ b/grub-core/osdep/unix/efivar.c
2785 @@ -266,9 +266,10 @@ remove_from_boot_order (struct efi_variable *order, uint16_t num)
2786@@ -142,7 +142,7 @@ index 41d39c448..d34df0f70 100644
2787 grub_util_info ("setting EFI variable BootOrder");
2788 rc = set_efi_variable ("BootOrder", order);
2789 diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
2790-index b561174ea..a5267db68 100644
2791+index b561174ea9..a5267db68d 100644
2792 --- a/grub-core/osdep/unix/platform.c
2793 +++ b/grub-core/osdep/unix/platform.c
2794 @@ -76,13 +76,13 @@ get_ofpathname (const char *dev)
2795@@ -163,7 +163,7 @@ index b561174ea..a5267db68 100644
2796 grub_util_error ("%s",
2797 _("GRUB was not built with efivar support; "
2798 diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
2799-index e19a3d9a8..a3f738fb9 100644
2800+index e19a3d9a8a..a3f738fb9b 100644
2801 --- a/grub-core/osdep/windows/platform.c
2802 +++ b/grub-core/osdep/windows/platform.c
2803 @@ -208,7 +208,7 @@ set_efi_variable_bootn (grub_uint16_t n, void *in, grub_size_t len)
2804@@ -176,7 +176,7 @@ index e19a3d9a8..a3f738fb9 100644
2805 const char *efi_distributor)
2806 {
2807 diff --git a/include/grub/util/install.h b/include/grub/util/install.h
2808-index a521f1663..b2ed88e38 100644
2809+index a521f1663f..b2ed88e386 100644
2810 --- a/include/grub/util/install.h
2811 +++ b/include/grub/util/install.h
2812 @@ -219,15 +219,14 @@ grub_install_get_default_x86_platform (void);
2813@@ -204,7 +204,7 @@ index a521f1663..b2ed88e38 100644
2814 void
2815 grub_install_register_ieee1275 (int is_prep, const char *install_device,
2816 diff --git a/util/grub-install.c b/util/grub-install.c
2817-index bf8eb65b3..f408b1986 100644
2818+index bf8eb65b33..f408b19860 100644
2819 --- a/util/grub-install.c
2820 +++ b/util/grub-install.c
2821 @@ -2083,9 +2083,9 @@ main (int argc, char *argv[])
2822diff --git a/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch b/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
2823index 7468ab0..f760c17 100644
2824--- a/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
2825+++ b/debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch
2826@@ -1,4 +1,4 @@
2827-From 94189259ac860128abfc465fb3a920d60c63a85a Mon Sep 17 00:00:00 2001
2828+From 28f4a3b5e80e905042f5e68daa0150015fbdc470 Mon Sep 17 00:00:00 2001
2829 From: Julian Andres Klode <julian.klode@canonical.com>
2830 Date: Fri, 3 Apr 2020 13:43:49 +0200
2831 Subject: UBUNTU: efivar: Ignore alternative ESPs
2832@@ -13,7 +13,7 @@ Patch-Name: ubuntu-resilient-boot-ignore-alternative-esps.patch
2833 1 file changed, 125 insertions(+), 5 deletions(-)
2834
2835 diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
2836-index 4a58328b4..41d39c448 100644
2837+index 4a58328b42..41d39c4489 100644
2838 --- a/grub-core/osdep/unix/efivar.c
2839 +++ b/grub-core/osdep/unix/efivar.c
2840 @@ -37,9 +37,11 @@
2841diff --git a/debian/patches/ubuntu-shorter-version-info.patch b/debian/patches/ubuntu-shorter-version-info.patch
2842index 085b012..850af42 100644
2843--- a/debian/patches/ubuntu-shorter-version-info.patch
2844+++ b/debian/patches/ubuntu-shorter-version-info.patch
2845@@ -1,4 +1,4 @@
2846-From 5fab34cd20e9617b29ed9b632b30cbdedc287e77 Mon Sep 17 00:00:00 2001
2847+From 91fe1e957877a6312ebb52d1d8f0f41ccc49cec9 Mon Sep 17 00:00:00 2001
2848 From: Julian Andres Klode <julian.klode@canonical.com>
2849 Date: Thu, 8 Feb 2018 10:48:37 +0100
2850 Subject: UBUNTU: Show only upstream version, hide rest in package_version
2851@@ -17,7 +17,7 @@ Patch-Name: ubuntu-shorter-version-info.patch
2852 1 file changed, 4 insertions(+), 1 deletion(-)
2853
2854 diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
2855-index 0aa389fa1..d25a8212c 100644
2856+index 0aa389fa16..d25a8212c7 100644
2857 --- a/grub-core/normal/main.c
2858 +++ b/grub-core/normal/main.c
2859 @@ -208,7 +208,7 @@ grub_normal_init_page (struct grub_term_output *term,
2860diff --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
2861index ea91c04..7967a42 100644
2862--- a/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
2863+++ b/debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
2864@@ -1,4 +1,4 @@
2865-From c9bacc366d2c480e5185a2a71eff51d25b71e155 Mon Sep 17 00:00:00 2001
2866+From 1c8dcce2384bc93646592c9a7a8f39aa6ce6e35b Mon Sep 17 00:00:00 2001
2867 From: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
2868 Date: Mon, 7 Oct 2019 22:53:32 -0300
2869 Subject: Skip /dev/disk/by-id/lvm-pvm-uuid entries from device iteration
2870@@ -44,7 +44,7 @@ Patch-Name: ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch
2871 1 file changed, 3 insertions(+)
2872
2873 diff --git a/util/deviceiter.c b/util/deviceiter.c
2874-index dddc50da7..ec9a6d0ab 100644
2875+index dddc50da7a..ec9a6d0ab4 100644
2876 --- a/util/deviceiter.c
2877 +++ b/util/deviceiter.c
2878 @@ -589,6 +589,9 @@ grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_d
2879diff --git a/debian/patches/ubuntu-speed-zsys-history.patch b/debian/patches/ubuntu-speed-zsys-history.patch
2880index 9d66b55..5069a77 100644
2881--- a/debian/patches/ubuntu-speed-zsys-history.patch
2882+++ b/debian/patches/ubuntu-speed-zsys-history.patch
2883@@ -1,4 +1,4 @@
2884-From 4c7457bc4f7cd1a516a7e255476a086270a4dbe4 Mon Sep 17 00:00:00 2001
2885+From 2180fd20a0bc9ddc2e43e2181959fb3f767dcabc Mon Sep 17 00:00:00 2001
2886 From: Didier Roche <didrocks@ubuntu.com>
2887 Date: Mon, 13 Apr 2020 15:12:21 +0200
2888 Subject: UBUNTU: Improve performance in bootmenu for zsys
2889@@ -17,10 +17,10 @@ Patch-Name: ubuntu-speed-zsys-history.patch
2890 1 file changed, 56 insertions(+), 21 deletions(-)
2891
2892 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2893-index efdb8afae..d748f6a20 100755
2894+index 4c48abef01..712d832802 100755
2895 --- a/util/grub.d/10_linux_zfs.in
2896 +++ b/util/grub.d/10_linux_zfs.in
2897-@@ -800,9 +800,10 @@ zfs_linux_entry () {
2898+@@ -803,9 +803,10 @@ zfs_linux_entry () {
2899 boot_device="$5"
2900 initrd="$6"
2901 kernel="$7"
2902@@ -33,7 +33,7 @@ index efdb8afae..d748f6a20 100755
2903 submenu_indentation="$(printf %${submenu_level}s | tr " " "${grub_tab}")"
2904
2905 echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
2906-@@ -837,7 +838,15 @@ zfs_linux_entry () {
2907+@@ -840,7 +841,15 @@ zfs_linux_entry () {
2908 echo "${submenu_indentation} insmod gzio"
2909 echo "${submenu_indentation} if [ \"\${grub_platform}\" = xen ]; then insmod xzio; insmod lzopio; fi"
2910
2911@@ -50,7 +50,7 @@ index efdb8afae..d748f6a20 100755
2912
2913 if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
2914 echo "${submenu_indentation} echo $(gettext_printf "Loading Linux %s ..." ${kernel_version} | grub_quote)"
2915-@@ -905,6 +914,40 @@ generate_grub_menu() {
2916+@@ -908,6 +917,40 @@ generate_grub_menu() {
2917
2918 print_menu_prologue
2919
2920@@ -91,7 +91,7 @@ index efdb8afae..d748f6a20 100755
2921 # IFS is set to TAB (ASCII 0x09)
2922 echo "${menu_metadata}" |
2923 {
2924-@@ -935,7 +978,8 @@ generate_grub_menu() {
2925+@@ -938,7 +981,8 @@ generate_grub_menu() {
2926 main_dataset_name="${name}"
2927 main_dataset="${dataset}"
2928
2929@@ -101,7 +101,7 @@ index efdb8afae..d748f6a20 100755
2930 at_least_one_entry=1
2931 ;;
2932 advanced)
2933-@@ -951,12 +995,12 @@ generate_grub_menu() {
2934+@@ -954,12 +998,12 @@ generate_grub_menu() {
2935
2936 kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
2937 title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"
2938@@ -116,7 +116,7 @@ index efdb8afae..d748f6a20 100755
2939 fi
2940 at_least_one_entry=1
2941 ;;
2942-@@ -974,33 +1018,24 @@ generate_grub_menu() {
2943+@@ -977,33 +1021,24 @@ generate_grub_menu() {
2944 fi
2945 echo " submenu '${title}' \${menuentry_id_option} 'gnulinux-history-${dataset}' {"
2946
2947diff --git a/debian/patches/ubuntu-support-initrd-less-boot.patch b/debian/patches/ubuntu-support-initrd-less-boot.patch
2948index 7fad44d..fe868ce 100644
2949--- a/debian/patches/ubuntu-support-initrd-less-boot.patch
2950+++ b/debian/patches/ubuntu-support-initrd-less-boot.patch
2951@@ -1,4 +1,4 @@
2952-From f4cacdb13661017c82bf3414833ad351146dded2 Mon Sep 17 00:00:00 2001
2953+From 102bdde2eae083973dfa11de9f6289680bb03594 Mon Sep 17 00:00:00 2001
2954 From: Chris Glass <chris.glass@canonical.com>
2955 Date: Thu, 10 Nov 2016 13:44:25 -0500
2956 Subject: UBUNTU: Added knobs to allow non-initrd boot config
2957@@ -18,7 +18,7 @@ Patch-Name: ubuntu-support-initrd-less-boot.patch
2958 4 files changed, 38 insertions(+), 4 deletions(-)
2959
2960 diff --git a/docs/grub.info b/docs/grub.info
2961-index 7cc7d9212..f804b7800 100644
2962+index 7cc7d92128..f804b7800e 100644
2963 --- a/docs/grub.info
2964 +++ b/docs/grub.info
2965 @@ -1436,6 +1436,19 @@ it must be quoted. For example:
2966@@ -42,7 +42,7 @@ index 7cc7d9212..f804b7800 100644
2967 existing configurations, but have better replacements:
2968
2969 diff --git a/docs/grub.texi b/docs/grub.texi
2970-index 3ec35d315..1baa0fa20 100644
2971+index 3ec35d315a..1baa0fa20f 100644
2972 --- a/docs/grub.texi
2973 +++ b/docs/grub.texi
2974 @@ -1541,6 +1541,19 @@ This option sets the English text of the string that will be displayed in
2975@@ -66,7 +66,7 @@ index 3ec35d315..1baa0fa20 100644
2976
2977 The following options are still accepted for compatibility with existing
2978 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2979-index 9c1da6477..29bdad0c1 100644
2980+index 9c1da64771..29bdad0c12 100644
2981 --- a/util/grub-mkconfig.in
2982 +++ b/util/grub-mkconfig.in
2983 @@ -256,7 +256,9 @@ export GRUB_DEFAULT \
2984@@ -81,7 +81,7 @@ index 9c1da6477..29bdad0c1 100644
2985 if test "x${grub_cfg}" != "x"; then
2986 rm -f "${grub_cfg}.new"
2987 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2988-index dff84edea..aa9666e5a 100644
2989+index dff84edea5..aa9666e5ad 100644
2990 --- a/util/grub.d/10_linux.in
2991 +++ b/util/grub.d/10_linux.in
2992 @@ -193,11 +193,17 @@ EOF
2993diff --git a/debian/patches/ubuntu-temp-keep-auto-nvram.patch b/debian/patches/ubuntu-temp-keep-auto-nvram.patch
2994index 03cf74c..18842f2 100644
2995--- a/debian/patches/ubuntu-temp-keep-auto-nvram.patch
2996+++ b/debian/patches/ubuntu-temp-keep-auto-nvram.patch
2997@@ -1,4 +1,4 @@
2998-From b2c200320645a00cfcb98017c9564716429723bc Mon Sep 17 00:00:00 2001
2999+From 698e98751624982b8367c1cfde1beeec0d4c5cea Mon Sep 17 00:00:00 2001
3000 From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3001 Date: Tue, 16 Jul 2019 09:52:10 -0400
3002 Subject: UBUNTU: Temporarily keep grub-install's --auto-nvram.
3003@@ -10,7 +10,7 @@ Patch-Name: ubuntu-temp-keep-auto-nvram.patch
3004 1 file changed, 3 insertions(+)
3005
3006 diff --git a/util/grub-install.c b/util/grub-install.c
3007-index 63462e4e0..bf8eb65b3 100644
3008+index 63462e4e09..bf8eb65b33 100644
3009 --- a/util/grub-install.c
3010 +++ b/util/grub-install.c
3011 @@ -98,6 +98,7 @@ enum
3012diff --git a/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch b/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
3013index 3174186..a342e2b 100644
3014--- a/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
3015+++ b/debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch
3016@@ -1,4 +1,4 @@
3017-From ec6589e2746dd882cc10122bad74b0e41074e23b Mon Sep 17 00:00:00 2001
3018+From 5b7a5ab1640387e1d0275adc5acf16918218c6d9 Mon Sep 17 00:00:00 2001
3019 From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3020 Date: Fri, 25 Oct 2019 10:25:04 -0400
3021 Subject: tpm: Pass unknown error as non-fatal, but debug print the error we
3022@@ -11,7 +11,7 @@ Patch-Name: ubuntu-tpm-unknown-error-non-fatal.patch
3023 1 file changed, 8 insertions(+), 4 deletions(-)
3024
3025 diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
3026-index 32909c192..fdbaaee19 100644
3027+index 32909c192f..fdbaaee195 100644
3028 --- a/grub-core/commands/efi/tpm.c
3029 +++ b/grub-core/commands/efi/tpm.c
3030 @@ -155,7 +155,8 @@ grub_tpm1_execute (grub_efi_handle_t tpm_handle,
3031diff --git a/debian/patches/ubuntu-zfs-enhance-support.patch b/debian/patches/ubuntu-zfs-enhance-support.patch
3032index fc0ece7..2e98aaa 100644
3033--- a/debian/patches/ubuntu-zfs-enhance-support.patch
3034+++ b/debian/patches/ubuntu-zfs-enhance-support.patch
3035@@ -1,4 +1,4 @@
3036-From daa4db81742e0363c2b8c85b6a88ec3eca1efc19 Mon Sep 17 00:00:00 2001
3037+From 0f3f67aa23be0fa1ad5e0b4cda1c4a50225b8272 Mon Sep 17 00:00:00 2001
3038 From: Didier Roche <didrocks@ubuntu.com>
3039 Date: Fri, 12 Jul 2019 11:06:06 -0400
3040 Subject: UBUNTU: Enhance ZFS grub support
3041@@ -22,12 +22,12 @@ Signed-off-by: Didier Roche <didier.roche@canonical.com>
3042 ---
3043 Makefile.util.def | 7 +
3044 util/grub.d/10_linux.in | 4 +
3045- util/grub.d/10_linux_zfs.in | 961 ++++++++++++++++++++++++++++++++++++
3046- 3 files changed, 972 insertions(+)
3047+ util/grub.d/10_linux_zfs.in | 964 ++++++++++++++++++++++++++++++++++++
3048+ 3 files changed, 975 insertions(+)
3049 create mode 100755 util/grub.d/10_linux_zfs.in
3050
3051 diff --git a/Makefile.util.def b/Makefile.util.def
3052-index 969d32f00..bac85e284 100644
3053+index 969d32f009..bac85e2840 100644
3054 --- a/Makefile.util.def
3055 +++ b/Makefile.util.def
3056 @@ -482,6 +482,13 @@ script = {
3057@@ -45,7 +45,7 @@ index 969d32f00..bac85e284 100644
3058 name = '10_xnu';
3059 common = util/grub.d/10_xnu.in;
3060 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
3061-index 4532266be..a75096609 100644
3062+index 4532266be6..a75096609a 100644
3063 --- a/util/grub.d/10_linux.in
3064 +++ b/util/grub.d/10_linux.in
3065 @@ -71,6 +71,10 @@ case x"$GRUB_FS" in
3066@@ -61,10 +61,10 @@ index 4532266be..a75096609 100644
3067 LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
3068 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
3069 new file mode 100755
3070-index 000000000..f50e1231a
3071+index 0000000000..5ec65fa941
3072 --- /dev/null
3073 +++ b/util/grub.d/10_linux_zfs.in
3074-@@ -0,0 +1,961 @@
3075+@@ -0,0 +1,964 @@
3076 +#! /bin/sh
3077 +set -e
3078 +
3079@@ -470,7 +470,10 @@ index 000000000..f50e1231a
3080 +
3081 + initrd_list=""
3082 + kernel_list=""
3083-+ for linux in $(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*'|sort -V); do
3084++ list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
3085++ while [ "x$list" != "x" ] ; do
3086++ linux=`version_find_latest $list`
3087++ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
3088 + if ! grub_file_is_not_garbage "${linux}" ; then
3089 + continue
3090 + fi
3091@@ -506,12 +509,12 @@ index 000000000..f50e1231a
3092 +
3093 + rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
3094 +
3095-+ initrd_list="${rel_linux_dirname}/${initrd}|${initrd_list}"
3096-+ kernel_list="${rel_linux_dirname}/${linux_basename}|${kernel_list}"
3097++ initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
3098++ kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
3099 + done
3100 +
3101-+ initrd_list="${initrd_list%|}"
3102-+ kernel_list="${kernel_list%|}"
3103++ initrd_list="${initrd_list#|}"
3104++ kernel_list="${kernel_list#|}"
3105 +
3106 + initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
3107 +
3108diff --git a/debian/patches/uefi-firmware-setup.patch b/debian/patches/uefi-firmware-setup.patch
3109index d6da9a6..4bf493d 100644
3110--- a/debian/patches/uefi-firmware-setup.patch
3111+++ b/debian/patches/uefi-firmware-setup.patch
3112@@ -1,4 +1,4 @@
3113-From 460169bfbef18f982e6bc0ad586c33aa0e14a316 Mon Sep 17 00:00:00 2001
3114+From e7b118f6f16c5c0b78d4963d8643d6afa72611f7 Mon Sep 17 00:00:00 2001
3115 From: Steve Langasek <steve.langasek@ubuntu.com>
3116 Date: Mon, 13 Jan 2014 12:13:12 +0000
3117 Subject: Output a menu entry for firmware setup on UEFI FastBoot systems
3118@@ -14,7 +14,7 @@ Patch-Name: uefi-firmware-setup.patch
3119 create mode 100644 util/grub.d/30_uefi-firmware.in
3120
3121 diff --git a/Makefile.util.def b/Makefile.util.def
3122-index eec1924b0..ce133e694 100644
3123+index eec1924b0e..ce133e694e 100644
3124 --- a/Makefile.util.def
3125 +++ b/Makefile.util.def
3126 @@ -526,6 +526,12 @@ script = {
3127@@ -32,7 +32,7 @@ index eec1924b0..ce133e694 100644
3128 common = util/grub.d/40_custom.in;
3129 diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
3130 new file mode 100644
3131-index 000000000..3c9f533d8
3132+index 0000000000..3c9f533d8c
3133 --- /dev/null
3134 +++ b/util/grub.d/30_uefi-firmware.in
3135 @@ -0,0 +1,46 @@
3136diff --git a/debian/patches/uefi-secure-boot-cryptomount.patch b/debian/patches/uefi-secure-boot-cryptomount.patch
3137index 8478d5d..025fcc9 100644
3138--- a/debian/patches/uefi-secure-boot-cryptomount.patch
3139+++ b/debian/patches/uefi-secure-boot-cryptomount.patch
3140@@ -1,4 +1,4 @@
3141-From ed1f06e92f0a40b338d11723e0f4008c544ef712 Mon Sep 17 00:00:00 2001
3142+From 237dfe21cf3ec834fd96b65c4691f6386dd49680 Mon Sep 17 00:00:00 2001
3143 From: =?UTF-8?q?Herv=C3=A9=20Werner?= <dud225@hotmail.com>
3144 Date: Mon, 28 Jan 2019 17:24:23 +0100
3145 Subject: Fix setup on Secure Boot systems where cryptodisk is in use
3146@@ -19,7 +19,7 @@ Patch-Name: uefi-secure-boot-cryptomount.patch
3147 1 file changed, 17 insertions(+)
3148
3149 diff --git a/util/grub-install.c b/util/grub-install.c
3150-index 030464645..4bad8de61 100644
3151+index 0304646453..4bad8de612 100644
3152 --- a/util/grub-install.c
3153 +++ b/util/grub-install.c
3154 @@ -1546,6 +1546,23 @@ main (int argc, char *argv[])
3155diff --git a/debian/patches/vsnprintf-upper-case-hex.patch b/debian/patches/vsnprintf-upper-case-hex.patch
3156index 4917b71..7385257 100644
3157--- a/debian/patches/vsnprintf-upper-case-hex.patch
3158+++ b/debian/patches/vsnprintf-upper-case-hex.patch
3159@@ -1,4 +1,4 @@
3160-From 9ec15b6602d6505bfc04dd1cd651a6c760ef4fe2 Mon Sep 17 00:00:00 2001
3161+From 03f49a87ffe7cbcf3737170935772818875ccbdb Mon Sep 17 00:00:00 2001
3162 From: Colin Watson <cjwatson@ubuntu.com>
3163 Date: Mon, 11 Mar 2019 11:15:12 +0000
3164 Subject: Add %X to grub_vsnprintf_real and friends
3165@@ -18,7 +18,7 @@ Patch-Name: vsnprintf-upper-case-hex.patch
3166 1 file changed, 5 insertions(+), 2 deletions(-)
3167
3168 diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
3169-index 3b633d51f..18cad5803 100644
3170+index 3b633d51f4..18cad5803b 100644
3171 --- a/grub-core/kern/misc.c
3172 +++ b/grub-core/kern/misc.c
3173 @@ -588,7 +588,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
3174diff --git a/debian/patches/vt-handoff.patch b/debian/patches/vt-handoff.patch
3175index 4db1344..75282e4 100644
3176--- a/debian/patches/vt-handoff.patch
3177+++ b/debian/patches/vt-handoff.patch
3178@@ -1,4 +1,4 @@
3179-From 378d93f9c2491ef7df49ed7ce3f413025998a0c0 Mon Sep 17 00:00:00 2001
3180+From 37413be89bbd62718b9a5f5295aa83ab6f7616b1 Mon Sep 17 00:00:00 2001
3181 From: Colin Watson <cjwatson@ubuntu.com>
3182 Date: Mon, 13 Jan 2014 12:13:30 +0000
3183 Subject: Add configure option to use vt.handoff=7
3184@@ -19,7 +19,7 @@ Patch-Name: vt-handoff.patch
3185 3 files changed, 65 insertions(+), 2 deletions(-)
3186
3187 diff --git a/configure.ac b/configure.ac
3188-index dbc429ce0..e382c7480 100644
3189+index dbc429ce0a..e382c7480d 100644
3190 --- a/configure.ac
3191 +++ b/configure.ac
3192 @@ -1890,6 +1890,17 @@ else
3193@@ -41,7 +41,7 @@ index dbc429ce0..e382c7480 100644
3194
3195 AC_SUBST([FONT_SOURCE])
3196 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
3197-index 09393c28e..cc2dd855a 100644
3198+index 09393c28ee..cc2dd855ab 100644
3199 --- a/util/grub.d/10_linux.in
3200 +++ b/util/grub.d/10_linux.in
3201 @@ -24,6 +24,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"
3202@@ -101,7 +101,7 @@ index 09393c28e..cc2dd855a 100644
3203 # FIXME: We need an interface to select vesafb in case efifb can't be used.
3204 if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then
3205 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
3206-index fc99f16e7..b636dc7bb 100755
3207+index 8cd7d12851..48a4e68976 100755
3208 --- a/util/grub.d/10_linux_zfs.in
3209 +++ b/util/grub.d/10_linux_zfs.in
3210 @@ -23,6 +23,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"
3211@@ -112,7 +112,7 @@ index fc99f16e7..b636dc7bb 100755
3212
3213 . "${pkgdatadir}/grub-mkconfig_lib"
3214
3215-@@ -718,6 +719,23 @@ generate_grub_menu_metadata() {
3216+@@ -721,6 +722,23 @@ generate_grub_menu_metadata() {
3217 # Note:
3218 # If 10_linux runs these part will be defined twice in grub configuration
3219 print_menu_prologue() {
3220@@ -136,7 +136,7 @@ index fc99f16e7..b636dc7bb 100755
3221 # Use ELILO's generic "efifb" when it's known to be available.
3222 # FIXME: We need an interface to select vesafb in case efifb can't be used.
3223 GRUB_GFXPAYLOAD_LINUX="${GRUB_GFXPAYLOAD_LINUX:-}"
3224-@@ -813,7 +831,7 @@ zfs_linux_entry () {
3225+@@ -816,7 +834,7 @@ zfs_linux_entry () {
3226
3227 if ([ "${ubuntu_recovery}" = 0 ] || [ "${type}" != "recovery" ]) && \
3228 ([ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 1 ]); then
3229@@ -145,7 +145,7 @@ index fc99f16e7..b636dc7bb 100755
3230 fi
3231
3232 echo "${submenu_indentation} insmod gzio"
3233-@@ -876,6 +894,14 @@ generate_grub_menu() {
3234+@@ -879,6 +897,14 @@ generate_grub_menu() {
3235 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
3236 fi
3237
3238diff --git a/debian/patches/wubi-no-windows.patch b/debian/patches/wubi-no-windows.patch
3239index 29350c5..47385b7 100644
3240--- a/debian/patches/wubi-no-windows.patch
3241+++ b/debian/patches/wubi-no-windows.patch
3242@@ -1,4 +1,4 @@
3243-From e683b76e9278216d50c327b71dfbb7b722385503 Mon Sep 17 00:00:00 2001
3244+From 5d7c681c059de5af7dda174c8375c0cbfaa2d45a Mon Sep 17 00:00:00 2001
3245 From: Colin Watson <cjwatson@ubuntu.com>
3246 Date: Mon, 13 Jan 2014 12:13:24 +0000
3247 Subject: Skip Windows os-prober entries on Wubi systems
3248@@ -19,7 +19,7 @@ Patch-Name: wubi-no-windows.patch
3249 1 file changed, 19 insertions(+)
3250
3251 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
3252-index b7e1147c4..271044f59 100644
3253+index b7e1147c41..271044f592 100644
3254 --- a/util/grub.d/30_os-prober.in
3255 +++ b/util/grub.d/30_os-prober.in
3256 @@ -110,6 +110,8 @@ EOF
3257diff --git a/debian/patches/zpool-full-device-name.patch b/debian/patches/zpool-full-device-name.patch
3258index 09e00fc..f23b055 100644
3259--- a/debian/patches/zpool-full-device-name.patch
3260+++ b/debian/patches/zpool-full-device-name.patch
3261@@ -1,4 +1,4 @@
3262-From 5bea13466c5d9048cf20139498dcba94f5500477 Mon Sep 17 00:00:00 2001
3263+From 45859b7aff8eb963b8dcb4b83c19579f8687a637 Mon Sep 17 00:00:00 2001
3264 From: Chad MILLER <chad.miller@canonical.com>
3265 Date: Thu, 27 Oct 2016 17:15:07 -0400
3266 Subject: Tell zpool to emit full device names
3267@@ -20,7 +20,7 @@ Patch-Name: zpool-full-device-name.patch
3268 1 file changed, 1 insertion(+)
3269
3270 diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
3271-index 46d7116c6..da102918d 100644
3272+index 46d7116c6e..da102918dc 100644
3273 --- a/grub-core/osdep/unix/getroot.c
3274 +++ b/grub-core/osdep/unix/getroot.c
3275 @@ -243,6 +243,7 @@ grub_util_find_root_devices_from_poolname (char *poolname)
3276diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
3277index ccb4b16..210201d 100644
3278--- a/grub-core/disk/loopback.c
3279+++ b/grub-core/disk/loopback.c
3280@@ -86,7 +86,8 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
3281 return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
3282
3283 file = grub_file_open (args[1], GRUB_FILE_TYPE_LOOPBACK
3284- | GRUB_FILE_TYPE_NO_DECOMPRESS);
3285+ | GRUB_FILE_TYPE_NO_DECOMPRESS |
3286+ GRUB_FILE_TYPE_SKIP_SIGNATURE);
3287 if (! file)
3288 return grub_errno;
3289
3290diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
3291index 72f1e25..6c8988f 100644
3292--- a/util/grub-mkconfig.in
3293+++ b/util/grub-mkconfig.in
3294@@ -260,7 +260,8 @@ export GRUB_DEFAULT \
3295 GRUB_RECORDFAIL_TIMEOUT \
3296 GRUB_RECOVERY_TITLE \
3297 GRUB_FORCE_PARTUUID \
3298- GRUB_DISABLE_INITRD
3299+ GRUB_DISABLE_INITRD \
3300+ GRUB_FLAVOUR_ORDER
3301
3302 if test "x${grub_cfg}" != "x"; then
3303 rm -f "${grub_cfg}.new"
3304diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
3305index fe6319a..7e2d1bc 100644
3306--- a/util/grub-mkconfig_lib.in
3307+++ b/util/grub-mkconfig_lib.in
3308@@ -270,6 +270,21 @@ version_test_gt ()
3309 if [ "x$version_test_gt_b" = "x" ] ; then
3310 return 0
3311 fi
3312+
3313+ # GRUB_FLAVOUR_ORDER is an ordered list of kernels, in decreasing
3314+ # priority. Any items in the list take precedence over other kernels,
3315+ # and earlier flavours are preferred over later ones.
3316+ for flavour in ${GRUB_FLAVOUR_ORDER:-}; do
3317+ version_test_gt_a_preferred=$(echo "$version_test_gt_a" | grep -- "-[0-9]*-$flavour\$")
3318+ version_test_gt_b_preferred=$(echo "$version_test_gt_b" | grep -- "-[0-9]*-$flavour\$")
3319+
3320+ if [ -n "$version_test_gt_a_preferred" -a -z "$version_test_gt_b_preferred" ] ; then
3321+ return 0
3322+ elif [ -z "$version_test_gt_a_preferred" -a -n "$version_test_gt_b_preferred" ] ; then
3323+ return 1
3324+ fi
3325+ done
3326+
3327 case "$version_test_gt_a:$version_test_gt_b" in
3328 *.old:*.old) ;;
3329 *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
3330diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
3331index 3eb0e69..49e6272 100644
3332--- a/util/grub.d/10_linux.in
3333+++ b/util/grub.d/10_linux.in
3334@@ -245,6 +245,14 @@ EOF
3335 linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
3336 fi
3337 message="$(gettext_printf "Loading initial ramdisk ...")"
3338+ initrd_path=
3339+ for i in ${initrd}; do
3340+ initrd_path="${initrd_path} ${rel_dirname}/${i}"
3341+ done
3342+ initrd_path_only_early=
3343+ for i in ${initrd_early}; do
3344+ initrd_path_only_early="${initrd_path_only_early} ${rel_dirname}/${i}"
3345+ done
3346 if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
3347 sed "s/^/$submenu_indentation/" << EOF
3348 if [ "\${initrdfail}" = 1 ]; then
3349@@ -255,11 +263,17 @@ EOF
3350 echo '$(echo "$message" | grub_quote)'
3351 EOF
3352 fi
3353-
3354 sed "s/^/$submenu_indentation/" << EOF
3355- initrd ${rel_dirname}/${initrd}
3356+ initrd $(echo $initrd_path)
3357 else
3358 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
3359+EOF
3360+ if [ -n "$initrd_path_only_early" ]; then
3361+ sed "s/^/$submenu_indentation/" << EOF
3362+ initrd $(echo $initrd_path_only_early)
3363+EOF
3364+ fi
3365+ sed "s/^/$submenu_indentation/" << EOF
3366 fi
3367 initrdfail
3368 EOF
3369@@ -277,7 +291,7 @@ EOF
3370 EOF
3371 fi
3372 sed "s/^/$submenu_indentation/" << EOF
3373- initrd ${rel_dirname}/${initrd}
3374+ initrd $(echo $initrd_path)
3375 EOF
3376 fi
3377 fi
3378@@ -320,6 +334,10 @@ case "$machine" in
3379 *) GENKERNEL_ARCH="$machine" ;;
3380 esac
3381
3382+case "$GENKERNEL_ARCH" in
3383+ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
3384+esac
3385+
3386 prepare_boot_cache=
3387 prepare_root_cache=
3388 boot_device_id=
3389@@ -418,10 +436,7 @@ while [ "x$list" != "x" ] ; do
3390
3391 initrd=
3392 if test -n "${initrd_early}" || test -n "${initrd_real}"; then
3393- initrd="${initrd_real}"
3394- if test -n "${initrd_early}"; then
3395- initrd="${initrd_early} ${initrd}"
3396- fi
3397+ initrd="${initrd_early} ${initrd_real}"
3398
3399 initrd_display=
3400 for i in ${initrd}; do
3401diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
3402index d748f6a..d9b79e2 100755
3403--- a/util/grub.d/10_linux_zfs.in
3404+++ b/util/grub.d/10_linux_zfs.in
3405@@ -41,6 +41,16 @@ imported_pools=""
3406 MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
3407 ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
3408
3409+
3410+machine="$(uname -m)"
3411+case "${machine}" in
3412+ i?86) GENKERNEL_ARCH="x86" ;;
3413+ mips|mips64) GENKERNEL_ARCH="mips" ;;
3414+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
3415+ arm*) GENKERNEL_ARCH="arm" ;;
3416+ *) GENKERNEL_ARCH="${machine}" ;;
3417+esac
3418+
3419 RC=0
3420 on_exit() {
3421 # Restore initial zpool import state
3422@@ -407,18 +417,12 @@ get_dataset_info() {
3423 return
3424 fi
3425
3426- machine="$(uname -m)"
3427- case "${machine}" in
3428- i?86) GENKERNEL_ARCH="x86" ;;
3429- mips|mips64) GENKERNEL_ARCH="mips" ;;
3430- mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
3431- arm*) GENKERNEL_ARCH="arm" ;;
3432- *) GENKERNEL_ARCH="${machine}" ;;
3433- esac
3434-
3435 initrd_list=""
3436 kernel_list=""
3437- for linux in $(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*'|sort -V); do
3438+ list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
3439+ while [ "x$list" != "x" ] ; do
3440+ linux=`version_find_latest $list`
3441+ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
3442 if ! grub_file_is_not_garbage "${linux}" ; then
3443 continue
3444 fi
3445@@ -465,12 +469,12 @@ get_dataset_info() {
3446
3447 rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
3448
3449- initrd_list="${rel_linux_dirname}/${initrd}|${initrd_list}"
3450- kernel_list="${rel_linux_dirname}/${linux_basename}|${kernel_list}"
3451+ initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
3452+ kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
3453 done
3454
3455- initrd_list="${initrd_list%|}"
3456- kernel_list="${kernel_list%|}"
3457+ initrd_list="${initrd_list#|}"
3458+ kernel_list="${kernel_list#|}"
3459
3460 initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
3461
3462@@ -904,6 +908,11 @@ generate_grub_menu() {
3463 GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
3464 fi
3465
3466+ case "$GENKERNEL_ARCH" in
3467+ x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
3468+ esac
3469+
3470+
3471 if [ "${vt_handoff}" = 1 ]; then
3472 for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
3473 if [ "${word}" = splash ]; then

Subscribers

People subscribed via source and target branches