Linux compat / changing compat path

Andriy Gapon avg at
Wed Mar 21 11:57:48 UTC 2018

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

Andriy Gapon

More information about the freebsd-amd64 mailing list