Re: pivot_root broken in 2.6.15-rc1-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 22 November 2005 21:01, Neil Brown wrote:
> Ah, OK.
> It's just that pivot_root works in this context in 2.6.11.9, so I
> figured it was a breakage.

And if you then umount the ramfs you just pivoted, the kernel locks hard.

That was a bug.

What you're looking for is switch_root, which has variants buried in klib, or 
in the current CVS version of busybox, or glued into Red Hat's weird little 
multi-function ramdisk shell, and probably a few other places by now.

Rather than unmounting rootfs, it deletes everything out of it to free up the 
space.  (It basically does the functional equivalent of "find / -xdev | xargs 
rm -rf", overmounts the old root with the new root, does a chroot, and execs 
the new init out of the new root.  Actually getting it right's a bit tricky, 
of course.  I still need to test the busybox version a whole lot more.  It's 
on my to-do list...)

Rob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux