Hacker News new | ask | show | jobs
by zaarn 1863 days ago
Atleast on Arch, Systemd should drop you into the Emergency shell if it cannot mount a device that isn't defined as optional. IIRC it might require a root password to be set, however.

Otherwise, edit the kernel commandline to add "systemd.unit=emergency.target" to the end, which triggers systemd to straight boot into this console without trying anything that it doesn't need to bring up the console.

2 comments

Or if you're blocked by the root password prompt add `init=/bin/bash` and make your filesystem writable if necessary with `mount -oremount,rw /`
This will block systemd however. The nice thing about the emergency shell is that you can use systemd things like trying to mount filesystems. And you can later isolate multi-user to continue the boot when you finished your fix. /bin/bash would be atleast useful to try to get a root password set.
It tried when the mounting failed, saying it would drop me to a shell and then said "it fail to open up a shell".
That usually indicates something is very wrong and might need an init=/bin/bash instead, as a last resort, to find out why it couldn't open the shell (usually, because there is no root password or it couldn't find any shell binary to run).