Systemd: how to get into rescue mode

Volker Wysk post at volker-wysk.de
Mon Jan 6 12:28:14 UTC 2020


Am Montag, den 06.01.2020, 12:18 +0100 schrieb Liam Proven:
> On Mon, 6 Jan 2020 at 08:43, Volker Wysk <post at volker-wysk.de> wrote:
> > Thank you for your answer, but I think you've missed the point. I
> > can't
> > type any command after doing "systemctl isolate rescue.target".
> > What I
> > type isn't displayed. Nothing at all happens. It doesn't look like
> > a
> > rescue shell is running.
> 
> Aha! TBH I was going to say something similar to "Little Girl" --
> that
> most of that stuff _shouldn't_ work.
> 
> I had not realised that systemd has also eliminated single-user mode.
> It is occasionally useful. 

Again, from that magazine article, I'd expect the rescue.target to
work, and spawn a shell. And this should be in single-user mode (as far
as I can tell), although it isn't mentioned. 

> I also deeply miss runlevel 4, which is
> full multitasking but no GUI -- that is often useful for
> troubleshooting graphics driver issues, especially in my case with
> nVidia binary driver issues.

>From what I've read on the web, there is the systemd target "multi-
user.target", which should do what you have in mind. But I really don't
know much about systemd.

> This is one reason I am looking at other distros, such as Devuan,
> which do not use systemd. I do not like it, and I do not like GNOME
> 3,
> and desktop Ubuntu is very centred on these now. 

I've been exposed to systemd only a little so far, but I like it. I
also like Gnome 3.

> > I've got the "systemctl isolate rescue.target" command from that
> > article in the LinxUser magazine. They advise to do it when making
> > a
> > backup, so there are no more files which are being used by running
> > services.
> 
> I am at a loss why this does not work. Are you still doing complex
> things involving LVM and so on underneath?

I'm using LVM, because the ubuntu installer uses it, when you choose to
encrypt the root file system - even when you have only one physical
volume. I'm not using my SSD-as-a-cache any longer.

> All I have to offer is very limited, and can be reduced to 2
> suggestions.
> 
> [1] Always have a bootable USB key with your current version of your
> distro on it. This is the primary troubleshooting method these days,
> not single-user mode or relatives thereof. Make sure it's current
> enough to be able to mount your root and home filesystems,
> _especially_ if you are doing anything exotic.

Yes, I have a maintenance system on an USB stick. And I've made sure
that I can access my SSD and HDD (and my external HDD for backups) with
it.

> [2] Familiarize yourself with booting the kernel and initrd from
> removable media, but mounting and running root from the hard disk.
> This is a real life-saver sometimes.

What would be the benefit? It sounds complicated to set up.


Cheers,
Volker





More information about the ubuntu-users mailing list