Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Maintenance mode (Read 2669 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Maintenance mode

On Manjaro-OpenRC and Arch-OpenRC, to enter what used to be called "single user mode," one could enter 'single' on the line containing the kernel in Grub.

This doesn't work in Artix, though.  The closest is adding 'init=/bin/bash' on that same line.  I'm not convinced, however, that this is the right way to go about it.  Any suggestions?

Re: Maintenance mode

Reply #1
Over two years, and no suggestions?  I just ran into this issue, dealing with the recent buggy syslog-ng.  I've seen various suggestions around the interwebs for troubleshooting such problems, but none seem to apply, either because they are just too old, and things have changed, or artix is just enough different.  Using init=/bin/bash does work, and you can then either "openrc sysinit" for one or more runlevels, and then manually start individual services, but is there no way to get an "interactive" startup where you can Y/N each service before it starts?

Re: Maintenance mode

Reply #2
You can get an openrc  "interactive" mode by modifying /etc/rc.conf, and setting rc_interactive="YES":

Code: [Select]
# Set rc_interactive to "YES" and you'll be able to press the I key during
# boot so you can choose to start specific services. Set to "NO" to disable
# this feature. This feature is automatically disabled if rc_parallel is
# set to YES.
#rc_interactive="YES"
rc_interactive="YES"
Then you need to press "i" key during boot openrc startup/running to get an interactive mode where openrc will pause at each service and ask for response and you can "Y/N each service before it starts".


For a single user mode, I suppose you would need to add a new runlevel to /etc/runlevels, naming it such, add the desired services via rc-update;  and modify  /etc/rc.conf to run your single-user runlevel as (instead of)  default.  Or, you can specify the default runlevel via the use of a kernel commandline parameter of "softlevel=".  I have not personally done this.

Code: [Select]
# if  you use openrc-init, which is currently only available on Linux,
# this is the default runlevel to activate after "sysinit" and "boot"
# when booting.
#rc_default_runlevel="default"






Re: Maintenance mode

Reply #3
First, that requires you to boot in some way that you can access and edit /edit/rc.conf.   It is certainly possible with a live  DVD/USB drive, but it remains an open question is whether there is any way to do that by editing the "linux..... " line in the grub config at boot time.''

In terms of "Single user" mode, I don't know if simply removing some services from starting will have the desired effect, but I've clearly not checked in enough detail to be sure.

Re: Maintenance mode

Reply #4
sulogin - man sulogin could be helpful. But if you disable autologin to the desktop then you end up at a login prompt anyway? There are some other options too, mount / chroot from an iso / other partition, ALT F2 - 6 can get a tty login if boot has progressed far enough before stopping too. rsyslog from the AUR works reliably it seems, and is quite stable with few updates, although syslog-ng can be OK too. Where a single user rescue mode is fully set up, you would have the option in the grub menu and not need to add it to the command line.
rc_shell=/usr/bin/sulogin
That is set by default in rc.conf and is used in the interactive mode already mentioned. sulogin = single user login. If root is locked sulogin needs -e / --force added.

 

Re: Maintenance mode

Reply #5
OpenRC documentation asserts the softlevel kernel parameter should work, but it doesn't on my side. I usually do init=/bin/sh for single-user mode.