[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 02:59:45PM -0400, Matt Zimmerman wrote:
> On Tue, Jun 11, 2002 at 01:34:00PM -0500, Steve Langasek wrote:

> > On Tue, Jun 11, 2002 at 02:31:32PM -0400, Matt Zimmerman wrote:
> > > If a chroot() will always (or almost always) be required after
> > > pivot_root(), it should simply be done in pivot_root.c, and the 'chroot'
> > > program can stay where it is.

> > How do you make the pivot_root command chroot its parent process?  And
> > even if you can, does it follow that this is always correct?

> 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; 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.

Steve Langasek
postmodern programmer

Attachment: pgp4gzwZpgjsu.pgp
Description: PGP signature


Reply to: