diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml index ab887220c4..e75606ed73 100644 --- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml @@ -51,17 +51,17 @@ Linux - &os; provides 32-bit binary compatibility with &linux;, allowing - users to install and run most 32-bit &linux; binaries on a &os; system - without having to first modify the binary. It has even been - reported that, in some situations, 32-bit &linux; binaries perform - better on &os; than they do on &linux;. + &os; provides 32-bit binary compatibility with &linux;, + allowing users to install and run most 32-bit &linux; binaries + on a &os; system without having to first modify the binary. It + has even been reported that, in some situations, 32-bit &linux; + binaries perform better on &os; than they do on &linux;. However, some &linux;-specific operating system features are not supported under &os;. For example, &linux; binaries - will not work on &os; if they overly use &i386; specific - calls, such as enabling virtual 8086 mode. In addition, 64-bit - &linux; binaries are not supported at this time. + will not work on &os; if they overly use &i386; specific calls, + such as enabling virtual 8086 mode. In addition, 64-bit &linux; + binaries are not supported at this time. After reading this chapter, you will know: @@ -103,21 +103,21 @@ Ports Collection - By default, &linux; libraries are not installed and - &linux; binary compatibility is not enabled. - &linux; libraries can either be installed manually or from the &os; Ports + By default, &linux; libraries are not installed and &linux; + binary compatibility is not enabled. &linux; libraries can + either be installed manually or from the &os; Ports Collection. The emulators/linux-base-f10 package or - port is the easiest way to - install a base set of &linux; libraries and binaries on - a &os; system. To install the port: + port is the easiest way to install a base set of &linux; + libraries and binaries on a &os; system. To install the + port: &prompt.root; cd /usr/ports/emulators/linux_base-f10 &prompt.root; make install distclean - Once installed, enable &linux; binary - compatibility by loading the linux module: + Once installed, enable &linux; binary compatibility by + loading the linux module: &prompt.root; kldload linux @@ -128,8 +128,8 @@ Id Refs Address Size Name 1 2 0xc0100000 16bdb8 kernel 7 1 0xc24db000 d000 linux.ko - In order for &linux; compatibility to be enabled at - boot time, add the following line to + In order for &linux; compatibility to be enabled at boot + time, add the following line to /etc/rc.conf: linux_enable="YES" @@ -148,90 +148,92 @@ Id Refs Address Size Name Installing Additional Libraries Manually - - shared libraries - + + shared libraries + - If a &linux; - application complains about missing shared - libraries after configuring &linux; binary compatibility, - determine which shared libraries the &linux; binary - needs and install them manually. + If a &linux; application complains about missing shared + libraries after configuring &linux; binary compatibility, + determine which shared libraries the &linux; binary needs and + install them manually. - From a &linux; system, - ldd can be used to determine which shared - libraries the application needs. For example, to - check which shared libraries linuxdoom needs, run - this command from a &linux; system that has - Doom installed: + From a &linux; system, ldd can be used + to determine which shared libraries the application needs. + For example, to check which shared libraries + linuxdoom needs, run this command from a + &linux; system that has Doom + installed: - &prompt.user; ldd linuxdoom + &prompt.user; ldd linuxdoom libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0 libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0 libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 - - symbolic links - - Then, copy all the files in the last column of the output from the &linux; system into - /compat/linux on - the &os; system. Once copied, create symbolic links to the names in the first column. - This example will result - in the following files on the &os; system: + + symbolic links + - /compat/linux/usr/X11/lib/libXt.so.3.1.0 + Then, copy all the files in the last column of the output + from the &linux; system into + /compat/linux on the &os; system. Once + copied, create symbolic links to the names in the first + column. This example will result in the following files on + the &os; system: + + /compat/linux/usr/X11/lib/libXt.so.3.1.0 /compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0 /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29 - If a &linux; shared library already exists with a - matching major revision number to the first column of - the ldd output, it does not need to - be copied to the file named in the last column, as the - existing library should work. It is advisable to copy - the shared library if it is a newer version, though. - The old one can be removed, as long as the symbolic - link points to the new one. + If a &linux; shared library already exists with a + matching major revision number to the first column of the + ldd output, it does not need to be copied + to the file named in the last column, as the existing library + should work. It is advisable to copy the shared library if it + is a newer version, though. The old one can be removed, as + long as the symbolic link points to the new one. - For example, these - libraries already exist on the &os; system: + For example, these libraries already exist on the &os; + system: - /compat/linux/lib/libc.so.4.6.27 + /compat/linux/lib/libc.so.4.6.27 /compat/linux/lib/libc.so.4 -> libc.so.4.6.27 - and ldd indicates that a binary requires a later version: + and ldd indicates that a binary + requires a later version: - libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29 + libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29 - Since the existing library is only one or two versions out of date - in the last digit, - the program should still work with the slightly older - version. However, it is safe to replace the - existing libc.so with the newer version: + Since the existing library is only one or two versions out + of date in the last digit, the program should still work with + the slightly older version. However, it is safe to replace + the existing libc.so with the newer + version: - /compat/linux/lib/libc.so.4.6.29 + /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29 - Generally, one will need to look for the shared - libraries that &linux; binaries depend on only the first few - times that a &linux; program is installed on &os;. After a - while, there will be a sufficient set of &linux; shared - libraries on the system to be able to run newly installed - &linux; binaries without any extra work. + Generally, one will need to look for the shared libraries + that &linux; binaries depend on only the first few times that + a &linux; program is installed on &os;. After a while, there + will be a sufficient set of &linux; shared libraries on the + system to be able to run newly installed &linux; binaries + without any extra work. - Installing &linux; <acronym>ELF</acronym> Binaries + Installing &linux; <acronym>ELF</acronym> + Binaries Linux ELF binaries - ELF binaries sometimes require an extra step. - When an unbranded ELF binary is + ELF binaries sometimes require an extra + step. When an unbranded ELF binary is executed, it will generate an error message: &prompt.user; ./my-linux-elf-binary @@ -239,53 +241,57 @@ ELF binary type not known Abort To help the &os; kernel distinguish between a &os; - ELF binary and a &linux; binary, use &man.brandelf.1;: + ELF binary and a &linux; binary, use + &man.brandelf.1;: &prompt.user; brandelf -t Linux my-linux-elf-binary GNU toolchain + Since the GNU toolchain places the appropriate branding - information into ELF binaries automatically, this step is - usually not necessary. + information into ELF binaries + automatically, this step is usually not necessary. - Installing a &linux; <acronym>RPM</acronym> Based Application + Installing a &linux; <acronym>RPM</acronym> Based + Application - In order to install a &linux; RPM-based application, first - install the archivers/rpm2cpio package or - port. Once installed, - root can use this - command to install a .rpm: + In order to install a &linux; RPM-based + application, first install the + archivers/rpm2cpio package or port. Once + installed, root can + use this command to install a + .rpm: &prompt.root; cd /compat/linux &prompt.root; rpm2cpio -q < /path/to/linux.archive.rpm | cpio -id If necessary, brandelf the installed - ELF binaries. - Note that this will prevent a clean uninstall. + ELF binaries. Note that this will prevent + a clean uninstall. Configuring the Hostname Resolver - If DNS does not work or this error appears: + If DNS does not work or this error + appears: resolv+: "bind" is an invalid keyword resolv+: "hosts" is an invalid keyword - configure - /compat/linux/etc/host.conf as - follows: + configure /compat/linux/etc/host.conf + as follows: order hosts, bind multi on - This specifies that /etc/hosts - is searched first and DNS is searched second. When - /compat/linux/etc/host.conf does not + This specifies that /etc/hosts is + searched first and DNS is searched second. + When /compat/linux/etc/host.conf does not exist, &linux; applications use /etc/host.conf and complain about the incompatible &os; syntax. Remove bind if a