How does one boot to level one? That is interupt the boot to a GUI. I have not been able to get back to a functioning level1 (sudo init 1) so I want to stop on the way up.
1 Answers
I found this from about 3 years ago and it worked. See (Oops I need runlevel 1). It is buried in lots of things that do not work.
"Fortunately, there is a solution that works, which actually gives real single-user access: add a space and a 1 at the end of cmdline.txt, right after the rootwait parameter." I copied /boot/cmdline.txt to a save file and edited adding the 1 and deleting everything past the (now) rootwait 1. (It is no longer the end of the file). Note, before doing this one needs to set a root password. (That is sudo -i then passwd.) Then reboot and it stops at level 1, prompting for the root password. Now one can change the default user (pi) to whatever you want with usermod. then cp the cmdline save file back to cmdline.txt and reboot to graphical mode.

- 11
- 1
-
"It is buried in lots of things that do not work." -> That's because that question is from before sysV init was replaced in Debian and Raspbian with systemd. As per Milliway's comment, it does not actually use runlevels -- but there is a compatibility layer so you can do things like
init 3
etc. You will probably get the same thing if yousystemctl set-default emergency
. – goldilocks Mar 16 '21 at 14:55 -
When I tried that, systemctl set-default emergency, the system went to user account, not root. If you want to make root changes to the user; e.g., usermod, I think this will not allow it as the path to root went through the user. – elaz Apr 02 '21 at 06:05
systemd
DOES NOT use runlevels. – Milliways Mar 16 '21 at 05:38