Systemd: how to get into rescue mode
Tom H
tomh0665 at gmail.com
Fri Jan 10 21:34:08 UTC 2020
On Mon, Jan 6, 2020 at 12:21 PM Liam Proven <lproven at gmail.com> wrote:
> 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 hasn't. Although the "rescue" grub boot entry's disabled in Fedora,
RHEL, and RHEL clones.
Given this thread, it looks like switching from "graphical.target" to
"rescue.target" is brokem, but booting into "rescue.target" works,
either by using the sysvinit switches "-s" "s" "S" "1" or their
systemd equivalent "systemd.unit=rescue.target".
FTR, there's also "systemd.unit=emergency.target", which is the
equivalent of "-b" for sysvinit.
> 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. Unity was great and
> good enough reason to tolerate systemd, but with no Unity and only
> much the same choice of desktops as any other distro, well, there are
> reasons to reconsider now.
>
> I deeply wish Ubuntu had followed a more conservative, minimal
> direction with Unity 8, such as basing it on Wayland (or even some
> other existing display server) instead of trying to build their own as
> well.
I also wish that Canonical'd used X and Wayland (or only Wayland) with
Unity 8. And hadn't wasted resources on Mir, Launchpad, and Bazaar...
>> 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?
>
> 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.
>
> [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.
Also: learn to drop to the initramfs' shell. But I prefer dracut to
initramfs-tools because it allows you to use bash rather than sh as
provided by Busybox.
More information about the ubuntu-users
mailing list