Re: [dev][ubase] Implement switch_root

From: Markus Wichmann <>
Date: Fri, 18 Apr 2014 11:51:30 +0200

On Wed, Apr 16, 2014 at 11:10:23PM +0100, Dimitris Papastamos wrote:
> On Thu, Apr 17, 2014 at 12:07:46AM +0200, Szabolcs Nagy wrote:
> > so implementing that tool is a one-liner in c
> >
> > so it is easy to add if it's missing from ubase
> We already have pivot_root in ubase. Markus is basically asking
> why we implemented switch_root in C instead of in sh (as demonstrated
> in his e-mail).

Nope, that wasn't my question. Rather, I'd like to know why the OP wants
to use switch_root in his initrd instead of pivot_root, as the latter is
easier to use and already included in ubase. And it doesn't depend on
the filesystem type of the initrd.

Also, the shell script I posted was a mockup. It probably doesn't work
like that as drop-in, because for one it calls chroot and then does
stuff after that. I just didn't want to write all that in C as that
would have been way longer. I didn't deem it necessary for the purposes
of demonstration.

Received on Fri Apr 18 2014 - 11:51:30 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 18 2014 - 12:00:15 CEST