[systemd-devel] Cannot recover / migrate a Linux system due to systemd?

Lennart Poettering lennart at poettering.net
Tue Aug 29 13:52:08 UTC 2017


On Mo, 28.08.17 14:05, 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?

That should just work.

> Thus, using the kernel+initrd built-in on the USB stick or CD and booting
> into my system.  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)

If it's a symlink it should just work, and find the right binary to start.

> 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.

Maybe the kernel you are using is simply too old or doesn't come with
the bits enabled that systemd needs for operating? Note that systemd
requires a few things from the kernel (cgroups for example) that
live distros that aren't using systemd themselves aren't enabling in
their kernel builds (or are enabling, but as a kmod, where we require
it to be built-in).

Our various test suites actually including booting VMs without
initrds, and hence the general concept should work fine -- as long as
the kernel has everything neeeded.

> Is this the new method to re-install a skeleton OS and then move the
> contents of root back or is there a better way-- is it possible to use
> systemd and boot into a system like I did before?  Was I missing a
> particular flag or option?

Yes, this should just work, and continues to be supported. But of
course if there's a mismtach between the kernel you boot and the
requirements systemd makes things will fall apart. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list