setup for running Linux binaries under
supports running Linux binaries. This only
applies to i386 systems and the ELF binary format. Most programs should work,
including the ones that use the Linux SVGAlib. Programs that will not work
include those that use i386-specific calls, such as enabling virtual 8086
The Linux compatibility feature is active for kernels compiled with the
option and kern.emul.linux
A lot of programs are dynamically linked. This means that the Linux shared
libraries that the programs depend on and the runtime linker are also needed.
Additionally, a "shadow root" directory for Linux binaries on the
system will have to be created. This directory
is named /emul/linux
. Any file operations done by
Linux programs run under OpenBSD
will look in this
directory first. So, if a Linux program opens, for example,
first try to open /emul/linux/etc/passwd
, and if
that does not exist open the `real' /etc/passwd
file. It is recommended that Linux packages that include configuration files,
etc., be installed under /emul/linux
, to avoid
naming conflicts with possible OpenBSD
Shared libraries should also be installed in the shadow tree.
install the fedora_base package from the emulators category. The fedora_base
package contains the shared libraries, binaries, and other related files
necessary to run Linux applications.
SVGAlib binaries require some extra care. The pcvt virtual console driver has to
be in the kernel for them to work, and some symbolic links in the
directory will have to be
/emul/linux/dev/console -> /dev/tty
/emul/linux/dev/mouse -> whatever device the mouse is connected to
/emul/linux/dev/ttyS0 -> /dev/tty00
/emul/linux/dev/ttyS1 -> /dev/tty01
Be warned: the first link mentioned here makes SVGAlib binaries work, but may
confuse others, so it may be necessary to remove it again at some point.
CD-ROM support requires a link to the CD-ROM device, similar to:
/emul/linux/dev/cdrom -> /dev/cd0a (first CD-ROM)
is incomplete and currently only
supported on the i386.