From aa5e6b31b35b3cbdc59747e2b2cf33c4bdaeae95 Mon Sep 17 00:00:00 2001 From: Julian Wiesener Date: Mon, 19 Jan 2015 14:28:14 +0200 Subject: [PATCH] grub: fallback for failed grub-probe on zfs in mkconfig --- srcpkgs/grub/patches/mkconfig_zfs.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 srcpkgs/grub/patches/mkconfig_zfs.patch diff --git a/srcpkgs/grub/patches/mkconfig_zfs.patch b/srcpkgs/grub/patches/mkconfig_zfs.patch new file mode 100644 index 00000000000..686f28e6b91 --- /dev/null +++ b/srcpkgs/grub/patches/mkconfig_zfs.patch @@ -0,0 +1,12 @@ +--- ./util/grub.d/10_linux.in 2015-01-19 13:30:29.490090317 +0200 ++++ ./util/grub.d/10_linux.in 2015-01-19 13:29:41.234754594 +0200 +@@ -67,6 +67,9 @@ + xzfs) + rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` + bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" ++ if [ -z "${rpool}" ]; then ++ rpool=$(zfs list -Ho name -t filesystem | grep -m1 "${bootfs}$" | sed 's/\/.*//') ++ fi + LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}" + ;; + esac