Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2010 11:40:50 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        freebsd-jail@freebsd.org, John Nielsen <lists@jnielsen.net>
Cc:        rdivacky@freebsd.org
Subject:   Re: linux-only jail possible?
Message-ID:  <20100304114050.00007a59@unknown>
In-Reply-To: <20100303180636.GA31551@freebsd.org>
References:  <201003021325.27197.lists@jnielsen.net> <20100303080050.GA22322@freebsd.org> <201003031159.49694.lists@jnielsen.net> <20100303180636.GA31551@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Mar 2010 19:06:36 +0100 Roman Divacky <rdivacky@freebsd.org>
wrote:

> On Wed, Mar 03, 2010 at 11:59:49AM -0500, John Nielsen wrote:
> > On Wednesday 03 March 2010 03:00:50 Roman Divacky wrote:
> > > I succesfully ran chroot of linux environment on freebsd back in
> > > 2007/2008. I firmly believe jail should work fine too
> > 
> > Good to know, thanks! Would you mind sharing some more details?
> > (Off-list is fine if you prefer.) Was it a more or less complete
> > environment? What distro / version of Linux?
> 
> I downloaded gentoo 2007 untarred it into /compat/linux and
> chroot /compat/linux /bin/bash
> 
> it just worked - nothing special was necessary
> 
> dont remember much details but I had no problems with that setup

It does not need to be in this directory off course. You can install
the gentoo-dist ports (not the gentoo-baase port). After that you can
copy all the files to the place where you want to have the jail.

Now you just need to configure a jail. It does not matter much if you
use the jail stuff in the base system or a framework like ezjail or
similar, as long as you configure an appropriate startup script in the
linux-jail. The linux-startup part you need to do yourself, I do not
think the default linux startup stuff is approrpiate. I suggest to
start at least a sshd before you start the software you want to
use. This way you can login into the linux-jail and investigate issues
like it is a real system.

I suggest to monitor the kernel messages on the FreeBSD host. There may
be linux-syscalls which are not implemented (e.g. epoll stuff). There
is currently no effort to implement those. There may be partial
implementations for some sysctls (Roman has something somewhere), but
nothing is in FreeBSD and no efforts are on the way to bring them in.
If your software needs something like this, you either need to
implement them yourself, switch the software to not use this (maybe
by changing the linux emulation to 2.4 instead of 2.6), or to forget
about using FreeBSD for this. emulation@ is a good address to ask
questions regarding the status of things,
http://wiki.freebsd.org/linux-kernel has some infos too.

Bye,
Alexander.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100304114050.00007a59>