From owner-freebsd-questions@FreeBSD.ORG Fri Dec 3 13:24:39 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91EBD16A4CE for ; Fri, 3 Dec 2004 13:24:39 +0000 (GMT) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFC7243D2D for ; Fri, 3 Dec 2004 13:24:38 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp250-130.lns2.adl2.internode.on.net [203.122.250.130])iB3DOYOU073995; Fri, 3 Dec 2004 23:54:35 +1030 (CST) From: Malcolm Kay Organization: at home To: Dick Davies , Mikko Heiskanen Date: Fri, 3 Dec 2004 23:54:33 +1030 User-Agent: KMail/1.5.4 References: <1102005825.4361.16.camel@whitecortex.net> <20041202210840.GB23230@lb.tenfour> In-Reply-To: <20041202210840.GB23230@lb.tenfour> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412032354.33881.malcolm.kay@internode.on.net> cc: FreeBSD Questions Subject: Re: linux emulation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2004 13:24:39 -0000 On Fri, 3 Dec 2004 07:38 am, Dick Davies wrote: > * Mikko Heiskanen [1244 16:44]: > > I've been wondering about this some time now. > > The linux compatibility layer (kernel module + linux_base -port) > > is told to be able to run linux binaries. The handbook even describes > > for a couple of heavy-duty applications how this is done. > > However, after reading that part of the handbook and googling around the > > net, I haven't the slightest idea how I'm supposed to run such program. > > Same as any other binary. > > > Let's say I have a program. Should I put it in /compat/linux/somewhere, > > run it like /compat/linux/somewhere/executable and it just somehow > > works? Or should I chroot to /compat/linux? > > How does FreeBSD know when to use linuxemu? > > A Linux binary looks different to a native one. The system notices and > kicks off the emulation layer. (effectively you have a different system > call table for each emulated OS, if that means anything to you). > Depends somewhat on how you came by the binary. You may need to run 'brandelf' over binary executables. # brandelf -t Linux linuxbinary Malcolm