Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2007 12:06:51 +0200
From:      "Erik Udo" <erik.udo@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Init.c, making it chroot
Message-ID:  <6e3d78920701030206he4dd6e7h41445b0275fde50d@mail.gmail.com>
In-Reply-To: <6e3d78920701030151o3bcbf129yeff694d9f064985f@mail.gmail.com>
References:  <4592C91C.2040801@gmail.com> <6e3d78920701030151o3bcbf129yeff694d9f064985f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Nah, forget that patch, it's missing alot of stuff.

On 1/3/07, Erik Udo <erik.udo@gmail.com> wrote:
>
> I just made patch. It's supposed to run /etc/rc before chrooting. This is
> the NetBSD "way" of doing it. All i can say is that it compiled. So if
> anyone can look at it before i get to test it becouse i might be forgetting
> something. (i can't even test it now)
>
> diff attached.
>
> On 12/27/06, Erik Udo < erik.udo@gmail.com> wrote:
> >
> > How can i make init chroot after executing /etc/rc, and executing
> > /etc/rc again in the chrooted enviroment?
> >
> > For this to work, i'd like to know at what point do i call chroot(),
> > becouse init.c uses fork() at the point where it runs the rc script.
> >
> > The thing is, i want to run a whole system in a chrooted enviroment in
> > this livecd i'm making. But the command "chroot /mnt/root /etc/rc"
> > returns after the /etc/rc has been run, dropping me back from the
> > chrooted enviroment. And if it doesn't, init never starts the multiuser
> > mode.
> >
> > So how can i go to the multiuser mode in a chrooted enviroment? I guess
> > the only way to do that is to modify init.c
> >
> > Any help/feedback is appreciated.
> >
> > Cheers, Erik
> >
> > _______________________________________________
> > freebsd-hackers@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org
> > "
> >
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6e3d78920701030206he4dd6e7h41445b0275fde50d>