Date: Wed, 3 Jan 1996 12:26:56 -0500 From: Brian Clapper <bmc@telebase.com> To: freebsd-questions@freebsd.org Subject: Re: Linux Emulation Message-ID: <199601031726.MAA01163@telebase.com.>
next in thread | raw e-mail | index | archive | help
Karl Lemmermann <klemmerm@cyberwar.com> writes:
> I'm having some problems getting linux emulation to work correctly, and
> i'm having problems finding any documentation at all on the subject. Can
> anyone point me in the right direction? I really couldn't find anything
> even in the mailing list when I searched it on the FreeBSD home page.
>
> I have the linux_emulator module loaded correctly, the kernel was
> compiled with the LINUX_COMPAT option, and I think I have the
> linux libraries in the correct location, since I installed them via the
> linux_lib1.0 package. I can't even get a linux 'ls' (from an old
> slackware distribution) to work.
>
> Could someone maybe tell me the name of a linux binary that should
> definately work, to assist me in testing. At least then I'll be able to
> figure out if it works when I get the configuration problem I seem to be
> having is fixed.
I just got the Linux version of Netscape (1.2) running with no problem on
FreeBSD 2.1. (It's not that I actually want to *use* Linux's Netscape, but
it's a bloated enough application to make a good test case.)
Here are the steps I followed:
1. Build a new kernel, with the following option:
options COMPAT_LINUX
2. Install the kernel and reboot. (Of course.)
3. Load the Linux compatibility module:
odo (/usr/local/bin) # modload -e linux_init /lkm/linux_mod.o
Linux emulator installed
Module loaded as ID 0
odo (/usr/local/bin) # modstat
Type Id Off Loadaddr Size Info Rev Module Name
EXEC 0 3 f0925000 0018 f092a000 1 linux_emulator
4. Install the Linux compatibility libraries from the Ports collection:
a. Get ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports/emulators/linux_lib.tar.gz
b. Extract it.
c. Build it.
d. Install it. It creates files in /compat/linux/lib
5. Try to run your application.
Now, when I tried to run the Linux version of Netscape, it came up, but
aborted with the following errors:
resolv+: "bind" is an invalid keyword
resolv+: "hosts" is an invalid keyword
It turns out Linux has an "/etc/host.conf" and FreeBSD has one, but they
appear to be incompatible. I moved my "/etc/host.conf" out of the way
(temporarily), and the Linux Netscape came up perfectly. Of course, I
connected to "www.freebsd.org" as a test...
Perhaps there's a way to point the Linux executables at a separate /etc
tree which contains a Linux "host.conf". If there is, I don't know how,
though.
----
Brian Clapper, bmc@telebase.com, http://www.netaxs.com/~bmc/
"In defeat, unbeatable; in victory, unbearable."
-- Winston Curchill, of Montgomery
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601031726.MAA01163>
