Messages in this thread | | | From | "H. Peter Anvin" <> | Subject | Re: klibc | Date | Fri, 9 Jun 2006 11:45:24 -0700 (PDT) |
| |
Followup to: <8764ja7o2d.fsf@hades.wkstn.nix> By author: Nix <nix@esperi.org.uk> In newsgroup: linux.dev.kernel > > > > You shouldn't pivot_root the rootfs filesystem. > > What happens if you do? I mean, it doesn't make even conceptual sense, > really. The rootfs is always there: that's its entire purpose. >
"What happens if you do"... well, it may work, it might not, it may break some functionality for you or break in a future kernel version. It's undefined behaviour.
> > Use the run-init > > utility or something similar instead (which does a mount with > > MS_MOVE.) > > busybox has a switch_root tool which (conceptually) rm -rf's everything > on the root filesystem and then does such a mount. (After all whatever > is on that filesystem is inaccessible after the overmount, so keeping > it around is just a waste of memory.)
What busybox calls switch_root is the same as the run-init tool from the klibc distribution.
-hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |