From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 15 04:23:45 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7425B16A4CE for ; Wed, 15 Sep 2004 04:23:45 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B17543D49 for ; Wed, 15 Sep 2004 04:23:45 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8F4Og7p028374; Tue, 14 Sep 2004 21:24:42 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8F4OgQs028372; Tue, 14 Sep 2004 21:24:42 -0700 Date: Tue, 14 Sep 2004 21:24:42 -0700 From: Brooks Davis To: Conrad Sabatier Message-ID: <20040915042442.GA27877@odin.ac.hmc.edu> References: <20040914133535.3aa9ee21@dolphin.local.net> <20040914185236.GA31186@odin.ac.hmc.edu> <20040915015513.GB11111@cox.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <20040915015513.GB11111@cox.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-emulation@freebsd.org Subject: Re: /dev, /proc support in a chrooted Linux emulation environment X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 04:23:45 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 14, 2004 at 08:55:13PM -0500, Conrad Sabatier wrote: > On Tue, Sep 14, 2004 at 11:52:36AM -0700, Brooks Davis wrote: > > On Tue, Sep 14, 2004 at 01:35:35PM -0500, Conrad J. Sabatier wrote: > > > I've been exploring running Linux binaries under a chrooted Linux she= ll > > > (entering the environment via "chroot /compat/linux /bin/bash"). I've > > > had remarkable success in installing and running quite a few rpms bey= ond > > > those found in the linux_base port, but have found that /dev support = (as > > > well as /proc) doesn't work as expected when running Linux apps within > > > such an environment. > > >=20 > > > Programs/scripts attempting to access, for example, /dev/null complain > > > about no such file or device. The same for /dev/ttyX, /dev/zero, etc. > > >=20 > > > Similar problems occur attempting to use /proc/*. I'm also experienc= ing > > > some networking problems, mainly with DNS resolution, but for now, my > > > main concern is /dev and /proc. > > > > > > I realize that the method I'm using for running Linux apps is not what > > > was intended with FreeBSD's Linux emulation mode, but it's interesting > > > enough that I want to continue delving into it. My goal is to have as > > > near-complete a working Linux environment as possible, one that would > > > support running practically any Linux app within this chrooted > > > environment and would, for all intents and purposes, appear as a "rea= l" > > > Linux to any programs running within it. > > >=20 > > > Are there any suggestions as to how I might remedy some of these > > > problems? Or is this simply beyond the scope/capabilities of the Lin= ux > > > emulator at this time? > >=20 > > You can provide a fairly complete linux /proc with linprocfs. >=20 > Yes, I am using linprocfs. But even so, certain parts are either missing= =20 > or not working properly. If you know what you need, it may be possiable to implement. Given that StarOffice and Java run I wouldn't think there could be that much left that a sane process could need. > > For the moment, you can also make > > nodes like /dev/null and /dev/zero with mknod, but I believe that > > functionality will be going away. >=20 > I've tried doing that, but the devices still don't function properly. I'= ve=20 > installed Linux's MAKEDEV package as well (into the chrooted environment)= ,=20 > and even with all the devices being created by the package's install scri= pt,=20 > they still don't work. If you use Linux's MAKEDEV to make them your 100% certain to fail. They need to be FreeBSD devices, not Linux ones. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBR8QJXY6L6fI4GtQRAhUeAKC5CVsZhxOhPwgWjdi7cCSIR8OIRgCgmdoO WQpZqx6X2wXlEB1F5Llbj+o= =Umgj -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--