[zfs-discuss] ZFS on Root (0.7.5) on Ubuntu 17.10 does not boot

Fajar A. Nugraha list at fajar.net
Wed Jan 3 17:44:54 EST 2018

On Thu, Jan 4, 2018 at 12:29 AM, Christopher J. Ruwe via zfs-discuss
<zfs-discuss at list.zfsonlinux.org> wrote:
> Hi,
> i am using the time "between the years" to test installations of zfs
> roots (using ansible, but that should not matter here).
> I am progressing along the lines of
> https://github.com/zfsonlinux/zfs/wiki/Ubuntu-17.10-Root-on-ZFS
> (@rlaager: thank you very much for all your work with ZFS on Root in
> the ubuntu exosystem).
> The (I am very sure only) diversion is that I use packages I compiled
> myself using the spl- and zfs-0.7.5 release tag. Into the latter I
> have cherry-picked ee410eefc2a9c0f0e77bd765894ee7767af647ea, which is
> the commit closing #6963 (https://github.com/zfsonlinux/zfs/pull/6963)
> For testing purposes, I use virtualbox both with and without EFI and
> with and without crypto.
> One thing just bugs me and the other is slowly driving me insane:
> 1) For my life I cannot figure out how to compile the modules so that
>    I can create zpools booting off the live desktop usb image. The
>    live usb image has (outdated) 4.13.0-16a and I tried 1) compiling
>    against a sources and headers pulled from apt upstream and 2)
>    compiling on the usb live enviroment, in every case, the kmod
>    packages install, but zpool fails when creating.

Which distro/version are you using?
AFAIK 'kmod' implies:
- you use redhat/centos, or
- you use ubuntu, and convert RPMs to deb (IIRC this is the default
when building from source)

If you use ubuntu, I recommend:
- install ubuntu to usb drive (NOT using live image). An 8G stick
should be enough. If you want smaller size, remove unnecessary
packages (my customized xfce+chrome package selection takes < 2GB)
- optionally update with
https://launchpad.net/~jonathonf/+archive/ubuntu/zfs/+index (or
recompile the sources there, if you use newer ubuntu versions)

> 2) Navigation around that, I now use the dkms packages. I can complete
>    installation using these on the live usb image and in the install
>    chroot configuring for crypto or without and for EFI or MBR.
>    I took care disabling every feature flag which I cannot find on my
>    working machine running the stock ubuntu modules, i.e., I call
>    zpool create \
>      -f \
>      -o ashift=12 \
>      -O atime=off \
>      -O canmount=off \
>      -O checksum=sha256 \
>      -O compression=lz4 \
>      -o feature at async_destroy=enabled \
>      -o feature at empty_bpobj=enabled \
>      -o feature at lz4_compress=enabled \
>      -o feature at multi_vdev_crash_dump=disabled \
>      -o feature at spacemap_histogram=enabled \
>      -o feature at enabled_txg=enabled \
>      -o feature at hole_birth=enabled \
>      -o feature at extensible_dataset=enabled \
>      -o feature at embedded_data=enabled \
>      -o feature at bookmarks=enabled \
>      -o feature at filesystem_limits=enabled \
>      -o feature at large_blocks=enabled \
>      -o feature at large_dnode=disabled \
>      -o feature at sha512=disabled \
>      -o feature at skein=disabled \
>      -o feature at edonr=disabled \
>      -o feature at userobj_accounting=disabled \
>      -O mountpoint=none \
>      -O normalization=formD \
>      -R /mnt \
>      rpool \
>      /dev/disk/by-id/<...>
>    In every single case, I cannot boot the newly installed machine
>    (virtualbox). Booting will stop at "Running /scripts/local-block
>    ... done" a dozen times and then exits "Gave up waiting for boot
>    device" - "Alert! ZFS=rpool/ROOT/ubuntu1710 does not exist".

Do you have zfs-initramfs installed?
Do you have "boot=zfs" line on /proc/cmdline? If not, try adding it to grub.

>    From the dropped-into initramfs, I can cat /proc/cmdline showing
>    everything was called as I would expect. Cat'ing /proc/modules
>    shows that the zfs module was not loaded even though the insmod
>    statement is present in the generated grub.cfg, which clearly

insmod in grub.cfg -> allows grub to load grub.cfg and kernel/initrd from zfs
zfs-initramfs -> add scripts in initramfs that will load the modules,
import the pool, and mount the dataset in appropriate place

>    explains why waiting for the boot device timed out.
>    Even loading the zfs module manually and carefully mounting the
>    tree on /root does not yield a bootable system.
>    At this point, I am severly out of ideas how to proceed further and
>    ask for help and/or suggestions.


More information about the zfs-discuss mailing list