I modified 10_linux_zfs to comment out the set -e and add the variables for pkgdatadir and the GRUB* variables from /etc/default/grub and ran it to see the output.
Notice at the end the double brace, lack of initrd value and linux image even though it was found at the beginning when it correctly identified the root dataset.
jpb@explorer:~/test$ sudo ./10_linux_zfs
Found linux image: vmlinuz-5.0.0-29-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-29-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-31-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-31-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-32-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-32-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.3.0-18-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.3.0-18-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-23-generic in rpool/ROOT/ubuntu@pyznap_2019-08-18_14:11:36_monthly
Found initrd image: initrd.img-5.0.0-23-generic in rpool/ROOT/ubuntu@pyznap_2019-08-18_14:11:36_monthly
********** removed a ton of snapshots that were listed which found the linux image and initrd image. *****************
Found linux image: vmlinuz-5.3.0-18-generic in rpool/ROOT/ubuntu@apt2019-10-19_08.52.43--1w
Found initrd image: initrd.img-5.3.0-18-generic in rpool/ROOT/ubuntu@apt2019-10-19_08.52.43--1w
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=1
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu 19.10' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-rpool/ROOT/ubuntu-' {
recordfail
load_video
gfxmode ${linux_gfx_mode}
insmod gzio
if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod zfs
set root='hd2,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1 ba04856b80ac4244
else
search --no-floppy --fs-uuid --set=root ba04856b80ac4244
fi
linux root=ZFS=rpool/ROOT/ubuntu ro intel_iommu=on iommu=pt quiet splash intel_iommu=on iommu=pt rootdelay=3 zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=z3fold ${vt_handoff}
initrd
}
}
I modified 10_linux_zfs to comment out the set -e and add the variables for pkgdatadir and the GRUB* variables from /etc/default/grub and ran it to see the output.
Notice at the end the double brace, lack of initrd value and linux image even though it was found at the beginning when it correctly identified the root dataset.
jpb@explorer: ~/test$ sudo ./10_linux_zfs 5.0.0-29- generic in rpool/ROOT/ubuntu img-5.0. 0-29-generic in rpool/ROOT/ubuntu 5.0.0-31- generic in rpool/ROOT/ubuntu img-5.0. 0-31-generic in rpool/ROOT/ubuntu 5.0.0-32- generic in rpool/ROOT/ubuntu img-5.0. 0-32-generic in rpool/ROOT/ubuntu 5.3.0-18- generic in rpool/ROOT/ubuntu img-5.3. 0-18-generic in rpool/ROOT/ubuntu 5.0.0-23- generic in rpool/ROOT/ ubuntu@ pyznap_ 2019-08- 18_14:11: 36_monthly img-5.0. 0-23-generic in rpool/ROOT/ ubuntu@ pyznap_ 2019-08- 18_14:11: 36_monthly
Found linux image: vmlinuz-
Found initrd image: initrd.
Found linux image: vmlinuz-
Found initrd image: initrd.
Found linux image: vmlinuz-
Found initrd image: initrd.
Found linux image: vmlinuz-
Found initrd image: initrd.
Found linux image: vmlinuz-
Found initrd image: initrd.
********** removed a ton of snapshots that were listed which found the linux image and initrd image. *****************
Found linux image: vmlinuz- 5.3.0-18- generic in rpool/ROOT/ ubuntu@ apt2019- 10-19_08. 52.43-- 1w img-5.3. 0-18-generic in rpool/ROOT/ ubuntu@ apt2019- 10-19_08. 52.43-- 1w
Found initrd image: initrd.
function gfxmode { vt.handoff= 1 /gfxblacklist. txt ]; then /gfxblacklist. txt 3; then id_option} 'gnulinux- rpool/ROOT/ ubuntu- ' { platform_ search_ hint = xy ]; then bios=hd2, gpt1 --hint-efi=hd2,gpt1 --hint- baremetal= ahci2,gpt1 ba04856b80ac4244 rpool/ROOT/ ubuntu ro intel_iommu=on iommu=pt quiet splash intel_iommu=on iommu=pt rootdelay=3 zswap.enabled=1 zswap.compresso r=lz4 zswap.zpool=z3fold ${vt_handoff}
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}
if hwmatch ${prefix}
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu 19.10' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_
recordfail
load_video
gfxmode ${linux_gfx_mode}
insmod gzio
if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod zfs
set root='hd2,gpt1'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root ba04856b80ac4244
fi
linux root=ZFS=
initrd
}
}