--- /etc/grub.d/10_linux.orig 2021-08-12 11:18:25.000000000 +0200 +++ /etc/grub.d/10_linux 2021-11-05 03:01:45.712228784 +0100 @@ -135,6 +135,15 @@ exit 0 fi rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` + # JEL: + # bogus/debian castrated grub isn't able to determine the root poolname + # properly because it simply does a 'zpool status' and prefixes all + # device basenames with '/dev/'. Therefore /dev/chassis/SYS/HDD0/HDD0p2 + # and the like let grub explode. + if [ "x${rpool}" = "x" ]; then + rpool=`df / | awk '{ if ( $6 == "/" ) { split($1,a,"/"); print a[1];}}'` + [ "x${rpool}" = "x" ] && rpool='rpool' + fi bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}" ;; --- /etc/grub.d/10_linux_zfs.orig 2021-11-05 03:07:29.844243299 +0100 +++ /etc/grub.d/10_linux_zfs 2021-11-05 03:16:31.900266162 +0100 @@ -1,6 +1,14 @@ #! /bin/sh set -e +# JEL +# Da die Ubuntu-Pfuscher keine Ahnung von POSIX haben, schnallen die auch nicht, +# daß das in dem script [indirect] verwendete mount nicht POSIX konforme ist, +# und fehlschlägt, wenn POSIXLY_CORRECT gesetzt ist (denn das verwendete getopt +# versteht das schon ...). Anyway, das führt dann dazu, daß das erzeugte Grub- +# Menu leer ist und beim nächsten reboot: tata - happy grubbing ... +unset POSIXLY_CORRECT + # grub-mkconfig helper script. # Copyright (C) 2019 Canonical Ltd. #