Jailing a 4.7 environment on 5.0?
Is is possible to set up a jail that contains 4.7 on a 5.0 system? In particular, how does one deal with the difference between devfs and MAKEDEV? -- Steve To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Jailing a 4.7 environment on 5.0?
On Thu, 2002-12-12 at 13:52, Kris Kennaway wrote: On Wed, Dec 11, 2002 at 04:19:31PM -0800, Steve Kargl wrote: Is is possible to set up a jail that contains 4.7 on a 5.0 system? Yes. But doesnt a jail share the same kernel? (I have never set one up so I dont know what I am talking about :) Andy To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Jailing a 4.7 environment on 5.0?
On Thu, Dec 12, 2002 at 01:56:40PM +1300, Andrew Thompson wrote: On Thu, 2002-12-12 at 13:52, Kris Kennaway wrote: On Wed, Dec 11, 2002 at 04:19:31PM -0800, Steve Kargl wrote: Is is possible to set up a jail that contains 4.7 on a 5.0 system? Yes. But doesnt a jail share the same kernel? (I have never set one up so I dont know what I am talking about :) Yes, it does use the same kernel. If you read the jail(8) man page, it discusses setting up a jail on a 4.x system. The first section contains This example shows how to setup a jail directory tree containing an entire FreeBSD distribution: 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 Clearly, this doesn't work on a 5.0 system if you want to set up a 4.7 jail. -- Steve To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Jailing a 4.7 environment on 5.0?
On Wed, Dec 11, 2002 at 05:08:46PM -0800, Steve Kargl wrote: On Thu, Dec 12, 2002 at 01:56:40PM +1300, Andrew Thompson wrote: On Thu, 2002-12-12 at 13:52, Kris Kennaway wrote: On Wed, Dec 11, 2002 at 04:19:31PM -0800, Steve Kargl wrote: Is is possible to set up a jail that contains 4.7 on a 5.0 system? Yes. But doesnt a jail share the same kernel? (I have never set one up so I dont know what I am talking about :) Yes, it does use the same kernel. If you read the jail(8) man page, it discusses setting up a jail on a 4.x system. The first section contains This example shows how to setup a jail directory tree containing an entire FreeBSD distribution: 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 Clearly, this doesn't work on a 5.0 system if you want to set up a 4.7 jail. Replace the 'cd %D/dev; sh MAKEDEV jail' with 'mount -t devfs / $D/dev' Kris msg48571/pgp0.pgp Description: PGP signature
Re: Jailing a 4.7 environment on 5.0?
On Wed, Dec 11, 2002 at 05:17:12PM -0800, Kris Kennaway wrote: On Wed, Dec 11, 2002 at 05:08:46PM -0800, Steve Kargl wrote: This example shows how to setup a jail directory tree containing an entire FreeBSD distribution: 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 Clearly, this doesn't work on a 5.0 system if you want to set up a 4.7 jail. 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. -- Steve To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Jailing a 4.7 environment on 5.0?
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). Kris msg48578/pgp0.pgp Description: PGP signature
Re: Jailing a 4.7 environment on 5.0?
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 [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message