Re: [dev][ubase] Implement switch_root

From: FRIGN <>
Date: Fri, 18 Apr 2014 12:00:21 +0200

On Fri, 18 Apr 2014 11:51:30 +0200
Markus Wichmann <> wrote:

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

Read my response for the reasons.
To put it shortly, pivot_root is like shooting birds with cannons.

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

That's what I suspected, too. Switching root is so critical, I wouldn't
trust a shell-script to do the job anyway.
There are hundreds of ways this could fail in the process.



Received on Fri Apr 18 2014 - 12:00:21 CEST

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