Boot hangs at "Starting switch root"

I shut my PC down yesterday and this morning it hung at “Starting switch root”. I waited for a few minutes, then tried to get into a TTY with CTRL-ATL-F2/F3/F4 but that didn’t work.

Then I hit CTRL-ALT-DEL a couple of times and the machine did a reboot and everything was fine…

Here is an excerpt from journalctl -r from around that moment

journalctl -r

The line
Nov 20 06:57:55 cachyos systemd[1]: Switching root.

is where the boot process hung.

And here is the output of cachyos-bugreport.sh: 7d40521

Any hint is welcome.

Add to kernel cmdline: (works for LUKS and btrfs unencrypted

rootflags=subvol=@,x-systemd.device-timeout=90

Just need to increase the timeout, you can even increase it to 180 if there is still an issue.

Thanks, will try this later this afternoon and keep you guys posted.

So, today I learned what switch root is, that it is a critical moment in boot time, that sometimes (?) a drive might take too long for something, that systemd doesn’t wait long enough and the switch root therefore fails. By increasing the timeout we hope to give systemd enough time for switch root.

Is that about correct?

So I added x-systemd.device-timeout=90 to the rootflags of my /boot/refind_linux.conf and will hope for the best.

I’ll mark your hint as solution for now unless it happens again :wink:

PS: could the root cause for this be that I had just changed my mkinitcpio.conf hooks from

HOOKS=(base udev autodetect microcode kms modconf block keyboard keymap consolefont plymouth resume filesystems)

to

HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole plymouth resume block filesystems fsck)

because the mkinitcpio.conf.pacnew proposed so?

Looks good :slight_smile:

3 months later I realize that this could not have solved my problem, because I added it to /boot/refind_linux.conf where it does not belong at all and actually results in an error message during boot :laughing: x-systemd.device-timeout=90 is a systemd-specific mount option that has to go into /etc/fstab to work, if I understand this and that correctly.

I guess the problem went away by itself so I’ll remove the solution flag, sorry :person_shrugging: