ZFS support in mkinitfs
Using Alpine 3.6.2 I have been experimenting with ZFS root inside of a virtual machine.
Setup: / is on rpool/ROOT/alpine, /home is on rpool/home. No separate boot is used.
Grub is not able to generate grub.cfg, so I created one manually:
set timeout=10
menuentry "Alpine Linux" {
insmod part_gpt
insmod zfs
set root='hd0,gpt1'
linux /ROOT/alpine@/boot/vmlinuz-hardened root=ZFS=rpool/ROOT/alpine
initrd /ROOT/alpine@/boot/initramfs-hardened
}
mkinitfs got the zfs feature acticated
Bug 1: It is booting kernel and initramfs, but failing inside of the initramfs because it does not do a ‘modprobe zfs’. At the prompt I am able to manually load the zfs module and then manually mount / and it boots up successfully.
Bug 2: To further test, I created a new mkinitfs feature under /etc/mkinitfs/features.d in order to get it to create /etc/modules. It now loads the zfs module, and tries to import the datasets, but fails mounting. I still have to manually mount rpool/ROOT/alpine under /sysroot in order to continue a successful boot.
Conclusion: The init script for the initramfs needs to be tweaked to support ZFS. Also when the zfs feature is used, mkinitfs should create /etc/modules with zfs added.
(from redmine: issue id 8211, created on 2017-11-28)