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

Re: chroot in /usr and initrd booting



On Tue, Jun 11, 2002 at 03:33:54PM -0400, Matt Zimmerman wrote:
> On Tue, Jun 11, 2002 at 02:20:19PM -0500, Steve Langasek wrote:

> > On Tue, Jun 11, 2002 at 02:59:45PM -0400, Matt Zimmerman wrote:

> > > chroot(8) doesn't chroot its parent process either.  If pivot_root were
> > > doing that job in this instance, it would presumably work similarly to
> > > chroot(8).

> > So you're suggesting a syntax such as

> >   exec pivot_root /newroot /newroot/mnt [ /sbin/init | <command> ]

> > ?  That seems more awkward to me than the current behavior;

> What would you do with pivot_root and chroot?

> pivot_root /newroot /newroot/mnt
> exec chroot /newroot /sbin/init

> Doesn't seem any better.

But it doesn't seem any worse, IMHO.

> > in particular, there are a few commands I'm running here after pivotting
> > and before exec'ing init.  I guess I don't see much advantage to making
> > pivot_root a more complex tool just for this reason.

> If you are doing that, then those commands are executing within the initrd
> root anyway, correct?  Then what difference does it make whether they happen
> before or after pivot_root?

I'll have to think on that.  Currently, we're not doing the chroot at
all, because it's not necessary with the kernel we run.

Steve Langasek
postmodern programmer

Attachment: pgpEWRfF6bkmu.pgp
Description: PGP signature


Reply to: