Actually, the root cause was the fact that /boot/efi was mounted before /boot, "ls /boot/efi" returned nothing.
This can be solved by properly activating zfs-mount-generator which creates one unit per mountpoint as mentioned in #1904764. To do this, I ran the following script (but there is also an example which relies on zfs-sed in the manpage: https://openzfs.github.io/openzfs-docs/man/master/8/zfs-mount-generator.8.html#EXAMPLES). PROPS="name,mountpoint,canmount,atime,relatime,devices,exec\ ,readonly,setuid,nbmand,encroot,keylocation\ ,org.openzfs.systemd:requires,org.openzfs.systemd:requires-mounts-for\ ,org.openzfs.systemd:before,org.openzfs.systemd:after\ ,org.openzfs.systemd:wanted-by,org.openzfs.systemd:required-by\ ,org.openzfs.systemd:nofail,org.openzfs.systemd:ignore" mkdir /etc/zfs/zfs-list.cache/ zpool list -H -o name | while IFS= read -r pool; do zfs list -H -t filesystem -o "$PROPS" -r "$pool" > "/etc/zfs/zfs-list.cache/$pool" done At the next boot, there was a separate boot.mount unit which was activated before boot-efi.mount, so the extraneous "boot/efi" directory inside the / pool was no longer present. ** Tags removed: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2110042 Title: grub-mkconfig fails with separate ZFS /boot on EFI systems: "Warning: didn't find any valid initrd or kernel" To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2110042/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
