# root on ZFS, zfs.ko module not loading [SOLVED]

## plut0

I'm building initramfs using genkernel as follows:

```
genkernel initramfs --no-clean --zfs --callback="module-rebuild rebuild"
```

The grub2 config shows:

```
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/dev/sda2

/dev/sdb2' {

  load_video

  set gfxpayload=keep

  insmod gzio

  insmod part_gpt

  insmod part_gpt

  insmod diskfilter

  insmod mdraid1x

  insmod ext2

  insmod zfs

  set root='mduuid/9782c7961b3c02f54ee335fe2b9c50c3'

  if [ x$feature_platform_search_hint = xy ]; then

    search --no-floppy --fs-uuid --set=root --hint='mduuid/9782c7961b3c02f54ee335fe2b9c50c3'  f0b27f81-3381-4747-9821-4898269bda7b

  else

    search --no-floppy --fs-uuid --set=root f0b27f81-3381-4747-9821-4898269bda7b

  fi

  echo  'Loading Linux x86_64-3.4.5-hardened ...'

  linux /kernel-genkernel-x86_64-3.4.5-hardened domdadm dozfs=force root=ZFS=rpool/gaia real_root=ZFS=rpool/gaia ro

  echo  'Loading initial ramdisk ...'

  initrd  /initramfs-genkernel-x86_64-3.4.5-hardened

}
```

However, booting always fails with:

```
Importing ZFS pool rpool

Failed to load ZFS module stack

Load the module manually by running 'insmod <location>/zfs.ko' as root.

Failed to load ZFS module stack

Load the module manually by running 'insmod <location>/zfs.ko' as root.

!!! Importing rpool failed

>>> Determining root device...

Failed to load ZFS module stack

Load the module manually by running 'insmod <location>/zfs.ko' as root.

Failed to load ZFS module stack

Load the module manually by running 'insmod <location>/zfs.ko' as root.

!! rpool/gaia is not a filesystem

!! Could not find the root block device in ZFS=rpool/gaia.

Please specify another value or: Press enter for the same, type "shell" for a shell, or "q" to skip...

root block device(ZFS=rpool/gaia) ::
```

Now...if I go to a shell, I can get things working as follows:

```
modprobe zfs # this fails

insmod /lib/modules/3.4.5-hardened/addon/zfs/zfs/zfs.ko # this works

zpool import -f rpool
```

Why oh why does the zfs module fail to load automatically but works fine when I do it manually?

EDIT: I fixed it. I had an module option set for zfs with incorrect parameters that was causing it not to load automatically.

----------

## splurben

 *plut0 wrote:*   

> 
> 
> Why oh why does the zfs module fail to load automatically but works fine when I do it manually?
> 
> EDIT: I fixed it. I had an module option set for zfs with incorrect parameters that was causing it not to load automatically.

 

I'm experiencing this problem, which parameters were incorrect? Please

----------

