ea77e83f06
pytest / pytest (pull_request) Successful in 53s
treefmt / nix fmt (pull_request) Successful in 9s
build_systems / build-brain (pull_request) Successful in 2m33s
build_systems / build-bob (pull_request) Successful in 2m41s
build_systems / build-leviathan (pull_request) Successful in 3m22s
build_systems / build-rhapsody-in-green (pull_request) Successful in 3m32s
build_systems / build-jeeves (pull_request) Successful in 8m52s
build_systems / build-bob (push) Successful in 33s
treefmt / nix fmt (push) Successful in 6s
build_systems / build-brain (push) Successful in 31s
pytest / pytest (push) Successful in 26s
build_systems / build-leviathan (push) Successful in 41s
build_systems / build-rhapsody-in-green (push) Successful in 47s
build_systems / build-jeeves (push) Successful in 2m28s
1.2 KiB
1.2 KiB
ZFS failed root import recovery
Fast path
If the machine fails to boot because ZFS refuses to import root_pool:
GRUB
- At the bootloader menu, select the normal NixOS entry.
- Press
e. - Find the line that starts with
linux. - Append this to the end of that line:
zfs_force=1
- Boot once with
Ctrl+xorF10.
systemd-boot
- At the bootloader menu, highlight the normal NixOS entry.
- Press
e. - Append this to the end of the options line:
zfs_force=1
- Press
Enterto 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.