Hello,
I've created a patch for util/grub.d/
10_linux.in for dynamic ZFS boot environment entries. I've only tested the patch in Ubuntu 16.04.2 with GRUB 2.02~beta2, ZFS on Linux 0.6.5.6, Linux 4.4.0-83 and 4.4.0-81, but the patch should work with any root ZFS configuration, because it only changes the 10_linux shell script. It is designed to work with FreeBSD's beadm tool, for which I'm currently making a Debian package, but isn't dependent on beadm. I added the patch as an attachment and would like to request a review.
Thanks.