<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 28, 2017 at 9:05 PM, Justin Piszcz <span dir="ltr"><<a href="mailto:jpiszcz@lucidpixels.com" target="_blank">jpiszcz@lucidpixels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,<br><br>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?<br><br>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:<br>boot: linux root=/dev/sda1<br><br>Thus, using the kernel+initrd built-in on the USB stick or CD and booting into my system.</div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>(Well, I guess the initrd contains just enough modules for disk access and stuff, and a rescue environment rarely needs much else...)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Recently, I had to migrate my root filesystem from one array to another and found I could no longer do this due to systemd.<br><br>I tried:<br>boot: linux root=/dev/sda1 init=/bin/bash # this gets me into the system as it normally would<br><br>However, I cannot boot into the system normally like I could before with:<br>boot: linux root=/dev/sda1<br><br>The error with the System Rescue CD is it cannot find /sbin/init (as this is a symlink to systemd)<br><br>I then tried:<br>boot: linux root=/dev/sda1 init=/lib/systemd/systemd<br><br>Then I get the following error:<br><br>[!!!!!!] Failed to mount API filesystems, freezing.<br>Freezing execution.<br></div></div></blockquote><div><br></div><div>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...</div><div><br></div><div>(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.)</div></div><div><br></div><div>See <a href="https://github.com/systemd/systemd/blob/master/src/core/mount-setup.c#L73-L118">src/core/mount-setup.c</a> for which API filesystems are considered "critical".</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>