FreeBSD Handbook : Linux Emulation : How to Install the Linux Emulator : Installing Linux Emulation in 2.2.2-RELEASE and later
Previous: Installing Linux Emulation in 2.1-STABLE
Next: Installing Linux Runtime Libraries

23.1.2. Installing Linux Emulation in 2.2.2-RELEASE and later

It is no longer necessary to specify ``options LINUX'' or ``options COMPAT_LINUX''. Linux emulation is done with an LKM (``Loadable Kernel Module'') so it can be installed on the fly without having to reboot. You will need the following things in your startup files, however:

  1. In /etc/rc.conf, you need the following line:
    linux_enable=YES
    
  2. This, in turn, triggers the following action in /etc/rc.i386:
    # Start the Linux binary emulation if requested.
    if [ "X${linux_enable}" = X"YES" ]; then
            echo -n ' linux';               linux > /dev/null 2>&1
    fi
    

If you want to verify it is running, modstat will do that:

% modstat
Type     Id Off Loadaddr Size Info     Rev Module Name
EXEC      0   4 f09e6000 001c f09ec010   1 linux_mod
%
However, there have been reports that this fails on some 2.2-RELEASE and later systems. If for some reason you cannot load the linux LKM, then statically link the emulator in the kernel by adding
options  LINUX
to your kernel config file. Then run config and install the new kernel as described in the kernel configuration section.


FreeBSD Handbook : Linux Emulation : How to Install the Linux Emulator : Installing Linux Emulation in 2.2.2-RELEASE and later
Previous: Installing Linux Emulation in 2.1-STABLE
Next: Installing Linux Runtime Libraries