From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 3 10:06:52 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9A016A403 for ; Wed, 3 Jan 2007 10:06:52 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id 1D22313C428 for ; Wed, 3 Jan 2007 10:06:51 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so2702427nzh for ; Wed, 03 Jan 2007 02:06:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ug2DJAZ2+inW2Pq5YgTZr5KzkJ7ufitjUkGpwvH7wEG3d5UbblERENgbnRJR3whhXSrKY1hRvf05sR1SbiboicFeiLtWsWF+dIN2oV8sgkc0umJq0oAqGkffLN7Qpv+HD1qqcZxWum7ODy2JqqI+47L2Anv01Lc+vTjfKFLUUzI= Received: by 10.65.180.7 with SMTP id h7mr27687103qbp.1167818811512; Wed, 03 Jan 2007 02:06:51 -0800 (PST) Received: by 10.65.132.14 with HTTP; Wed, 3 Jan 2007 02:06:51 -0800 (PST) Message-ID: <6e3d78920701030206he4dd6e7h41445b0275fde50d@mail.gmail.com> Date: Wed, 3 Jan 2007 12:06:51 +0200 From: "Erik Udo" To: freebsd-hackers@freebsd.org In-Reply-To: <6e3d78920701030151o3bcbf129yeff694d9f064985f@mail.gmail.com> MIME-Version: 1.0 References: <4592C91C.2040801@gmail.com> <6e3d78920701030151o3bcbf129yeff694d9f064985f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 10:06:52 -0000 Nah, forget that patch, it's missing alot of stuff. On 1/3/07, Erik Udo 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 > > " > > > > >