I have the same issue with booting straight into memtest. I wish I knew why "set -u" was added to /etc/grub.d/10_linux_zfs as it's easy to see that it was added; it is not easy to see why it was added. "set -u" appears to be a significant factor in why zfs grub is failing. sudo grub-mkconfig [...skip some output...] ### BEGIN /etc/grub.d/10_linux_zfs ### /etc/grub.d/10_linux_zfs: 229: version_sort_sort_has_v: parameter not set Warning: didn't find any valid initrd or kernel. ### END /etc/grub.d/10_linux_zfs ### grub-mkconfig works if I comment out the 'set -u' like this: $ diff -u ~/10_linux_zfs-grub-4ubuntu1 10_linux_zfs --- /home/user/10_linux_zfs-grub-4ubuntu1 2023-08-29 08:53:42.056383448 -0400 +++ 10_linux_zfs 2023-08-29 08:53:57.896516515 -0400 @@ -30,7 +30,7 @@ export TEXTDOMAIN=grub export TEXTDOMAINDIR="${datarootdir}/locale" -set -u +# set -u ## Skip early if zfs utils isn't installed (instead of failing on first zpool list) if ! `which zfs >/dev/null 2>&1`; then $ sudo grub-mkconfig > /dev/null Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... jFound linux image: vmlinuz-6.3.0-7-generic in rpool/ROOT/ubuntu_via8pv Found initrd image: initrd.img-6.3.0-7-generic in rpool/ROOT/ubuntu_via8pv Found linux image: vmlinuz-6.2.0-21-generic in rpool/ROOT/ubuntu_via8pv Found initrd image: initrd.img-6.2.0-21-generic in rpool/ROOT/ubuntu_via8pv Found memtest86+x64 image: /BOOT/ubuntu_via8pv@/memtest86+x64.bin Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done $ sudo dpkg-reconfigure grub-pc grub-pc: Running grub-install ... Installing for i386-pc platform. Installation finished. No error reported. grub-install success for /dev/vda Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: vmlinuz-6.3.0-7-generic in rpool/ROOT/ubuntu_via8pv Found initrd image: initrd.img-6.3.0-7-generic in rpool/ROOT/ubuntu_via8pv Found linux image: vmlinuz-6.2.0-21-generic in rpool/ROOT/ubuntu_via8pv Found initrd image: initrd.img-6.2.0-21-generic in rpool/ROOT/ubuntu_via8pv Found memtest86+x64 image: /BOOT/ubuntu_via8pv@/memtest86+x64.bin Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done Once 'set -u' is commented out, the system boots from zfs and displays the login screen instead of memtest. Versions I tested with: $ dpkg -l | grep grub ii grub-common 2.12~rc1-4ubuntu2 amd64 GRand Unified Bootloader (common files) ii grub-efi-amd64-bin 2.12~rc1-4ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 modules) ii grub-efi-amd64-signed 1.194+2.12~rc1-4ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed) ii grub-gfxpayload-lists 0.7 amd64 GRUB gfxpayload blacklist ii grub-pc 2.12~rc1-4ubuntu2 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version) ii grub-pc-bin 2.12~rc1-4ubuntu2 amd64 GRand Unified Bootloader, version 2 (PC/BIOS modules) ii grub2-common 2.12~rc1-4ubuntu2 amd64 GRand Unified Bootloader (common files for version 2)