Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2004 11:52:36 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        "Conrad J. Sabatier" <conrads@cox.net>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: /dev, /proc support in a chrooted Linux emulation environment
Message-ID:  <20040914185236.GA31186@odin.ac.hmc.edu>
In-Reply-To: <20040914133535.3aa9ee21@dolphin.local.net>
References:  <20040914133535.3aa9ee21@dolphin.local.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 shell
> (entering the environment via "chroot /compat/linux /bin/bash").  I've
> had remarkable success in installing and running quite a few rpms beyond
> 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 experiencing
> 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 "real"
> 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 Linux
> emulator at this time?

You can provide a fairly complete linux /proc with linprocfs. /dev is
more difficult.  You can try mounting devfs in your linux /dev which
may work for many applications.  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.  I suspect we will eventually need a
lindevfs to make devices show up the way linux wants them to.

-- 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

--qMm9M+Fa2AknHoGS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBRz3zXY6L6fI4GtQRApofAKC3i/RY5cMEss8OO2/xE+0rt6x7YgCcCBPw
L0q/jHuwM8FtZin4wj0ZPpw=
=FEU1
-----END PGP SIGNATURE-----

--qMm9M+Fa2AknHoGS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040914185236.GA31186>