Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs-9999 + genkernel-3.5.0.5/9999 - block device mypool/ds is not a valid block device #5197

Closed
bunder2015 opened this issue Sep 30, 2016 · 6 comments

Comments

@bunder2015
Copy link
Contributor

bunder2015 commented Sep 30, 2016

could not boot latest head (as of 09/27) with newer genkernel (which should have the fix for the libgcc_s bug). pool gets imported but doesn't get mounted anywhere.

Importing ZFS pool mypool
Import of mypool succeeded
Determining block device

Block device mypool/ds is not a valid block device
Could not find the root block device in . 
Please specify a new value (blah blah blah)
@GregorKopka
Copy link
Contributor

This looks like gentoo and from my experience is very likely related to a wrong grub configuration or a zpool.cache file that made it into the initramfs.

Did your ZFS root before (re)emerging zfs-9999, if so with what version?

@bunder2015
Copy link
Contributor Author

Yes, this is on gentoo. Boot works just fine on an older git version from June-ish (0.6.5-329_g5c27b29 is what is reported from "modinfo zfs").

@GregorKopka
Copy link
Contributor

Working entry in my grub.cfg:

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4512c8b427c4d8ff' {
        load_video
        if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
        fi
        insmod gzio
        insmod part_gpt
        insmod part_gpt
        insmod zfs
        echo    'Loading Linux x86_64-4.4.6-gentoo ...'
        linux   /ROOT/gentoo@/boot/kernel-genkernel-x86_64-4.4.6-gentoo root=ZFS=boot/ROOT/gentoo ro
        echo    'Loading initial ramdisk ...'
        initrd  /ROOT/gentoo@/boot/initramfs-genkernel-x86_64-4.4.6-gentoo
}

From memory what I have done to get it booting:

Removed this block

                set root='hd0,gpt1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  --hint-bios=hd3,gpt1 --hint-efi=hd3,gpt1 --hint-baremetal=ahci3,gpt1  4512c8b427c4d8ff
                else
                  search --no-floppy --fs-uuid --set=root 4512c8b427c4d8ff
                fi

from the grub menu entry since it seems to interfere in locating root

Also quite important was to rename /etc/zfs/zpool.cache prior to creating the initramfs with

genkernel all --clean --no-mountboot --zfs --bootloader=grub2 --callback="emerge @module-rebuild spl zfs-kmod zfs"

(extra --callback list to have zfs-kmod recompile). My guess is the zpool.cache in the initrd fucked it up pretty good, since every time I forgot to move it away I had to recover.

Hope this helps.

@markwright
Copy link
Contributor

I think it is a Gentoo genkernel bug, so I raised a bug report and proposed a patch for you to please try here:

https://bugs.gentoo.org/show_bug.cgi?id=597154

If you agree please continue the discussion in the above Gentoo bug report, thanks.

@GregorKopka
Copy link
Contributor

Gentoo patch looks reasonable: a ZFS filesystem isn't a block device by definition.
As it dosn't seem to be a bug in ZoL I think you can close this one here.

@behlendorf
Copy link
Contributor

Agreed, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants