The problem
This morning, I shut down my PC with “install pending software updates” checked and walked out of the house. When I arrived home, I found this on the screen:
[ 6.513712] dracut-pre-udev[605]: sh: line 1: /sbin/sysctl: No such file or directory
You are in emergency mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, or "exit"
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue
After pressing pressing enter, I see:
Reloading system manager configuration.
Starting default.target
After a few moments, this is followed by the emergency mode message again, and the loop just continues like that. I can’t type anything, so I’m not able to use journalctl
.
What i’ve tried to fix the problem
I searched and found a post with a similar problem here. Our error codes are slightly different so we might not be having the exact same problem. I booted into a live ISO and ran the same filesystem checks.
I had Fedora installed on an NVME in this system. I am able to see the device in lsblk
output. I am able to mount and read files on all three partitions.
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 600M 0 part /run/media/liveuser/427E-EFA0
├─nvme0n1p2 259:2 0 1G 0 part /run/media/liveuser/20096224-3fc7-46a6-ac01-0fd9b226363c
└─nvme0n1p3 259:3 0 475.4G 0 part /run/media/liveuser/fedora_localhost-live
BTRFS check…
root@localhost-live:~# btrfs check /dev/nvme0n1p3
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p3
UUID: 60d5e9d6-a055-4600-8630-e471e5c337bc
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 260355325952 bytes used, no error found
total csum bytes: 181346696
total tree bytes: 1370570752
total fs tree bytes: 1063895040
total extent tree bytes: 92422144
btree space waste bytes: 299960621
file data blocks allocated: 467175002112
referenced 280982261760
fsck
on the other two partitions:
root@localhost-live:~# fsck /dev/nvme0n1p1
fsck from util-linux 2.40-rc1
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
[123?q]? 2
*** Filesystem was changed ***
The changes have not yet been written, you can still choose to leave the
filesystem unmodified:
1) Write changes
2) Leave filesystem unchanged
[12?q]? 1
/dev/nvme0n1p1: 24 files, 4871/153296 clusters
root@localhost-live:~# fsck /dev/nvme0n1p2
fsck from util-linux 2.40-rc1
e2fsck 1.47.0 (5-Feb-2023)
/dev/nvme0n1p2: clean, 43/65536 files, 101844/262144 blocks
This output is actually from my second time through fsck
. The first time, I chose no action whenever prompted, and the second partition had a “dirty bit”. But after copying the backup, I didn’t see that error again.
After this, I rebooted and was confronted with the same emergency mode message again. Don’t know where to go from here. While I wait for your advice, I’m going to backup my user home directories.
Update
After backing up my user home dirs to another disk on the system, I remembered another recent change. There’s a 250 GB disk in the system that I keep my Steam games on. I usually mount this before launching Steam. Yesterday, I decided I want it mounted at boot, so I added it to /etc/fstab
. I thought it unlikely but while I was in the live environment, I commented out that line, rebooted and I’m back! That fixed the boot problem!
Now my question is… Why? I would like to have that disk mounted at boot time, so I would like to understand why this happened and how I can fix it.
My fstab
file:
# /etc/fstab
# Created by anaconda on Tue Dec 20 09:19:52 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
# Filesystems setup automatically at install:
UUID=60d5e9d6-a055-4600-8630-e471e5c337bc / btrfs subvol=root,compress=zstd:1 0 0
UUID=20096224-3fc7-46a6-ac01-0fd9b226363c /boot ext4 defaults 1 2
UUID=427E-EFA0 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=60d5e9d6-a055-4600-8630-e471e5c337bc /home btrfs subvol=home,compress=zstd:1 0 0
# Extra HDD's and SSD's:
## Cuda
UUID=47a943d6-8850-4172-b1fa-f2b181c504e5 /mnt/cuda ext4 users,rw,auto,exec 0 0
## Steam
#UUID=f8cd1919-aabf-4b9d-9b47-786ca2d14843 /mnt/steam ext4 users,rw,auto,exec 0 0
Running fsck
on that partition also returns clean, so I don’t see why this should cause any problems.