Messages in this thread | | | Date | Tue, 25 Jan 2000 15:16:12 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] root-hopping for pre-2.3.41-3 |
| |
Matthew Kirkwood wrote: > > On Tue, 25 Jan 2000, H. Peter Anvin wrote: > > > > > pivot_root("new_root", "old_root"); > > > > > > ... with an implicit "chroot everybody on / to /new_root". That would > > > solve a few problems, yes. I'll give it a try. > > > > Right... everyone on the old / move to the new /, although I guess > > that's technically not 100% necessary. > > Even possible? > > Where does someone in /boot end up when there is no /new_root/boot? >
I think we were talking about the root, not the cwd. However, the same issues apply. I think the cleanest is to not do anything, although it may have some serious problems.
For the normal case where you'd have no processes except a pseudo-init running, you'd just do chdir("/"); chroot("/"); before you execl("/sbin/init", "init", 0); but I don't know if there are other applications in which it would be an issue.
-- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |