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. Ciao, Markus