From owner-freebsd-questions@FreeBSD.ORG Sat May 29 21:15:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AE2D106566C for ; Sat, 29 May 2010 21:15:39 +0000 (UTC) (envelope-from axelbsd@ymail.com) Received: from n20.bullet.mail.ukl.yahoo.com (n20.bullet.mail.ukl.yahoo.com [87.248.110.137]) by mx1.freebsd.org (Postfix) with SMTP id AB2428FC12 for ; Sat, 29 May 2010 21:15:38 +0000 (UTC) Received: from [217.146.182.179] by n20.bullet.mail.ukl.yahoo.com with NNFMP; 29 May 2010 21:15:37 -0000 Received: from [87.248.110.52] by t5.bullet.ukl.yahoo.com with NNFMP; 29 May 2010 21:15:37 -0000 Received: from [127.0.0.1] by omp104.mail.ukl.yahoo.com with NNFMP; 29 May 2010 21:15:37 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 695953.31746.bm@omp104.mail.ukl.yahoo.com Received: (qmail 74661 invoked by uid 60001); 29 May 2010 21:15:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1275167737; bh=EclzImts2JjdvlDnJ/kc44wZO7Hbocorx8TpLFVKWdM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=blhPy3CpGyQZh9S+/DS7IZX+h5llFmJ24KfU25BfSHLaw/+TAhgkZtJSKK36Jue+LtwhqoSF2FCZhcua9YOgoBcfA/YVzAJWvJPMrj5bPX1nNyUQ3QRq9aW0KM5oWIX1wsutuW+8nctYLYD546xyfR2HxnZJMNiPO/QacFuAElg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Cswh94STqvrkPLSnun60kHcUTsdoxmFRMqtf6XpeuGkVJ9oUEWB3xZLxaNNpiuVWZqSGNa5ciMyjrS6kbmfcV/SYZ/Y25Pa+JZhIdEdN7Jmgir1pILOteYxHOsk8c06VooU9T2wRkxck1AzWOILitGaVK8lBiJlUSoq8cX+ngJo=; Message-ID: <533379.74324.qm@web24819.mail.ird.yahoo.com> X-YMail-OSG: 11kH4DMVM1mRWfW5KyjlmlQcGnJlM0nF6HRZAF.jdF4CB3u pI5BRUwf7qcsyyBdkh1wd8SlkEJUDgSHdw6Mxu9ELnvfoAqzxsV7Rc.pX4C9 AqvggV6.4Eg0ZQeLNw3VxL1wSHfHH6C2GmPpQqWTq4CQMtnUEtiS0L9rPWo1 AidoxK3Jk78BQnvQfPx7HKacRxJTYpyz1qBVI1h2rUe00NYk.3ewtPeCPTU2 9fGJrk1lJEC.papiaFflCjrpJTaoU3QD4Bg-- Received: from [82.243.40.23] by web24819.mail.ird.yahoo.com via HTTP; Sat, 29 May 2010 21:15:37 GMT X-Mailer: YahooMailClassic/11.0.8 YahooMailWebService/0.8.103.269680 Date: Sat, 29 May 2010 21:15:37 +0000 (GMT) From: "Alexandre L." To: freebsd-questions , Yuri MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re : Possible to run Linux distro in a jail? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2010 21:15:39 -0000 I have this link to a French Blog : http://blog.etoilebsd.net/post/Emprison= ner_une_debian_dans_un_FreeBSD=0A=0AThis describe how to "jail" a Linux Deb= ian in FreeBSD.=0A=0AI hope this will help you. I haven't used it. =0AThank= s to its author : Baptiste Daroussin.=0A=0AI translated it in English : =0A= =0A<<<<<<<<<=0A=0A# mkdir /home/jails/debian=0A# mkdir /home/jails/debian/d= ev=0A# mkdir /home/jails/debian/proc=0A# mkdir /home/jails/debian/sys=0A# k= ldload linux=0A# kldload linprocfs=0A# kldload linsysfs=0A# kldload lindev= =0A# mount -t devfs none /home/jails/debian/dev=0A# mount -t linprocfs none= /home/jails/debian/proc=0A# mount -t linsysfs none /home/jails/debian/sys= =0A=0AWe are using /home/jails/debian for the root of the Linux Debian.=0AW= e will load all the necessary devices (nota : lindev appeared in Freebsd 9-= CURRENT and has MFCed in 8-STABLE, it is not obligatory).=0A=0AWe could do = the install with debootstrap, but I prefered to use an openvz template : = =0A# fetch http://download.openvz.org/template/precreated/debian-5.0-x86.ta= r.gz=0A=0AAnd I unpack it in my jail : =0A# tar xvfp debian-5.0-x86.tar.gz = -C debian --exclude dev* --exclude proc* --exclude sys*=0A=0ATo correctly s= tart my jail, at least 1 service must be started in the jail (I failed to b= uild 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 st= op it.=0A=0A# echo "/etc/init.d/cron start" > /home/jails/debian/etc/rc=0A#= chmod 755 /home/jails/debian/etc/rc=0A# echo "/etc/init.d/cron stop" > /ho= me/jails/debian/etc/rc.shutdown=0A# chmod 755 /home/jails/debian/etc/rc.shu= tdown=0A=0AIn /etc/rc.conf we configure the startup of the jail : =0Ajail_d= ebian_rootdir=3D/home/jails/debian=0Ajail_debian_hostname=3D"debian"=0Ajail= _debian_ip=3D"192.168.1.3"=0Ajail_debian_interface=3D"nfe0"=0Ajail_debian_d= evfs_enable=3D"YES"=0Ajail_debian_devfs_ruleset=3D"devfsrules_jail"=0Ajail_= debian_flags=3D"-n debian"=0A=0AWe start the jail : =0A# /etc/rc.d/jail sta= rt debian=0A=0AAnd voil=E0 : =0A#jls=0A JID IP Address Hostname = Path=0A 15 192.168.1.3 debian = /home/jails/debian=0A#jexec debian uname -a=0ALinux debian 2.6.16 FreeB= SD 8.0-STABLE #3: Sun Jan 10 20:39:38 CET 2010 i686 GNU/Linux=0A#jexec debi= an cat /etc/debian_version=0A5.0.4=0A=0AHere a beautiful Debian Linux jaile= d in FreeBSD=0ABut be careful, not everything works perfectly : sysklogd do= n't run cause to /dev access. But 99% is functional.=0A=0A--- En date de=A0= : Ven 28.5.10, Yuri a =E9crit=A0:=0A=0A> De: Yuri =0A> Objet: Possible to run Linux distro in a jail?=0A> =C0: "freeb= sd-questions" =0A> Date: Vendredi 28 mai 201= 0, 20h16=0A> When I googled "linux in a jail" I=0A> got some references but= no particular howto.=0A> Since currently VirtualBox is broken (hangs OS af= ter a=0A> while), is it really possible to install Linux into a jail=0A> as= a virtual machine?=0A> =0A> Yuri=0A> _____________________________________= __________=0A> freebsd-questions@freebsd.org=0A> mailing list=0A> http://li= sts.freebsd.org/mailman/listinfo/freebsd-questions=0A> To unsubscribe, send= any mail to "freebsd-questions-unsubscribe@freebsd.org"=0A>=0A=0A=0A=0A =