no zfs module in initramfs

Bug #1737592 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
Fix Committed
Medium
Unassigned
initramfs-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

zfs support exists in Ubuntu kernels for 16.04 and later, but the default initramfs build does not include this module.

Other common filesystems are included.

As a small piece of information:
$ du -hs /lib/modules/4.13.0-17-generic/kernel/zfs/
3.2M /lib/modules/4.13.0-17-generic/kernel/zfs/

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools-core 0.125ubuntu12
ProcVersionSignature: Ubuntu 4.13.0-17.20-generic 4.13.8
Uname: Linux 4.13.0-17-generic x86_64
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
ApportVersion: 2.20.8-0ubuntu3
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Dec 11 13:05:15 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (872 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
description: updated
Revision history for this message
Scott Moser (smoser) wrote :

As a work around you can specifically add the zfs module (if its in your kernel) with:

$ cat /etc/initramfs-tools/hooks/zfs
#!/bin/sh
. /usr/share/initramfs-tools/hook-functions

manual_add_modules zfs

$ update-initramfs -u -k all

Revision history for this message
Scott Moser (smoser) wrote :

Adding this to maas-images would look like this:
 http://paste.ubuntu.com/26165463/

but we'd avoid that as if zfs is officially supported, then it might as well be in the default initramfs.

Scott Moser (smoser)
Changed in maas-images:
status: New → Confirmed
importance: Undecided → Medium
Changed in initramfs-tools (Ubuntu):
status: New → Invalid
Revision history for this message
Ryan Harper (raharper) wrote :
Download full text (7.1 KiB)

Testing a zfsroot deploy without zfs present, curtin will trigger an install of the full linux-image-generic package during the install deps check.

This produces this output:

[ 7.696444] cloud-init[1214]: Cloud-init v. 17.1 running 'modules:config' at Thu, 21 Dec 2017 21:39:54 +0000. Up 6.72 seconds.
[^[[0;32m OK ^[[0m] Started Apply the settings specified in cloud-config.
         Starting Execute cloud user/final scripts...
[ 8.616435] cloud-init[1435]: Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
[ 8.672908] cloud-init[1435]: Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
[ 8.674883] cloud-init[1435]: Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
[ 8.928164] cloud-init[1435]: Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
[ 8.995416] cloud-init[1435]: Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
[ 9.080891] cloud-init[1435]: Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [409 kB]
[ 9.283115] cloud-init[1435]: Get:7 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [191 kB]
[ 9.350155] cloud-init[1435]: Get:8 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B]
[ 9.442908] cloud-init[1435]: Get:9 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
[ 9.516022] cloud-init[1435]: Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [683 kB]
[ 9.579850] cloud-init[1435]: Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [566 kB]
[ 9.652460] cloud-init[1435]: Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]
[ 9.716868] cloud-init[1435]: Get:13 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4836 B]
[ 9.780898] cloud-init[1435]: Get:14 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6612 B]
[ 10.718880] cloud-init[1435]: Fetched 9861 kB in 2s (4415 kB/s)
[ 11.385174] cloud-init[1435]: Reading package lists...
[ 11.449013] cloud-init[1435]: Reading package lists...
[ 11.561550] cloud-init[1435]: Building dependency tree...
[ 11.563580] cloud-init[1435]: Reading state information...
[ 11.664585] cloud-init[1435]: The following package was automatically installed and is no longer required:
[ 11.666506] cloud-init[1435]: libfreetype6
[ 11.667620] cloud-init[1435]: Use 'apt autoremove' to remove it.
[ 11.669035] cloud-init[1435]: The following additional packages will be installed:
[ 11.670778] cloud-init[1435]: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-doc
[ 11.672519] cloud-init[1435]: Suggested packages:
[ 11.673680] cloud-init[1435]: fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
[ 11.675245] cloud-init[1435]: linux-headers-4.4.0-103-generic samba-common-bin nfs-kernel-server
[ 11.676981] cloud-init[1435]: zfs-initramfs
[ 11.678095] cloud-init[1435]: Recommended packages:
[ 11.679275] cloud-init[1435]: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub |...

Read more...

Scott Moser (smoser)
Changed in maas-images:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

Well, I went looking to verify this. We got builds out of artful and xenial today (20180109).

$ usquery maas3-daily --max=1 ftype=boot-initrd arch=amd64 subarch~ga- \
   kpackage~generic \
   --output-format='%(release)s %(version_name)s %(path)s %(item_url)s' |
 while read rel ver path url; do \
    out="$rel-$ver-initrd";
    [ -f "$out" ] && continue;
    wget "$url" -O "$out.tmp" || break;
    mv "$out.tmp" "$out"; done

$ for f in *-initrd; do echo == $f ==; lsinitramfs $f | grep zfs; done
== artful-20180109-initrd ==
== bionic-20180101-initrd ==
== xenial-20180109-initrd ==
== yakkety-20170719.1-initrd ==
== zesty-20171219-initrd ==

I was hoping that xenial and artful would have the modules now.

Revision history for this message
Scott Moser (smoser) wrote :

closer.
still need artful to be updated. but seems like next build would do that.

$ for f in *-initrd; do echo == $f ==; lsinitramfs $f | grep zfs; done
== artful-20180109-initrd ==
== bionic-20180115.1-initrd ==
lib/modules/4.13.0-25-generic/kernel/zfs
lib/modules/4.13.0-25-generic/kernel/zfs/spl
lib/modules/4.13.0-25-generic/kernel/zfs/spl/spl.ko
lib/modules/4.13.0-25-generic/kernel/zfs/unicode
lib/modules/4.13.0-25-generic/kernel/zfs/unicode/zunicode.ko
lib/modules/4.13.0-25-generic/kernel/zfs/nvpair
lib/modules/4.13.0-25-generic/kernel/zfs/nvpair/znvpair.ko
lib/modules/4.13.0-25-generic/kernel/zfs/zcommon
lib/modules/4.13.0-25-generic/kernel/zfs/zcommon/zcommon.ko
lib/modules/4.13.0-25-generic/kernel/zfs/zfs
lib/modules/4.13.0-25-generic/kernel/zfs/zfs/zfs.ko
lib/modules/4.13.0-25-generic/kernel/zfs/avl
lib/modules/4.13.0-25-generic/kernel/zfs/avl/zavl.ko
== xenial-20180112-initrd ==
lib/modules/4.4.0-109-generic/kernel/zfs
lib/modules/4.4.0-109-generic/kernel/zfs/spl
lib/modules/4.4.0-109-generic/kernel/zfs/spl/spl.ko
lib/modules/4.4.0-109-generic/kernel/zfs/unicode
lib/modules/4.4.0-109-generic/kernel/zfs/unicode/zunicode.ko
lib/modules/4.4.0-109-generic/kernel/zfs/nvpair
lib/modules/4.4.0-109-generic/kernel/zfs/nvpair/znvpair.ko
lib/modules/4.4.0-109-generic/kernel/zfs/zcommon
lib/modules/4.4.0-109-generic/kernel/zfs/zcommon/zcommon.ko
lib/modules/4.4.0-109-generic/kernel/zfs/zfs
lib/modules/4.4.0-109-generic/kernel/zfs/zfs/zfs.ko
lib/modules/4.4.0-109-generic/kernel/zfs/avl
lib/modules/4.4.0-109-generic/kernel/zfs/avl/zavl.ko
== yakkety-20170719.1-initrd ==
== zesty-20171219-initrd ==

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.