It is actually a boot failure. Normally the kernel reads some config from the initrd (the bootloader loads initrd and passes it to the kernel - thanks dan) and then does a bunch of setup stuff, and then it mounts the actual root filesystem, and then switches to using that. In this case, the root filesystem has failed to mount.
Hardware failure is most likely the cause, but misconfiguration can also make this happen. Probably hardware though.
If its misconfiguration, an admin can reattempt to mount the root drive on /new_root, and then ctrl-d to get the init system to try again
ELI5: couldnt open C:/ drive
Edit: clarified what loads the initrd - as per dans comment.
Not necessarily. I’ve seen failures like this if the boot partition works, but fails to mount the root partition. systemd then fails to proceed, and shuts down the running services.
systemd daemons are configured via /etc/systemd, and systemd itself lives in /usr/lib/systemd/systemd. How can systemd run or start the configured services without the root disk mounted? The initrd (from the boot partition) only contains enough of an environment to call the entrypoint for the init system, not contain the entirety of systemd (or the configured services).
Initrd contains the systemd binary and enough libraries, services, and kernel modules to get booted this far. The system failed at switch root which is where the real root disk is mounted. Initrd can contain as much or as little as needed to get a working system which can be a lot of you are using a network filesystem as a root for instance.
Those are all hardware management services (as far as I can tell), and are configured before the root is mounted.
I have hit this exact error before, that is what failing to mount the root disk looks like. A bunch of services will start, and then you get dropped into a shell (with a login).
If you want to see it for yourself, change /etc/fstab such that /root is now pointing to the wrong device, and then rebuild your initrd. When you reboot you’ll see exactly that output.
To fix it, login to the shell and mount your root on /new_root, and ctrl-d to continue the boot (from memory it has a message telling you to do that anyway). When your system boots you can fix fstab and rebuild initrd. Its reversable, but maybe test on a machine you dont care about to be safe :)
Switching to Linux and actually being able to see real time logs made me actually curious how it works, so that’s one gear out of the machine demistified
It is actually a boot failure. Normally the kernel reads some config from the initrd (the bootloader loads initrd and passes it to the kernel - thanks dan) and then does a bunch of setup stuff, and then it mounts the actual root filesystem, and then switches to using that. In this case, the root filesystem has failed to mount.
Hardware failure is most likely the cause, but misconfiguration can also make this happen. Probably hardware though.
If its misconfiguration, an admin can reattempt to mount the root drive on /new_root, and then ctrl-d to get the init system to try again
ELI5: couldnt open C:/ drive
Edit: clarified what loads the initrd - as per dans comment.
The bootloader (GRUB) loads the initrd, not the kernel. The kernel accesses stuff from the initrd, but it’s already loaded by that point.
You are correct. Ill add an edit. Thanks!
The root filesystem mounted fine. That’s why the init is starting with all the services on the root disk.
Not necessarily. I’ve seen failures like this if the boot partition works, but fails to mount the root partition. systemd then fails to proceed, and shuts down the running services.
systemd daemons are configured via /etc/systemd, and systemd itself lives in /usr/lib/systemd/systemd. How can systemd run or start the configured services without the root disk mounted? The initrd (from the boot partition) only contains enough of an environment to call the entrypoint for the init system, not contain the entirety of systemd (or the configured services).
Initrd contains the systemd binary and enough libraries, services, and kernel modules to get booted this far. The system failed at switch root which is where the real root disk is mounted. Initrd can contain as much or as little as needed to get a working system which can be a lot of you are using a network filesystem as a root for instance.
Those are all hardware management services (as far as I can tell), and are configured before the root is mounted.
I have hit this exact error before, that is what failing to mount the root disk looks like. A bunch of services will start, and then you get dropped into a shell (with a login).
If you want to see it for yourself, change /etc/fstab such that /root is now pointing to the wrong device, and then rebuild your initrd. When you reboot you’ll see exactly that output. To fix it, login to the shell and mount your root on /new_root, and ctrl-d to continue the boot (from memory it has a message telling you to do that anyway). When your system boots you can fix fstab and rebuild initrd. Its reversable, but maybe test on a machine you dont care about to be safe :)
Oh interesting! I suppose I have just been very careful with /etc/fstab and I haven’t seen systemd fail this way. TIL! Thanks for letting me know!
Thanks for that!
Switching to Linux and actually being able to see real time logs made me actually curious how it works, so that’s one gear out of the machine demistified