I have to admit, I’m having a hard time understanding how folks solved this problem.
I happen to have a very similar situation to this problem. The problem occurred when I had to force restart on a system that was in the middle of running sudo nixos-rebuild switch --upgrade
. Here’s what my situation looks like:
<<< NixOS Stage 1 >>>
loading module btrfs...
loading module dm_mod...
running udev...
Starting systemd-udevd version 254.6
Passphrase for /dev/disk/by--uuid/b90c2010-a53c-4f76-9802-95fdde248601 to appear. . . . -successs
Verifying passphrase for /dev/disk/by--uuid/b90c2010-a53c-4f76-9802-95fdde248601... - successs
starting device mapper and LVM...
Scanning for Btrfs filesystems
registered: /dev/mapper/luks-/b90c2010-a53c-4f76-9802-95fdde248601
mounting /dev/disk/by--uuid/b90c2010-a53c-4f76-9802-95fdde248601 on /...
[ 8.956086] BTRFS error(device dm-0_: openk_ctree failed
mount: mounting /dev/disk/by--uuid/b90c2010-a53c-4f76-9802-95fdde248601 on /mnt-root/ failed: Input/output error
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
When I opt for “ignore the error and continue,” I’m notified the following:
Continuing...
BusyBox v.136.1 () multi-call binary.
Usage: switch_root [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]
Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT TO /.
execute NEW-INIT. PID must be 1. NEW_ROOT must be a mountpoint.
Would anyone be so kind to break the solution down for me?