Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425120 - initramfs ZFS mounter prints "sh: 1: unknown operand" endlessly with real_root=ZFS and no bootfs marked
Summary: initramfs ZFS mounter prints "sh: 1: unknown operand" endlessly with real_roo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords: Bug, REGRESSION
Depends on:
Blocks:
 
Reported: 2012-07-06 22:45 UTC by ivan+gentoo
Modified: 2012-07-17 20:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan+gentoo 2012-07-06 22:45:38 UTC
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
Comment 1 Richard Yao (RETIRED) gentoo-dev 2012-07-07 09:29:30 UTC
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.
Comment 2 Richard Yao (RETIRED) gentoo-dev 2012-07-17 20:23:29 UTC
Fixed in GIT. This will be in genkernel 3.2.39.