You are not logged in.

#1 2017-05-25 10:34:44

replabrobin
Member
Registered: 2010-05-06
Posts: 232

change to single user mode from graphical target

Is there a way to get to single user mode from multi-user / graphical targets? I believe rescue mode is the nearest to the old single user mode.

I'm running arch x86_x64 lates and use slim + openbox as window manager. I would like to switch to single user mode for occasional purposes, but my reading of man systemd.special seems to indicate that we should enter some special targets only  using the kernel command line. Is telinit 1 now not possible? It used to work perfectly, but my attempts at systemctl isolate rescue.target seem to end in a locked system needing a power cycle.

Offline

#2 2017-05-25 14:09:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: change to single user mode from graphical target


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-05-25 14:14:23

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: change to single user mode from graphical target

So, it appears that you know how to switch to single-user mode ("systemctl isolate rescue.target"). It used to work, but now it causes your computer to lock up?

When did issue first appear? At what point in your usage of single-user mode does the lock up occur? Is there any output or error messages?

Also, what are you using single-user mode for? I've never needed single-user mode...

Last edited by drcouzelis (2017-05-25 14:14:44)

Offline

#4 2017-05-26 13:36:49

replabrobin
Member
Registered: 2010-05-06
Posts: 232

Re: change to single user mode from graphical target

I haven't used telinit for some years. I haven't ever had to use systemctl isolate before. 

I did read the pages https://wiki.archlinux.org/index.php/Systemd#Targets and initially tried isolating runlevel1, but that target is not available on my system for some reason. I then tried  systemctl isolate rescue.


I wanted single user mode to do a backup in a quiet system. When I tried this in a terminal it did manage to kill slim + x11 etc, but the screen was then just the standard startup screen with kernel messages as normal, but the expected request to enter the root password or ctrl+d did not happen. The keyboard appeared locked and I had to power cycle the machine. Post analysis revealed little as the journal didn't show the latest messages. If I edit the kernel command to use systemd.unit=rescue.target I do get into the single user mode.

Interestingly I tried this at work on my ub***u 16.04 machine and it also fails there from a Terminal.

Offline

#5 2017-05-26 14:45:38

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: change to single user mode from graphical target

replabrobin wrote:

I wanted single user mode to do a backup in a quiet system.

Oh, that's a good idea! If I'm doing a full backup of my installation I always end up using a live environment. tongue

replabrobin wrote:

When I tried this in a terminal it did manage to kill slim + x11 etc, but the screen was then just the standard startup screen with kernel messages as normal, but the expected request to enter the root password or ctrl+d did not happen.

I think I've seen something like that... It's as if you tell your computer to disable everything but TTY1, so it does... except SLiM has already taken over TTY1 so, hey, whadyagonndo.

Maybe someone smarter than me will know how to take back control of the TTY.

replabrobin wrote:

ub***u

Lol big_smile

Offline

#6 2017-05-26 14:53:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: change to single user mode from graphical target

There is always the old trick of using /usr/bin/bash as the init system from the kernel command line
https://wiki.archlinux.org/index.php/Re … nvoke_bash


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2017-05-26 15:26:35

replabrobin
Member
Registered: 2010-05-06
Posts: 232

Re: change to single user mode from graphical target

ewaller wrote:

There is always the old trick of using /usr/bin/bash as the init system from the kernel command line
https://wiki.archlinux.org/index.php/Re … nvoke_bash

this probably even better as a way to backup since after mounting / rw you can mount the backup and then remount / as ro. Then a dd or rsync will have nothing else messing with the disk.

Offline

#8 2017-05-27 07:14:12

replabrobin
Member
Registered: 2010-05-06
Posts: 232

Re: change to single user mode from graphical target

ewaller wrote:

There is always the old trick of using /usr/bin/bash as the init system from the kernel command line
https://wiki.archlinux.org/index.php/Re … nvoke_bash

Unfortunately on my standard Arch this trick doesn't work. The bash prompt appears, but the keyboard is not active and even ctrl+alt+del is ineffective. I guess the minimal systemd startup doesn't set up the keyboard.

Offline

Board footer

Powered by FluxBB