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

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75bf1e70-b43a-5642-f69a-cc085c50225a>