From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 15 07:13:53 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 0F6B016A4CE for ; Wed, 15 Sep 2004 07:13:53 +0000 (GMT) Received: from web54209.mail.yahoo.com (web54209.mail.yahoo.com [206.190.39.251]) by mx1.FreeBSD.org (Postfix) with SMTP id 9CA4743D1F for ; Wed, 15 Sep 2004 07:13:52 +0000 (GMT) (envelope-from urgaolong@yahoo.com) Message-ID: <20040915071352.23917.qmail@web54209.mail.yahoo.com> Received: from [61.165.83.2] by web54209.mail.yahoo.com via HTTP; Wed, 15 Sep 2004 08:13:52 BST Date: Wed, 15 Sep 2004 08:13:52 +0100 (BST) From: =?iso-8859-1?q?Gao=20Long?= To: "Conrad J. Sabatier" , freebsd-emulation@freebsd.org In-Reply-To: <20040914133535.3aa9ee21@dolphin.local.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 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 07:13:53 -0000 I believe that you have run into the same problem I have met before. There are two main causes that make /dev unavailable to linux applications: first , the device names differs in the two operating system, like /dev/tty0 and /dev/ttyv0 in FreeBSD and Linux; second, the major and minor device numbers, which mostly checked and used in the glibc , differ in the two operating systems, as about the virtual terminals. The emulation layer of the FreeBSD doesn't care about these differences, but I want:) I placed a table mapping the devices names and major/minor numbers from Linux to FreeBSD styles.And find it work well, eliminating the differences of devices of the two different os from the applications' view, at least the difference of virtual terminals , hard disk partitions, even pysedo terminals, and are going to find anything that can't be mapped;) Yet , I don't have the complete knowledge about the devices, I think I have to study LANANA first , and the devices of FreeBSD second, and then , I may be able to develop the mapping better. What is more , I think I have already written a message on this mailing-list before, I may try to find it out. "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? -- Conrad J. Sabatier -- "In Unix veritas" _______________________________________________ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to freebsd-emulation-unsubscribe@freebsd.org --------------------------------- Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now