On Fri, 18 Apr 2014 11:51:30 +0200 Markus Wichmann <nullp...@gmx.net> 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. Cheers FRIGN -- FRIGN <d...@frign.de>