lkml.org 
[lkml]   [2000]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.108 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site