aports/main/grub/0004-Handle-encrypted-zfs-root-partition.patch
Dermot Bradley 0f3c992e98 main/grub: upgrade to 2.12
Upgrade to Grub 2.12.

Remove patches no longer required and rename/tweak existing patches
still required.

Add a minor fix to get Grub 2.12 to build (upstream forgot to include
a necessary, but empty, file that build requires.
2024-01-04 11:18:16 +00:00

34 lines
1.3 KiB
Diff

0979d0808c8d977cebe4715c729295d485c12725 Handle encrypted zfs root partition
util/grub.d/10_linux.in | 2 +-
util/grub.d/20_linux_xen.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 4e5f71f0b..7afa1fd2f 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -73,7 +73,7 @@ case x"$GRUB_FS" in
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi;;
xzfs)
- rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
+ rpool="`blkid -o value -s LABEL ${GRUB_DEVICE}`"
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
;;
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 15319fe06..8656bb453 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -81,7 +81,7 @@ case x"$GRUB_FS" in
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi;;
xzfs)
- rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
+ rpool="`blkid -o value -s LABEL ${GRUB_DEVICE}`"
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
;;
--
2.39.2