# Emergency mode after updating, failed to mount /sysroot

**URL:** https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393
**Category:** Help
**Created:** [June 19, 2026, 6:14pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393 "2026-06-19T18:14:39Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kazimierzkrauze](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@kazimierzkrauze](https://discourse.nixos.org/u/kazimierzkrauze)
#### Post date: [June 19, 2026, 6:14pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/1 "2026-06-19T18:14:39Z")

</div>

Hi!

After updating my Nixos I get this error:

 ![IMG_20260619_200258](https://discourse.nixos.org/uploads/default/original/3X/b/e/be3b2b48d5e474a61efcf06de3a7d28867ff30cb.jpeg)

This is my hardware-configuration.nix and configuration.nix:

```auto
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

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

  boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme"];
  boot.initrd.kernelModules = [];
  boot.kernelModules = ["kvm-intel"];
  boot.extraModulePackages = [];

  fileSystems."/" =
    { device = "zroot/root";
      fsType = "zfs";
    };

  fileSystems."/nix" =
    { device = "zroot/root/nix";
      fsType = "zfs";
    };

  fileSystems."/var" =
    { device = "zroot/root/var";
      fsType = "zfs";
    };

  fileSystems."/home" =
    { device = "zroot/root/home";
      fsType = "zfs";
    };

  fileSystems."/home/helenajurkowska" =
    { device = "zroot/root/home/helenajurkowska";
      fsType = "zfs";
    };

  fileSystems."/home/kazimierzkrauze" =
    { device = "zroot/root/home/kazimierzkrauze";
      fsType = "zfs";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/F899-30FA";
      fsType = "vfat";
      options = ["fmask=0022" "dmask=0022"];
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/b23cc832-6706-4de0-8657-e2a5d1786a4b"; }
    ];

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

```

```auto
{ config, pkgs-stable, pkgs-unstable, lib, inputs, ... }:

{
  imports =
    [
      ./packages.nix
      ./systemd-services.nix
      ./scripts/scripts.nix
      ./user-interfaces/user-interfaces.nix
      ./backup.nix
      ./filesystems.nix
      ./tlp.nix
    ];

  boot = {
    loader = {
      systemd-boot.enable = true;
      efi.canTouchEfiVariables = true;
    };
    initrd.supportedFilesystems = ["zfs" "vfat"];
    kernelPackages = pkgs-unstable.linuxPackages;
    kernel.sysctl."vm.swappiness" = 80;
    zfs.forceImportRoot = false;
  };

  networking.networkmanager.enable = true;

  console.keyMap = "pl";

  time.timeZone = "Europe/Warsaw";

  fonts.packages = [
    pkgs-stable.corefonts
  ];

  i18n = {
    defaultLocale = "en_GB.UTF-8";
    extraLocaleSettings = {
      LC_ADDRESS = "pl_PL.UTF-8";
      LC_IDENTIFICATION = "pl_PL.UTF-8";
      LC_MEASUREMENT = "pl_PL.UTF-8";
      LC_MONETARY = "pl_PL.UTF-8";
      LC_NAME = "pl_PL.UTF-8";
      LC_NUMERIC = "pl_PL.UTF-8";
      LC_PAPER = "pl_PL.UTF-8";
      LC_TELEPHONE = "pl_PL.UTF-8";
      LC_TIME = "pl_PL.UTF-8";
    };
  };

  xdg.portal = {
    enable = true;
    xdgOpenUsePortal = true;
    extraPortals = [
      pkgs-stable.kdePackages.xdg-desktop-portal-kde
    ];
  };

  environment = {
    variables.EDITOR = "vim";
    sessionVariables.NIXOS_OZONE_WL = "1";
  };

  services = {
    pulseaudio.enable = false;
    pipewire = {
      enable = true;
      alsa = {
        enable = true;
        support32Bit = true;
      };
      pulse.enable = true;
    };
    printing = {
      enable = true;
      openFirewall = true;
      drivers = [
        pkgs-stable.samsung-unified-linux-driver
        pkgs-stable.hplip
      ];
    };
    clamav = {
      daemon.enable = true;
      updater.enable = true;
    };
    fwupd.enable = true;
  };

  # Bluetooth
  hardware = {
    bluetooth = {
      enable = true;
      powerOnBoot = true;
      settings.General.Experimental = true;
    };
    i2c = {
      enable = true;
      group = "users";
    };
  };

  # Enable sound with pipewire.
  security = {
    rtkit.enable = true;
    polkit.enable = true;
    audit.enable = true;
    auditd.enable = true;
  };

  virtualisation = {
    libvirtd.enable = true;
    #waydroid.enable = true;
  };

  system.autoUpgrade = {
    enable = true;
    flake = inputs.self.outPath;
    dates = "daily";
  };

  nix = {
    extraOptions = ''
      access-tokens = github.com=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
    '';
    settings = {
      experimental-features = [
        "nix-command"
        "flakes"
      ];
      auto-optimise-store = true;
    };
    nixPath = ["nixos-config=/home/kazimierzkrauze/Git/nixos-configuration"];
    gc = {
      automatic = true;
      dates = "daily";
      options = "--delete-older-than 120d";
    };
  };

  programs = {
    virt-manager.enable = true;
    kdeconnect.enable = true;
    steam.enable = true;
  };

  networking = {
    firewall.enable = true;
    nameservers = [
      "208.67.222.123"
      "208.67.220.123"
    ];
  };

  system.stateVersion = "24.11"; # Did you read the comment?

```

Can you, please, help me out?

Best,  
Miro

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [June 19, 2026, 11:18pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/2 "2026-06-19T23:18:35Z")

</div>

What is the `mountpoint` property on those datasets? i.e. What does `zfs get mountpoint zroot/root` say?

---

<div class="post-metadata">

### Author: ![kazimierzkrauze](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@kazimierzkrauze](https://discourse.nixos.org/u/kazimierzkrauze)
#### Post date: [June 20, 2026, 7:46am UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/3 "2026-06-20T07:46:13Z")

</div>

```auto
f user@kaktus 0s ~ -> zfs get mountpoint zroot/root
NAME PROPERTY VALUE SOURCE
zroot/root mountpoint / local
f user@kaktus 0s ~ ->

```

I understood that there is a conflict between zfs-mount and systemd mount, is it right?

---

<div class="post-metadata">

### Author: ![Mapybara](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@Mapybara](https://discourse.nixos.org/u/Mapybara)
#### Post date: [June 20, 2026, 8:08am UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/4 "2026-06-20T08:08:14Z")

</div>

That’s right. You probably want to `sudo zfs set mountpoint=legacy zroot/root`, and the same for the other datasets you mention in your NixOS configuration.

See [ZFS - Official NixOS Wiki](https://wiki.nixos.org/wiki/ZFS#ZFS_conflicting_with_systemd) (which I bet was written by @ElvishJerricco ).

---

<div class="post-metadata">

### Author: ![kazimierzkrauze](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@kazimierzkrauze](https://discourse.nixos.org/u/kazimierzkrauze)
#### Post date: [June 20, 2026, 10:15am UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/5 "2026-06-20T10:15:17Z")

</div>

Thank you! That helped.

---

<div class="post-metadata">

### Author: ![anonuser](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/e79b87/32.png) [@anonuser](https://discourse.nixos.org/u/anonuser)
#### Post date: [August 31, 2026, 7:42pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/6 "2026-08-31T19:42:44Z")

</div>

I have a similar issue, but using mountpoint=legacy breaks zfsbootmenu. Using mountpoint=/ and mountpoint=/nix worked fine on 25.11 and earlier by setting `options = [“zfsutil”];`inside my hardware-configuration.nix for the / and /nix filesystems. I can also manually finish the boot sequence by running the correct `mount -t zfs -o zfsutils <dataset> <mountpoint>` commands inside the emergency shell and then continuing boot.

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [August 31, 2026, 11:21pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/7 "2026-08-31T23:21:33Z")

</div>

Note, the reason you shouldn’t do `options = ["zfsutil"];` is because that’s an implementation detail that indicates your use case just isn’t supported. Indeed, in this case the unsupported thing is just “root on non-legacy ZFS mountpoints”, which I explained [here](https://github.com/NixOS/nixpkgs/issues/457782#issuecomment-4697180556). The `zfsutil` option is not a _feature_, it is you signing a contract that you are correctly implementing a feature yourself. Ideally NixOS would just have a proper ZFS integration for stage 1.

Also, I’m curious how you’re doing `zfsbootmenu` with NixOS, given that NixOS needs to be the one controlling the boot menu and doesn’t have a `zfsbootmenu` module.

---

<div class="post-metadata">

### Author: ![anonuser](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/e79b87/32.png) [@anonuser](https://discourse.nixos.org/u/anonuser)
#### Post date: [September 1, 2026, 8:28pm UTC](https://discourse.nixos.org/t/emergency-mode-after-updating-failed-to-mount-sysroot/78393/8 "2026-09-01T20:28:16Z")

</div>

zfsutil is the flag used by stage 1 ZFS implementations, so I think it’s suited for a customized stage 1 boot. It would definitely be nice if nixos would automate it more, but OTOH using disko-zfs with systemd-boot “just works”. (Probably because it uses root=fstab and not root=zfs:.)

I am using the generationsDir bootloader with copyKernels and selecting the kernel and, optionally, snapshot using the zfsbootmenu UI. zfsbootmenu is very flexible, so with the right config it works even if the kernels aren’t exactly where it expects by default. The generations don’t really show up in the right order, but that’s only because I can already do the important part (select the latest by default, but also let me select an older one manually if I want.) and didn’t bother writing more refined hooks. Just booting into the latest generation doesn’t even need a hook. It’s probably even possible to work without “copyKernels” with a bit of metaphorical elbow grease.

I think I found a workaround by explicitly setting the legacy / as a boot environment in zfsbootmenu, but it would still be nice for the systemd stage 1 to handle this case properly. I’ve been booting this way since 23.11.

EDIT: Specifically, zfsutil should only be used for mounting filesystems inside the initramfs or other specific early boot use-cases. It’s how the “root=zfs” style functionality on other distros can work without needing to call directly into the C APIs to perform the mount. It’s certainly inelegant for the root and nix store to show up in /etc/fstab after boot is completed, but since those filesystems will be handled by systemd-remount-fs before zfs-mount runs this isn’t an issue in practice. It would be nice if anything not handled by the remount raised a nixos-rebuild error when defined in the filesystem list and given a non-legacy mountpoint.
