From 95ea7f519f539493f5c5578de7b396acc3cb83b1 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 15 Sep 1999 18:17:19 +0000 Subject: Eradicate the world "emulat{ion,or}". Mention more of the popular Linux software we can run. Capitalize "Linux" when it is not a command. --- .../books/handbook/linuxemu/chapter.sgml | 99 +++++++++++----------- 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'en_US.ISO8859-1/books/handbook/linuxemu') diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml index e2ca00371d..b1119afcf5 100644 --- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml @@ -1,43 +1,44 @@ - Linux Emulation + Linux Mode Contributed by &a.handy; and &a.rich; - How to Install the Linux Emulator + How to Install the Linux Mode - Linux emulation in FreeBSD has reached a point where it is possible + Linux binary compatibility in FreeBSD has reached a point where it is possible to run a large fraction of Linux binaries in both a.out and ELF format. - The linux emulation in the 2.1-STABLE branch is capable of running Linux + The Linux compatibility in the 2.1-STABLE branch is capable of running Linux DOOM and Mathematica; the version present in &rel.current;-RELEASE is - vastly more capable and runs all these as well as Quake, Abuse, IDL, + vastly more capable and runs all these as well as Oracle8, + WordPerfect, StarOffice, Acrobat, Quake, Abuse, IDL, netrek for Linux and a whole host of other programs. There are some Linux-specific operating system features that are not supported on FreeBSD. Linux binaries will not work on FreeBSD if they - use the Linux /proc filesystem (which is different + overly use the Linux /proc filesystem (which is different from the optional FreeBSD /proc filesystem) or i386-specific calls, such as enabling virtual 8086 mode. Depending on which version of FreeBSD you are running, how you get - Linux-emulation up will vary slightly: + Linux-mode up will vary somewhat: - Installing Linux Emulation in 2.1-STABLE + Installing Linux Mode in 2.1-STABLE The GENERIC kernel in 2.1-STABLE is not - configured for linux compatibility so you must reconfigure your kernel - for it. There are two ways to do this: 1. linking the emulator + configured for Linux compatibility so you must reconfigure your kernel + for it. There are two ways to do this: 1. linking the binary compatibility statically in the kernel itself and 2. configuring your kernel to - dynamically load the linux loadable kernel module (LKM). + dynamically load the Linux loadable kernel module (LKM). - To enable the emulator, add the following to your configuration + To enable Linux binary compatibility, add the following to your configuration file (c.f. /sys/i386/conf/LINT): @@ -49,19 +50,19 @@ options COMPAT_LINUX options SYSVSHM - The linux system calls require 4.3BSD system call compatibility. + The Linux system calls require 4.3BSD system call compatibility. So make sure you have the following. options "COMPAT_43" - If you prefer to statically link the emulator in the kernel rather + If you prefer to statically link the binary compatibility in the kernel rather than use the loadable kernel module (LKM), then add options LINUX - Then run config and install the new kernel as described in the + Then run config and install the new kernel as described in the kernel configuration section. @@ -74,7 +75,7 @@ options LINUX &prompt.root; make all install Once you have installed the kernel and the LKM, you can invoke - `linux' as root to load the LKM. + linux as root to load the LKM. &prompt.root; linux Linux emulator installed @@ -103,11 +104,11 @@ linux - Installing Linux Emulation in 2.2.2-RELEASE and later 2.2 versions + Installing Linux Mode in 2.2.2-RELEASE and later 2.2.x versions It is no longer necessary to specify options LINUX or options COMPAT_LINUX. Linux - emulation is done with an LKM (“Loadable Kernel Module”) + binary compatibility 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: @@ -140,7 +141,7 @@ 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 + Linux LKM, then statically link the Linux compatibility in the kernel by adding @@ -152,11 +153,11 @@ options LINUX - Installing Linux Emulation in 3.0-RELEASE and later + Installing Linux Mode in 3.0-RELEASE and later It is no longer necessary to specify options LINUX or options COMPAT_LINUX. Linux - emulation is done with an KLD object (“Kernel LoaDable object”) + binary compatibility is done with an KLD object (“Kernel LoaDable object”) so it can be installed on the fly without having to reboot. You will need the following things in your startup files, however: @@ -174,7 +175,7 @@ linux_enable=YES /etc/rc.i386: -# Start the Linux binary emulation if requested. +# Start the Linux binary compatibility if requested. if [ "X${linux_enable}" = X"YES" ]; then echo -n ' linux'; linux > /dev/null 2>&1 fi @@ -189,7 +190,7 @@ Id Refs Address Size Name 7 1 0xc24db000 d000 linux.ko If for some reason you do not want to or cannot load the - linux KLD, then statically link the emulator in the kernel by + Linux KLD, then statically link the binary compatibility in the kernel by adding @@ -206,7 +207,7 @@ options LINUX Installing using the linux_base port - Most linux applications use shared libraries, so you are still + Most Linux applications use shared libraries, so you are still not done until you install the shared libraries. It is possible to do this by hand, however, it is vastly simpler to just grab the linux_base port: @@ -214,11 +215,11 @@ options LINUX &prompt.root; cd /usr/ports/emulators/linux_base &prompt.root; make all install - and you should have a working linux emulator. Legend (and the - mail archives :-) seems to hold that Linux emulation - works best with linux binaries linked against the ZMAGIC libraries; + and you should have working Linux binary compatibility. Legend (and the + mail archives :-) seems to hold that Linux mode + works best with Linux binaries linked against the ZMAGIC libraries; QMAGIC libraries (such as those used in Slackware V2.0) may tend to - give the Linuxulator heartburn. Also, expect some programs to + give the Linux mode heartburn. Also, expect some programs to complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem. @@ -367,7 +368,7 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 Create the file /compat/linux/etc/ld.so.conf, containing the directories in which the Linux runtime linker should look for shared - libs. It is a plain text file, containing a directory name on each + libraries. It is a plain text file, containing a directory name on each line. /lib and /usr/lib are standard, you could add the following: @@ -375,13 +376,13 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 /usr/X11/lib /usr/local/lib - When a linux binary opens a library such as - /lib/libc.so the emulator maps the name to + When a Linux binary opens a library such as + /lib/libc.so the Linux ABI support maps the name to /compat/linux/lib/libc.so internally. All - linux libraries should be installed under /compat/linux (e.g. + Linux libraries should be installed under /compat/linux (e.g. /compat/linux/lib/libc.so, /compat/linux/usr/X11/lib/libX11.so, etc.) in - order for the emulator to find them. + order for the Linux ABI loader to find them. Those running FreeBSD 2.2-RELEASE should run the Linux ldconfig program. @@ -546,10 +547,10 @@ multi on separate packages. Normally, they are controlled by an install program, but you can retrieve files “by hand” too. First of all, you will need to look in the contents - subdir of the distribution. You will find a lot of small text files + subdirectory of the distribution. You will find a lot of small text files here describing the contents of the separate packages. The fastest way to look something up is to retrieve all the files in the contents - subdirectory, and grep through them for the file you need. Here is an + subdirectory, and grep through them for the file you need. Here is an example of a list of files that you might need, and in which contents-file you will find it by grepping through them: @@ -719,8 +720,8 @@ multi on Before you can run Mathematica you will have to obtain a password from Wolfram that corresponds to your “machine ID”. - Once you have installed the linux compatibility runtime libraries - and unpacked the mathematica you can obtain the “machine + Once you have installed the Linux compatibility runtime libraries + and unpacked Mathematica you can obtain the “machine ID” by running the program mathinfo in the Install directory. @@ -740,7 +741,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 will give them the “machine ID” and they will respond with a corresponding password consisting of groups of numbers. You need to add them both along with the machine name and license number in your - mathpass file. + mathpass file. You can do this by invoking: @@ -780,7 +781,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 /usr/local/Mathematica/lib/X11 - for the XKeysymb file + for the XKeysymb file @@ -818,7 +819,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 &prompt.user; RESOLV_HOST_CONF=/compat/linux/etc/host.conf; export RESOLV_HOST_CONF - This tells Mathematica to use the linux version of host.conf. + This tells Mathematica to use the Linux version of host.conf. This file has a different syntax from FreeBSD's host.conf, so you will get an error message about /etc/host.conf if you leave this out. @@ -854,14 +855,14 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 Acknowledgments A well-deserved thanks should go to &a.sos; and &a.peter; who made - linux emulation what it is today, and Michael Smith who drove these + Linux mode what it is today, and Michael Smith who drove these two guys like dogs to get it to the point where it runs Linux binaries - better than linux! :-) + better than Linux! :-) - How does the emulation work? + How does the Linux mode work? This section is based heavily on an e-mail written to the chat@FreeBSD.org mailing list, written by Terry Lambert @@ -898,7 +899,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 the characters which follow to the next whitespace next to last, followed by a fallback to /bin/sh. - For the Linux binary emulation, FreeBSD sees the magic number as an + For the Linux ABI support, FreeBSD sees the magic number as an ELF binary (it makes no distinction between FreeBSD, Solaris, Linux, or any other OS which has an ELF image type, at this point). @@ -921,7 +922,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 traditional UNIX system, this would be the sysent[] structure array, containing the system calls). In addition, the process is flagged for special handling of the trap vector for the signal trampoline code, and sever other (minor) - fixups that are handled by the Linux kernel module. + fix-ups that are handled by the Linux kernel module. The Linux system call vector contains, among other things, a list of sysent[] entries whose addresses reside in the kernel @@ -932,7 +933,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 proc structure, and gets the Linux, not the FreeBSD, system call entry points. - In addition, the Linux emulation dynamically + In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to FS mounts ( not the unionfs!) does. First, an attempt is made to lookup the file in the @@ -941,7 +942,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 done in the /original-path directory. This makes sure that binaries that require other binaries - can run (e.g., the Linux toolchain can all run under emulation). It + can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and exec FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a &man.uname.1; command in the /compat/linux @@ -973,7 +974,7 @@ richc.isdn.bcm.tmc.edu 9845-03452-90255 implementation, not an emulation. There is no emulator (or simulator, to cut off the next question) involved. - So why is it called “Linux emulation”? To make it hard + So why is it sometimes called “Linux emulation”? To make it hard to sell FreeBSD! 8-). Really, it is because the historical implementation was done at a time when there was really no word other than that to describe what was going on; saying that FreeBSD -- cgit v1.2.3