Files
dotfiles/docs/zfs_failed_root_import_recovry.md
T
Richie e07032c9a1
build_systems / build-rhapsody-in-green (pull_request) Successful in 3m5s
build_systems / build-jeeves (pull_request) Successful in 7m38s
treefmt / nix fmt (pull_request) Successful in 9s
pytest / pytest (pull_request) Successful in 1m5s
build_systems / build-brain (pull_request) Successful in 2m52s
build_systems / build-leviathan (pull_request) Successful in 2m57s
build_systems / build-bob (pull_request) Failing after 17m30s
setting forceImportRoot to false
2026-05-14 11:36:57 -04:00

1.2 KiB

ZFS failed root import recovery

Fast path

If the machine fails to boot because ZFS refuses to import root_pool:

GRUB

  1. At the bootloader menu, select the normal NixOS entry.
  2. Press e.
  3. Find the line that starts with linux.
  4. Append this to the end of that line:
zfs_force=1
  1. Boot once with Ctrl+x or F10.

systemd-boot

  1. At the bootloader menu, highlight the normal NixOS entry.
  2. Press e.
  3. Append this to the end of the options line:
zfs_force=1
  1. Press Enter to boot once.

After boot

Run:

sudo zpool status
sudo zpool import
journalctl -b | rg "ZFS|zfs|import|root_pool"

Expected result

sudo zpool status should show root_pool as ONLINE.

Reboot test

Run:

sudo reboot

Do not add zfs_force=1 the second time.

If it still fails

Boot once more with:

zfs_force=1

Then run:

sudo zpool status -v
sudo zpool history | tail -n 50
journalctl -b | rg "ZFS|zfs|import|root_pool"

Notes

  • Root pool name is root_pool.
  • This is a one-time recovery path after disk moves, controller changes, dirty exports, or interrupted imports.
  • Some hosts also need the LUKS unlock USB key inserted before boot.