Re: Re : Possible to run Linux distro in a jail?

2010-05-30 Thread Gary Kline
On Sun, May 30, 2010 at 12:10:44PM +0100, Vincent Hoffman wrote:
> On 30/05/2010 08:10, Matthew Seaman wrote:
> > On 29/05/2010 22:15:37, Alexandre L. wrote:
> > > I have this link to a French Blog :
> > http://blog.etoilebsd.net/post/Emprisonner_une_debian_dans_un_FreeBSD
> >
> > > This describe how to "jail" a Linux Debian in FreeBSD.
> >
> > > I hope this will help you. I haven't used it.
> > > Thanks to its author : Baptiste Daroussin.
> >
> > This is technically not Debian *Linux* at all -- it's a Debian project
> > to merge a BSD kernel with all the GNU shlibs and the various other
> > utilities used on Debian systems.  See
> > http://www.debian.org/ports/kfreebsd-gnu/ and
> > http://wiki.debian.org/Debian_GNU/kFreeBSD
> Actually my reading of it is a linux userland running under linux
> compatibility mode as a jail. So no not linux but not quite kFreeBSD either.
> 


thid may be a bit off target, but several years ago i was
into porting the freebsd kernel over to the debian world.
besides keeping up my cheerleading, i actually did about 27%
of the libc port.  then things began fading.  there may well 
be a debbsd that was abandoned.

google around if interested.  

gary



> Vince
> >
> > jail(8) uses the same kernel image in the jail as in the base system.
> > So, in general, jails have to contain pretty much the same OS as the
> > base.  There are some variations possible, like running a 32-bit world
> > in a jail on a 64-bit box, or running alternate FreeBSD versions to the
> > main system (takes a bit of tweaking to make work properly, but this is
> > used by the ports build cluster for example).
> >
> > Cheers,
> >
> > Matthew
> >
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
The 7.83a release of Jottings: http://jottings.thought.org/index.php
   http://journey.thought.org  99 44/100% Guaranteed Novel

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re : Possible to run Linux distro in a jail?

2010-05-30 Thread Vincent Hoffman
On 30/05/2010 08:10, Matthew Seaman wrote:
> On 29/05/2010 22:15:37, Alexandre L. wrote:
> > I have this link to a French Blog :
> http://blog.etoilebsd.net/post/Emprisonner_une_debian_dans_un_FreeBSD
>
> > This describe how to "jail" a Linux Debian in FreeBSD.
>
> > I hope this will help you. I haven't used it.
> > Thanks to its author : Baptiste Daroussin.
>
> This is technically not Debian *Linux* at all -- it's a Debian project
> to merge a BSD kernel with all the GNU shlibs and the various other
> utilities used on Debian systems.  See
> http://www.debian.org/ports/kfreebsd-gnu/ and
> http://wiki.debian.org/Debian_GNU/kFreeBSD
Actually my reading of it is a linux userland running under linux
compatibility mode as a jail. So no not linux but not quite kFreeBSD either.

Vince
>
> jail(8) uses the same kernel image in the jail as in the base system.
> So, in general, jails have to contain pretty much the same OS as the
> base.  There are some variations possible, like running a 32-bit world
> in a jail on a 64-bit box, or running alternate FreeBSD versions to the
> main system (takes a bit of tweaking to make work properly, but this is
> used by the ports build cluster for example).
>
> Cheers,
>
> Matthew
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re : Possible to run Linux distro in a jail?

2010-05-30 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 29/05/2010 22:15:37, Alexandre L. wrote:
> I have this link to a French Blog : 
> http://blog.etoilebsd.net/post/Emprisonner_une_debian_dans_un_FreeBSD
> 
> This describe how to "jail" a Linux Debian in FreeBSD.
> 
> I hope this will help you. I haven't used it. 
> Thanks to its author : Baptiste Daroussin.

This is technically not Debian *Linux* at all -- it's a Debian project
to merge a BSD kernel with all the GNU shlibs and the various other
utilities used on Debian systems.  See
http://www.debian.org/ports/kfreebsd-gnu/ and
http://wiki.debian.org/Debian_GNU/kFreeBSD

jail(8) uses the same kernel image in the jail as in the base system.
So, in general, jails have to contain pretty much the same OS as the
base.  There are some variations possible, like running a 32-bit world
in a jail on a 64-bit box, or running alternate FreeBSD versions to the
main system (takes a bit of tweaking to make work properly, but this is
used by the ports build cluster for example).

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwCD1kACgkQ8Mjk52CukIwBwACfQrvrrACAdgnweqvMF1B9liC/
iW0AoIho55QX+ryuiD7PnKD4U7+QZQVf
=b2qu
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re : Possible to run Linux distro in a jail?

2010-05-29 Thread Alexandre L.
I have this link to a French Blog : 
http://blog.etoilebsd.net/post/Emprisonner_une_debian_dans_un_FreeBSD

This describe how to "jail" a Linux Debian in FreeBSD.

I hope this will help you. I haven't used it. 
Thanks to its author : Baptiste Daroussin.

I translated it in English : 

<<<<<<<<<

# mkdir /home/jails/debian
# mkdir /home/jails/debian/dev
# mkdir /home/jails/debian/proc
# mkdir /home/jails/debian/sys
# kldload linux
# kldload linprocfs
# kldload linsysfs
# kldload lindev
# mount -t devfs none /home/jails/debian/dev
# mount -t linprocfs none /home/jails/debian/proc
# mount -t linsysfs none /home/jails/debian/sys

We are using /home/jails/debian for the root of the Linux Debian.
We will load all the necessary devices (nota : lindev appeared in Freebsd 
9-CURRENT and has MFCed in 8-STABLE, it is not obligatory).

We could do the install with debootstrap, but I prefered to use an openvz 
template : 
# fetch http://download.openvz.org/template/precreated/debian-5.0-x86.tar.gz

And I unpack it in my jail : 
# tar xvfp debian-5.0-x86.tar.gz -C debian --exclude dev* --exclude proc* 
--exclude sys*

To correctly start my jail, at least 1 service must be started in the jail (I 
failed to build a persistent linux jail only). By default the startup script of 
jails try to launch /etc/rc that we will create and launch /etc/rc.shutdown to 
stop it.

# echo "/etc/init.d/cron start" > /home/jails/debian/etc/rc
# chmod 755 /home/jails/debian/etc/rc
# echo "/etc/init.d/cron stop" > /home/jails/debian/etc/rc.shutdown
# chmod 755 /home/jails/debian/etc/rc.shutdown

In /etc/rc.conf we configure the startup of the jail : 
jail_debian_rootdir=/home/jails/debian
jail_debian_hostname="debian"
jail_debian_ip="192.168.1.3"
jail_debian_interface="nfe0"
jail_debian_devfs_enable="YES"
jail_debian_devfs_ruleset="devfsrules_jail"
jail_debian_flags="-n debian"

We start the jail : 
# /etc/rc.d/jail start debian

And voilà : 
#jls
   JID  IP Address  Hostname  Path
15  192.168.1.3 debian/home/jails/debian
#jexec debian uname -a
Linux debian 2.6.16 FreeBSD 8.0-STABLE #3: Sun Jan 10 20:39:38 CET 2010 i686 
GNU/Linux
#jexec debian cat /etc/debian_version
5.0.4

Here a beautiful Debian Linux jailed in FreeBSD
But be careful, not everything works perfectly : sysklogd don't run cause to 
/dev access. But 99% is functional.

--- En date de : Ven 28.5.10, Yuri  a écrit :

> De: Yuri 
> Objet: Possible to run Linux distro in a jail?
> À: "freebsd-questions" 
> Date: Vendredi 28 mai 2010, 20h16
> When I googled "linux in a jail" I
> got some references but no particular howto.
> Since currently VirtualBox is broken (hangs OS after a
> while), is it really possible to install Linux into a jail
> as a virtual machine?
> 
> Yuri
> ___
> freebsd-questions@freebsd.org
> mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>



   

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Possible to run Linux distro in a jail?

2010-05-28 Thread Tim Judd
On 5/28/10, Yuri  wrote:
> When I googled "linux in a jail" I got some references but no particular
> howto.
> Since currently VirtualBox is broken (hangs OS after a while), is it
> really possible to install Linux into a jail as a virtual machine?
>
> Yuri



No.


Jail is a userland "world" sharing the kernel
"linux" in it's own term is a kernel
  If you mean a distribution, I still doubt it heavily; only possible
remote chance is a   kFreeBSD/gnu userland.  I discourage further
attempts at it.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Possible to run Linux distro in a jail?

2010-05-28 Thread Yuri
When I googled "linux in a jail" I got some references but no particular 
howto.
Since currently VirtualBox is broken (hangs OS after a while), is it 
really possible to install Linux into a jail as a virtual machine?


Yuri
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"