Re: [dev][ubase] Implement switch_root

From: FRIGN <>
Date: Thu, 17 Apr 2014 12:26:09 +0200

On Wed, 16 Apr 2014 23:10:23 +0100
Dimitris Papastamos <> wrote:

> > i just note that pivot_root is a linux system call
> > so implementing that tool is a one-liner in c

We don't need this here, given we don't give a damn about preserving
the initramfs somewhere.
I would agree on using syscalls to avoid long hacks and system-specific
behaviour, but wiping / and mounting something over it is trivial.
Besides, I often made the experience that syscalls can turn out to be
very complex and intransparent.
It may be a one-liner in C, but who knows what happens behind closed

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

Well, sh doesn't work when you don't have a shell on your initrd (like
I do), but you already explained that to him afaik.
However, I think Markus just sketched the functionality in sh and
implied it to be implemented in C regardless.



Received on Thu Apr 17 2014 - 12:26:09 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 17 2014 - 12:36:07 CEST