<p dir="ltr">Thanks Lennart,</p>
<p dir="ltr">I tried pivot_root briefly last night after emailing but my initial attempt didn't work. Unfortunately I next tried switch_root, which, lol, wiped my root partition.</p>
<p dir="ltr">I'll try pivot_root when I get a working computer again.</p>
<p dir="ltr">Thanks again<br>
-JT</p>
<br><div class="gmail_quote">On Thu, May 14, 2015, 10:25 AM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 14.05.15 06:12, JT Olds (<a href="mailto:jtolds@xnet5.com" target="_blank">jtolds@xnet5.com</a>) wrote:<br>
<br>
> Hey folks!<br>
><br>
> I'm getting lots of systemd errors like<br>
> `Failed at step NAMESPACE spawning /usr/lib/rtkit/rtkit-daemon: Invalid<br>
> argument` and just wondering what I'm doing wrong.<br>
><br>
> For background: I have a linux computer that's running Debian Wheezy. I<br>
> want to install and dual boot Jessie, but without creating a new partition,<br>
> so I want to do it in a chroot (cause why not, I should be able to,<br>
> right?).<br>
<br>
Sorry, but this simply cannot work: a chroot() is too weak, and<br>
doesn't mix well with file system namespacing (which triggers the<br>
errors you are seeing). Proper file system namespacing hides the fact<br>
pretty well that things are namespaced, but chroot does<br>
not. Especially if you then mix namespacing and chroot things become<br>
ugly...<br>
<br>
Hence, please do not use chroot for what you are trying to do. Please<br>
either use namespacing (i.e. mount --move) or privot_root() for this.<br>
<br>
> I ran `debootstrap jessie /jessie` and got a full Jessie<br>
> installation in that subfolder (via tasksel and everything). I then edited<br>
> GRUB to have a menu option that boots linux like this:<br>
><br>
> linux /jessie/vmlinuz root=UUID=<uid> rw init=/jessie/chrootinit<br>
> initrd /jessie/initrd.img<br>
><br>
> Last, I created chrootinit that wraps systemd:<br>
><br>
> #!/bin/bash<br>
> exec chroot /jessie /sbin/init "$@"<br>
<br>
This should work fine if you use pivot_root instead of chroot. Both<br>
tools are part of util-linux.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</blockquote></div>