You are not logged in.

#1 2012-07-30 20:13:36

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

systemd and recovery boot

I do keep hitting these little systemd issues, but google hasn't helped.

How do i boot a recovery console using a systemd only boot? I've tried both ro single and systemd.unit=rescue.target on the kernel command line, and whilst in both cases I can see the final message long enough to know that it's recovery mode, it then goes on before I have a chance to actually do anything to (I assume) continue trying to load my DM, resulting in a blank screen with nowhere to go and no way to get there. Obviously because it's now at run level 1 there are no TTYs available to switch to.

Is there a way to get something resembling the old behaviour with systemd where it will either drop to a console, or at the very least wait for me to make a choice?


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#2 2012-07-30 20:49:04

yodaz
Member
Registered: 2011-03-08
Posts: 41

Re: systemd and recovery boot

Hi,

I get to normal prompt by just adding systemd.unit=rescue.target on the kernel command line. It boots, then I get to a login prompt.

Offline

#3 2012-07-30 20:54:44

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: systemd and recovery boot

Try

systemd.unit=emergency.target

Offline

#4 2012-07-30 23:14:30

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd and recovery boot

Thank you for the suggestion, though it hasn't helped. Using emergency.target results in almost the same, except this time the monitor switches off instead of just giving me a blank screen.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#5 2012-07-31 20:12:11

Gnarl
Member
Registered: 2010-11-18
Posts: 63

Re: systemd and recovery boot

I had a similar issue

Last edited by Gnarl (2012-07-31 20:13:02)

Offline

#6 2012-07-31 22:33:38

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd and recovery boot

Ahhh, it certainly looks like the same problem -

locate sulogin

returns nothing.

If it's a single binary is there anywhere I can grab it without having to install Arch in a VM to copy it?


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#7 2012-07-31 23:40:49

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: systemd and recovery boot

You should be able to pull it off a live disk as it's part of core/sysvinit. But then again, from a live disk, you should probably just reinstall the package and/or fix your problem.

Last edited by joshdmiller (2012-07-31 23:41:20)

Offline

#8 2012-08-01 18:25:44

aline
Member
Registered: 2009-12-17
Posts: 22

Re: systemd and recovery boot

I like to use the initramfs as a system rescue.

In the grub prompt I manually press "e"

In the linux line I leave like this:

linux /vmlinuz-linux root=/dev/sdz

Of course "/dev/sdz" doesn't exist, but because it does not exist the system will give me initramfs shell as it can't boot.

The initramfs shell is like a swiss-knife where you can manually mount your real filesystem and fix many fings (for example a wrong fstab entry).
I do this even with encrypted lvm partition.

Offline

#9 2012-08-01 19:25:55

jjacky
Member
Registered: 2011-11-09
Posts: 347
Website

Re: systemd and recovery boot

Have a look here: https://wiki.archlinux.org/index.php/Mk … tomization
You can add break to your kernel line to get a shell on your initram, you can even decide to get it before or after mounting...

Offline

#10 2012-08-01 23:36:06

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd and recovery boot

Sorry it's taken me a couple of days to come back to this, but my day job and experimenting have got in the way.

I copied sulogin in to /sbin and it made no difference at all, so on to step two, using initramfs, which is getting closer, particularly using the break point.

However, nothing here yet provides a true recovery system, which is what I long for. At the moment we are restricted to either a recovery system than will allow us to change system config files, or a chroot environment from a live boot that will let us modify the system generally, but nothing compares to init for system recovery where you can get both with a recovery boot.

For now, and since I already have a clonezilla ISO conigured in grub for boot, I may make a modified Arch ISO that I can boot to with the full chroot set up at login, but it would be far better to be able to boot the existing system to a recovery tty without the extraneous stuff starting. Surely rescue.service or emergency.service should stop all other *.services  running, thus giving us a true recovery option.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

Board footer

Powered by FluxBB