FreeBSD linuxlator

From wikinotes

The FreeBSD linuxlator allows you to run software built for the linux ABI alongside software built for the FreeBSD ABI.

NOTE:

I've only played around with this.

Setup

Enable kernel modules

sudo kldload linux
sudo kldstat               # Check for linux.ko to confirm loaded

Update ports tree

sudo portsnap fetch        # Update ports tree
sudo portsnap extract
sudo portsnap update
less /usr/ports/UPDATING   # Search for your package and any release-specific info

/etc/sysctl.conf

# If not running FreeBSD 11 (check UPDATING for instructions)
compat.linux.osrelease=2.6.18
sudo sysctl compat.linux.osrelease=2.6.18  # Live Changes

cd /usr/ports/emulators/linux_base-c6
sudo make install distclean

These mounts will need to be made for each jail requiring linuxlator access

cd /home/j/jbase         # Create symbolic link (that links to nothing on rootfs)
ln -s /s/compat compat

cd /home/js/melody       # Copy the compat layer (after installing linux_base-c6), or
mkdir compat             # Desired version of linux_base
sudo rsync -aAxvt /compat/* /home/js/melody/compat/

mount -t linprocfs linprocfs \   `# (didn't use, seems ok so far). Should really add to fstab`
    /home/js/melody/compat/linux/proc


/etc/rc.conf

linux_enable="YES"

References

intro http://www.leidinger.net/blog/2010/09/28/the-freebsd-linuxulator-explained-for-users/
debian on freebsd https://forums.freebsd.org/threads/install-debian-gnu-linux-using-debootstrap-on-a-freebsd-jail-with-zfs.41470/