From owner-freebsd-questions Wed Jan 3 09:22:35 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA21477 for questions-outgoing; Wed, 3 Jan 1996 09:22:35 -0800 (PST) Received: from gw0.telebase.com (root@gw0.telebase.com [192.132.57.100]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id JAA21471 for ; Wed, 3 Jan 1996 09:22:31 -0800 (PST) Received: from wormhole.telebase.com by gw0.telebase.com id NAA10002 for ; Wed, 3 Jan 1996 13:25:52 -0500 (EST) Received: from odo.telebase.com (root@odo.telebase.com [172.16.2.217]) by wormhole.telebase.com (8.7.1/8.6.9.1) with ESMTP id MAA15233 for ; Wed, 3 Jan 1996 12:55:53 -0500 (EST) Received: (from bmc@localhost) by odo.telebase.com (8.6.12/8.6.9.1) id MAA01163; Wed, 3 Jan 1996 12:26:56 -0500 Date: Wed, 3 Jan 1996 12:26:56 -0500 From: Brian Clapper Message-Id: <199601031726.MAA01163@telebase.com.> To: freebsd-questions@freebsd.org Subject: Re: Linux Emulation Sender: owner-questions@freebsd.org Precedence: bulk Karl Lemmermann 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