Skip to content

linux>3.19.x fails to mount root ZFS on NVMe during stage 1 #11003

@locdtm

Description

@locdtm

When using any kernel strictly newer than pkgs.linuxPackages_3_19 as boot.kernelPackages, the entire configuration fails to mount the root-on-ZFS filesystem during stage 1.

Here is a transcript of a failing boot:

<<< NixOS Stage 1 >>>

loading module spl...
loading module zfs...
loading module dm_mod...
loading module ast...
loading module pci_stub...
loading module vfio_pci...
loading module vfio_iommu_type1...
running udev...
starting version 217
starting device mapper and LVM...
importing root ZFS pool "POOLbakemono"...
cannot import 'POOLbakemono': no such pool available
mounting POOLbakemono/FS on /...
mount: mounting POOLbakemono/FS on /mnt-root/ failed: No such file or directory

An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one
of the following keys:

  r) to reboot immediately
  *) to ignore the error and continue

(Yes, I use Hungarian notation for pool and volume names. Stop judging!)

Pressing the R and Enter keys results in a few dozen newlines being printed and a subsequent reboot. Simply pressing, e.g., just Enter results in the following:

Continuing...
BusyBox v1.23.2 () multi-call binary.

Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_BOOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

        -c DEV  Reopen stdio to DEV after switch

I guess switch_root is being called with too few arguments.

I can boot just fine with 3.19.x and 3.18.x. I have reverted to using 3.18.x for now since 3.19.x has fallen out of nixpkgs.

I'd love to include the generated /etc/fstab, however, one of the disadvantages to 3.18.x prevents me from feeding any input to that machine's console. Right now, I am posting this from a virtual machine on that host that's had one of the host's USB controllers passed through to it via VFIO. The one which is still assigned to the host proper has had its driver die:

[80175.570386] xhci_hcd 0000:05:00.0: HC died; cleaning up

Which simply means that I'll need to reboot the entire machine to do something like cat /etc/fstab. (sigh)

So, yeah. Newer kernels won't mount the root (Z)FS whereas older ones just do it :)

NixOS unstable channel revision 7ae05ed is being used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken1.severity: blockerThis is preventing another PR or issue from being completed6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions