Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 14:37:15 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        Stefan Esser <se@freebsd.org>, freebsd-amd64@freebsd.org
Subject:   Re: Linux compat / changing compat path
Message-ID:  <20180321123715.GK76926@kib.kiev.ua>
In-Reply-To: <75bf1e70-b43a-5642-f69a-cc085c50225a@FreeBSD.org>
References:  <fd061767-0b5b-d8f4-6c90-5ae6ff500ef9@bege.email> <20180321090911.4d1059c2@ernst.home> <e046a463-6463-b36c-3f16-1047abed7393@freebsd.org> <75bf1e70-b43a-5642-f69a-cc085c50225a@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 21, 2018 at 01:57:37PM +0200, Andriy Gapon wrote:
> On 21/03/2018 10:39, Stefan Esser wrote:
> > And you want to change occurances of /compat/linux in the kernel (and possibly
> > some libraries and user programs), e.g. in /sys/amd64/linux/linux_sysvec.c ...
> > 
> > There is some magic that makes an exec of /bin/sh look up /compat/linux/bin/sh
> > first, if performed from within a program running under Linux emulation, and
> > if you need that behavior, you have to adjust at least the kernel sources.
> > 
> > Maybe the hard-coded "/compat/linux" should be replaced by a macro, to allow
> > easy modification without loss of functionality ...
> 
> I am not sure what would actually happen in the following case.
> Create a jail and make it "pure Linux".  That is, install only Linux binaries
> there, no FreeBSD at all.  And install them under the root of the jail, that is,
> no /compat/linux within the jail.
> Would that work?
> Would I be able to start such a jail (processes in it) ?
> Would they be able to correctly find their libraries and other executables they
> might want to exec?
> 
> If this works or could be made to work, then I am sure that some people would it
> useful.
> 
This already works. /compat/linux prefix is first try, and if not found,
code falls back to normal lookup.

People did used 'native linux' jails, in particular, to do builds.



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