0

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.

2
  • 3
    It is unclear what you are trying to do. systemd DOES NOT use runlevels. – Milliways Mar 16 at 5:38
  • True, but it has a compatibility layer for this kind of thing. – goldilocks Mar 16 at 14:52
1

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.

2
  • "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 you systemctl set-default emergency. – goldilocks Mar 16 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 2 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.