/dev, /proc support in a chrooted Linux emulation environment
brooks at one-eyed-alien.net
Tue Sep 14 21:23:45 PDT 2004
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 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.
> > >
> > > Programs/scripts attempting to access, for example, /dev/null complain
> > > about no such file or device. The same for /dev/ttyX, /dev/zero, etc.
> > >
> > > 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.
> > >
> > > 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.
> Yes, I am using linprocfs. But even so, certain parts are either missing
> 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.
> I've tried doing that, but the devices still don't function properly. I've
> installed Linux's MAKEDEV package as well (into the chrooted environment),
> and even with all the devices being created by the package's install script,
> 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.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20040914/b013ca14/attachment.bin
More information about the freebsd-emulation