Subject: Re: PATCH: init(8) - multiuser under chroot
To: Daniel Carosone <>
From: Jachym Holecek <>
List: tech-userlevel
Date: 05/31/2005 11:05:52
> On Mon, May 30, 2005 at 12:28:38PM -0700, Simon J. Gerraty wrote:
> > Not sure I like this bit though.  Once etc/rc finishes successfully,
> > I make init chroot itself, keeps things nice and simple.  
> Init chroot's itself before starting the 'real' rc, opening tty's,
> etc? I think I prefer this simplicity, too.

That's an obvious and failsafe approach. The invariant of "single user
always on real root" prove _very_ useful while testing at the least
though. Further, a few "if (did_multiuser_chroot)" conditionals give you
the ability to do multiple chroot sessions. That seemed like TRT to me,
but I admit I can't think of a terribly practical scenario off the top
of my head.

> It's a pity that there's no way to unmount the real root md, but
> there's not really much point unless/until we could recover the memory
> used once it was unmounted.  If that ever becomes possible, we can
> revisit this aspect then.

Would be a nice feature...

> > As you found, going back and forth b/w single/multi-user doesn't work well
> > so I don't even pretend that it will work.  Boot single user or multi-user
> > end of story.

It was just a couple of minor "surprises" here and there. In any case,
I'm going to have a closer look as soon as I find a free timeslot.

> Yeah, it's not like any changes you make at single-user in the md root
> are going to be permanent.

Note that the scheme isn't md-specfic in any way -- you can boot off an
USB flash disk and migrate to a cgd@wd0 multi-user (ch)root.

		-- Jachym Holecek