From owner-freebsd-current Wed Dec 11 21: 5:25 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D6D237B401 for ; Wed, 11 Dec 2002 21:05:23 -0800 (PST) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id B513E43ED8 for ; Wed, 11 Dec 2002 21:05:22 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.12.6/8.12.6) with ESMTP id gBC55BNd078414; Wed, 11 Dec 2002 21:05:11 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.12.6/8.12.6/Submit) id gBC55BGK078413; Wed, 11 Dec 2002 21:05:11 -0800 (PST) Date: Wed, 11 Dec 2002 21:05:11 -0800 From: Steve Kargl To: Kris Kennaway Cc: Andrew Thompson , freebsd-current@FreeBSD.ORG Subject: Re: Jailing a 4.7 environment on 5.0? Message-ID: <20021212050511.GA78336@troutmask.apl.washington.edu> References: <20021212001931.GA76871@troutmask.apl.washington.edu> <20021212005216.GA87536@rot13.obsecurity.org> <02Dec12.135649nzdt.119048@homer.fire.org.nz> <20021212010846.GA77330@troutmask.apl.washington.edu> <20021212011712.GA87978@rot13.obsecurity.org> <20021212033405.GA77952@troutmask.apl.washington.edu> <20021212040713.GA91883@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021212040713.GA91883@rot13.obsecurity.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Dec 11, 2002 at 08:07:14PM -0800, Kris Kennaway wrote: > On Wed, Dec 11, 2002 at 07:34:05PM -0800, Steve Kargl wrote: > > > > Replace the 'cd %D/dev; sh MAKEDEV jail' with 'mount -t devfs / $D/dev' > > > > > > > Thanks for the pointer. The entire example doesn't > > apply because my /usr/src is FreeBSD 5.0. I have > > 4.7-disc2.iso and used a md device to copy the files > > into a jail. It appears to work, but I have a few more > > things to set up. I'll report with a full description > > of what I'm doing later. > > Um, that's not what I said at all. Just use devfs and be done with > it. Your way isn't likely to work now (different device numbers > between 5.0 and 4.x) or in the future (future changes to how devices > work). > You misunderstood. Here's the example again from jail(8). D=/here/is/the/jail cd /usr/src mkdir -p $D make world DESTDIR=$D cd etc make distribution DESTDIR=$D cd $D/dev sh MAKEDEV jail cd $D ln -sf dev/null kernel My /usr/src is FreeBSD 5.0. I need a 4.7 environment. I cannot do steps 2 and 4-8. I did mkdir /usr/jail mdconfig -a -t vnode -f 4.7-disc2.iso -u 0 mount /dev/md0 /mnt cp -pR /mnt/bin /usr/jail cp -pR /mnt/sbin /usr/jail cp -pR /mnt/usr /usr/jail cp -pR /mnt/etc /usr/jail cp -pR /mnt/var /usr/jail mkdir /usr/jail/dev mount -t devfs / /usr/jail/dev cd /usr/jail ln -sf dev/null kernel I'm now ready to configure the jail for my proposes. What I could not determine from jail(8) was how to set up /usr/jail/dev. You gave me the pointer to setting up devfs. For my application, I need jail/dev/{null,stdin,stdout, stderr}, gcc 2.9.4, whatever version of binutils is used on 4.7, and /usr/lib/lib{c,m}.so.X and libgcc.a -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message