[systemd-devel] Cannot recover / migrate a Linux system due to systemd?
Mantas Mikulėnas
grawity at gmail.com
Mon Aug 28 19:21:10 UTC 2017
On Mon, Aug 28, 2017 at 9:05 PM, Justin Piszcz <jpiszcz at lucidpixels.com>
wrote:
> Hello,
>
> Question - Is it no longer possible (on distributions with systemd) to use
> a rescue USB/CD to boot into a Linux environment that uses systemd?
>
> Background- I've been using Linux for the past 20 years and I have always
> been able to use Knoppix or System Recue CD to rescue/migrate/repair a
> Linux system with:
> boot: linux root=/dev/sda1
>
> Thus, using the kernel+initrd built-in on the USB stick or CD and booting
> into my system.
>
Kernel+initrd on the USB stick, but all remaining modules on the rootfs –
which could potentially have modules only for a *very different kernel
version* than the one on the USB stick. I am surprised this works at all
with highly-modular distro kernels.
(Well, I guess the initrd contains just enough modules for disk access and
stuff, and a rescue environment rarely needs much else...)
> Recently, I had to migrate my root filesystem from one array to another
> and found I could no longer do this due to systemd.
>
> I tried:
> boot: linux root=/dev/sda1 init=/bin/bash # this gets me into the system
> as it normally would
>
> However, I cannot boot into the system normally like I could before with:
> boot: linux root=/dev/sda1
>
> The error with the System Rescue CD is it cannot find /sbin/init (as this
> is a symlink to systemd)
>
> I then tried:
> boot: linux root=/dev/sda1 init=/lib/systemd/systemd
>
> Then I get the following error:
>
> [!!!!!!] Failed to mount API filesystems, freezing.
> Freezing execution.
>
I suspect this is also due to the kernel mismatch. Whether due to missing
modules, or due to the Knoppix kernel missing e.g. cgroup support, or due
to it being just *too old* for the installed systemd version...
(Or, if systemd was compiled with SMACK support, then failing to mount
/sys/fs/smackfs is considered to be critical, which I think is what the
sysadmin would expect.)
See src/core/mount-setup.c
<https://github.com/systemd/systemd/blob/master/src/core/mount-setup.c#L73-L118>
for which API filesystems are considered "critical".
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170828/f05f46e2/attachment.html>
More information about the systemd-devel
mailing list