Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

ZFS root genkernel initial boot "invalid module format"


p-chan

Question

I'm attempting to set up a ZFS root system and am using genkernel.  I've got the zfs-0.8.0-rc3 build for ZFS installed which has the proper initrd scripts to do encrypted datasets.  I installed ZFS in the chroot environment and installed genkernel-next, ran genkernel --bootloader=grub --zfs all  and after all was built, rebooted.  I was then prompted with initramfs exiting that it couldn't load the ZFS modules with the error "Invalid Module Format"

The original system I used for the install was the Ubuntu server CD, because it lets me install a build environment to compile ZFS in order to create/import the pool with version 0.8.0-rc3.

This is basically how I did this (from the Ubuntu install CD), these more more notes than actual step by step instructions:

#Setup build environment for ZFS

sudo apt-get install build-essential autoconf libtool gawk alien fakeroot zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev parted lsscsi ksh libssl-dev libelf-dev linux-headers-$(uname -r)

#Copy modules to tmp and do a bind, this is to allow writing to /lib/modules which is needed for the install of the ZFS modules for the initial boot env

cp -R /lib/modules /tmp/
mount --bind /tmp/modules /lib/modules

#Get specifically 0.8.0-rc3, which incorporates dataset encryption

git clone -b 'zfs-0.8.0-rc3' https://github.com/zfsonlinux/zfs

./autogen.sh
./configure
make -s -j$(nproc)
make install
modprobe zfs

I then did the appropriate mounts and chroot and from there I installed the 0.8.0-rc3 ZFS package (keywords updates required, since it's not stable), grub, genkernel.

I plan to tar this installation up and move it to a server host when I'm done, it's in a VM for now.

 

 

Errors also include "spl: disagrees about version of symbol module_layout" and "modprobe: can't load module spl extra/spl/spl.ko): invalid module format"

 

While I await someone who might have some answers, I'm working on building a custom Funtoo LiveCD with the ZFS modules built in.  I'm using the guide from https://www.funtoo.org/Make_your_own_LiveCD_using_Funtoo_Linux

During my build of the LiveCD, I came across the "emerge -C sys-kernel/debian-sources-lts" command and it's been ages since I worked with Gentoo/Funtoo, but it reminded me that maybe I need to adjust/check my kernel sources (I had deleted the kernels/initrd images from the debain sources in /boot, but I didn't unmerge the packages) - so I removed them and am now installing gentoo-sources, to then re-compile zfs and re-run genkernel against this.  Hopefully this proves fruitful. 

Ok, with gentoo-sources and a clean /usr/src with proper linux symlink and a re-compile/reinstall of zfs and a fresh run of genkernel --bootloader=grub --zfs all - I am now missing the ZFS modules (in initramfs), I run modprobe zfs and I get module zfs not found in modules.dep when I try modprobe zfs (and I searched /lib/modules and found no zfs modules).  Grrr.... maybe this is because it's been so long since I used Gentoo/Funtoo, maybe I'm missing something basic and stupid. 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

×
×
  • Create New...