Failure to mount filesystems on newer versions

I’ve been having trouble with my root partition not mounting, keeping me from booting any version of NixOS newer than the one I had built on 05/15/2024.

Here’s what it outputs when I try to boot any newer versions:


When I go back to the previously built version, it boots up perfectly fine. So far I’ve tried using different kernel versions, using paths other than UUID for the filesystem configs, and moving from unstable to 24.05, none appear to have made any difference.

My root partition is on BTRFS in a raid 1 configuration between 2 SSDs. My /nix and /home directories are both configured in raid 5 across 3 SSDs. All three drives are encrypted with LUKS and split up using LVM.

My config for my filesystems:

{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/69028ba5-6e93-4f5a-a690-67650c7cb0f6";
      fsType = "btrfs";
      options = [ "noatime" ];
    };

  fileSystems."/boot/efi" =
    { device = "/dev/disk/by-uuid/1E77-927F";
      fsType = "vfat";
      options = [ "fmask=0022" "dmask=0022" ];
    };

  fileSystems."/nix" =
    { device = "/dev/disk/by-uuid/a00ad03b-c108-4555-86a6-549974928138";
      fsType = "btrfs";
      options = [ "noatime" ];
    };

  fileSystems."/home" =
    { device = "/dev/disk/by-uuid/bcb2d2f4-8051-480e-a5d4-024af4a05c5f";
      fsType = "btrfs";
      options = [ "compress=zstd" ];
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/2a17824b-34ae-4b56-9257-f24dcb0dc51f"; }
    ];


  services.btrfs = {
    autoScrub = {
      enable = true;
      fileSystems = [
        "/"
        "/home"
        "/nix"
      ];
      interval = "monthly";
    };
  };

}

My config for booting and decryption:

{ config, pkgs, ... }:
{

  boot = {
    bootspec.enable = true;
    initrd = {
      luks.devices = {
        "fast1"= {
          device = "/dev/disk/by-uuid/5fa189e1-e03f-44d3-94c4-bb866ecc7d13";
          preLVM = true;
          allowDiscards= true;
          keyFileSize = 4096;
          keyFile = "/dev/disk/by-id/usb-PNY_USB_2.0_FD_290C0A03A076F785-0:0";
        };
        "fast2"= {
          device = "/dev/disk/by-uuid/50fc348b-732e-45b4-80af-538275aae7c1";
          preLVM = true;
          allowDiscards= true;
          keyFileSize = 4096;
          keyFile = "/dev/disk/by-id/usb-PNY_USB_2.0_FD_290C0A03A076F785-0:0";
        };
        "slowdrive"= {
          device = "/dev/disk/by-uuid/8b759754-3279-4c5e-9f94-6c9743811890";
          preLVM = true;
          allowDiscards= true;
          keyFileSize = 4096;
          keyFile = "/dev/disk/by-id/usb-PNY_USB_2.0_FD_290C0A03A076F785-0:0";
        };
      };
      availableKernelModules = [
        "aesni_intel"
        "cryptd"
	"btrfs"
      ];
      services.lvm.enable = true;
      };
    supportedFilesystems = [ "btrfs" ];
    loader.efi.efiSysMountPoint = "/boot/efi";
    crashDump.enable = true;
  };

  environment.systemPackages = with pkgs; [
    cryptsetup
  ];

}
2 Likes