In an initramfs generated with genkernel 3.4.36 and hardened-sources 3.4.2-hardened-r1 using: # genkernel all --no-clean --no-mountboot --no-lvm --no-mdadm --no-dmraid --no-multipath --no-iscsi --no-disklabel --no-gpg --luks --zfs --bootloader=grub2 --callback="module-rebuild rebuild" --makeopts=-j12 , the ZFS mounting code endlessly prints "sh: 1: unknown operand" if real_root=ZFS but no ZFS filesystem is marked with "bootfs". This problem went away when I set real_root=ZFS=rpool/ROOT/gentoo, or marked rpool/ROOT/gentoo with "bootfs" using: # zpool set bootfs=rpool/ROOT/gentoo rpool There should be a better error message in this case, rather than an endless stream of "unknown operand". My relevant /boot/grub2/grub.cfg lines were: echo 'Loading Linux x86_64-3.4.2-hardened-r1 ...' linux /kernel-genkernel-x86_64-3.4.2-hardened-r1 crypt_root=/dev/sda2 dozfs=force real_root=ZFS ro echo 'Loading initial ramdisk ...' initrd /initramfs-genkernel-x86_64-3.4.2-hardened-r1 My rpool filesystems: # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 3.65G 74.6G 136K none rpool/GENTOO 1.11G 74.6G 136K none rpool/GENTOO/distfiles 186M 74.6G 186M /mnt/gentoo/usr/portage/distfiles rpool/GENTOO/packages 136K 74.6G 136K /mnt/gentoo/usr/portage/packages rpool/GENTOO/portage 952M 74.6G 952M /mnt/gentoo/usr/portage rpool/HOME 39.1M 74.6G 136K /mnt/gentoo/home rpool/HOME/root 39.0M 74.6G 39.0M /mnt/gentoo/root rpool/ROOT 2.50G 74.6G 136K none rpool/ROOT/gentoo 2.50G 74.6G 2.50G /mnt/gentoo
Thanks for the report. I missed this case when I was working on genkernel support. I will fix it in the next few days. If I do not fix it within a week, feel free to ping me in IRC.
Fixed in GIT. This will be in genkernel 3.2.39.