...if your system fails to boot and you end up in maintenance mode there
is no way out except use of the root login and password...
And if its a Pi zero you have to buy adapters to plug in a USB keyboard
to enter it on and an HDMI monitor to see what is going on.
The Natural Philosopher <tnp@invalid.invalid> wrote:
...if your system fails to boot and you end up in maintenance mode
there is no way out except use of the root login and password...
Strange, if it can read the root password hash from storage, why
can't it read the other ones? Does RPi OS it store that password in
the initrd but not the other ones? When they can't mount the root
filesystem, I remember other Linux distros going to a command prompt
without asking for a password, though I haven't seen what RPi OS
does.
I think TNP is seeing the emergency.service unit, which is run under
certain boot failure conditions. The effect is to run sulogin, which
normally requests the root password.
AFAICT if there is no root password set, sulogin will give you a root
shell without requesting any authentication.
not@telling.you.invalid (Computer Nerd Kev) writes:
The Natural Philosopher <tnp@invalid.invalid> wrote:
...if your system fails to boot and you end up in maintenance mode
there is no way out except use of the root login and password...
Strange, if it can read the root password hash from storage, why
can't it read the other ones? Does RPi OS it store that password in
the initrd but not the other ones? When they can't mount the root
filesystem, I remember other Linux distros going to a command prompt
without asking for a password, though I haven't seen what RPi OS
does.
I think TNP is seeing the emergency.service unit, which is run under
certain boot failure conditions. The effect is to run sulogin, which
normally requests the root password.
AFAICT if there is no root password set, sulogin will give you a root
shell without requesting any authentication.
Even if that doesn?t go as expected, you can edit the kernel command
line to point init at a shell, which will then run without any tedious business with passwords, as long as it actually exists. So, there?s definitely another way.
On an x86 device running Grub you can do this easily in the boot-time
UI. I don?t know if there?s an interactive way to do it on any Pi models
but in the worst case you could mount the SD card with another computer
and edit the kernel command line.
If boot fails before / is mounted then I think you get an initramfs
shell, without any authentication. Certainly my initramfs doesn?t
include any password hashes. I don?t feel like doing the experiment l-)
References:
https://man7.org/linux/man-pages/man7/systemd.special.7.html
https://man7.org/linux/man-pages/man8/sulogin.8.html
https://github.com/util-linux/util-linux/blob/master/login-utils/sulogin.c
Strange, if it can read the root password hash from storage, why
can't it read the other ones?
On 25/03/2026 23:25, Richard Kettlewell wrote:
Even if that doesn't go as expected, you can edit the kernel commandhow? the machine is inaccessible
line to point init at a shell, which will then run without any tedious
business with passwords, as long as it actually exists. So, there's
definitely another way.
On an x86 device running Grub you can do this easily in the boot-timeif you knew what to edit...
UI. I don't know if there's an interactive way to do it on any Pi models
but in the worst case you could mount the SD card with another computer
and edit the kernel command line.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 62 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492942:34:31 |
| Calls: | 834 |
| Files: | 1,294 |
| D/L today: |
2 files (2,519K bytes) |
| Messages: | 263,501 |