Booting into single-user mode

Hi to all,

Any way to booting in single-user mode ?

Thanks, see you.

Sry but i fail to see what your asking about ?

Hi Toast ,

I refering to: Single-user mode - Wikipedia

Thanks, see you.

The command sudo -s effectively makes you the root user.

What is it you’re trying to do exactly ? There are multiple ways to boot to something similar to single user mode but the best one to use depends on what your purpose is.

I don’t know what device you’re on, but OSMC on the rbp1 is essentially a Debian Jessie, so editing /boot/cmdline.txt and replacing “quiet” with “single” and appending “init=/bin/bash” to the end of the line should suffice, I’ve never tested though.

In systemd systems, you can boot to emergency mode by adding which I think is equivalent to adding single.

In OSMC we have two additional alternative options that can be added to cmdline.txt:

recovery - does the same as holding down shift at boot used to, which is take you to the OSMC recovery console, which is a root console with file systems mounted read write, (no network access unless you enable it yourself with ifup and ifconfig) however without systemd running. (We intercept the boot process before systemd init) This means the recovery console should work even if systemd was screwed up.

rescue - this gives you a root prompt within the initramfs - this is really early in the boot process, before the root file system is even mounted.

If you need to do something like edit an fstab file that is preventing the system booting recovery mode is probably the easiest to use. You can even use apt/dpkg to uninstall software in this mode if that software is causing issues booting.