NetBSD Problem Report #19161

Received: (qmail 16138 invoked by uid 605); 25 Nov 2002 14:00:28 -0000
Message-Id: <20021125140021.606D111124@narn.netbsd.org>
Date: Mon, 25 Nov 2002 06:00:21 -0800 (PST)
From: cpg@aladdin.de
Sender: gnats-bugs-owner@netbsd.org
Reply-To: cpg@aladdin.de
To: gnats-bugs@gnats.netbsd.org
Subject: linux emulation needs /emul/linux/lib, doesn't fall back to /lib for shared libs
X-Send-Pr-Version: www-1.0

>Number:         19161
>Category:       kern
>Synopsis:       linux emulation needs /emul/linux/lib, doesn't fall back to /lib for shared libs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 25 14:01:01 +0000 2002
>Closed-Date:    Tue Dec 17 23:42:18 +0000 2002
>Last-Modified:  Tue Dec 17 23:42:18 +0000 2002
>Originator:     Christian Groessler
>Release:        1.6K
>Organization:
Home
>Environment:
>Description:
Hi,

I've got a Linux - NetBSD dualboot machine. On NetBSD the Linux
partition is mounted on /linux.

/emul/linux/lib is a symlink to /linux/lib.

I can run Linux binaries fine from NetBSD:

[root@gibbon:/]# /linux/bin/bash
bash# exit
exit
[root@gibbon:/]# 

But I cannot run them chrooted:

[root@gibbon:/]# chroot /linux /bin/bash
chroot: /bin/bash: Exec format error
[root@gibbon:/]# 

Another try:

[root@gibbon:/]# chroot /linux /tmp/sh         # /linux/tmp/sh: netbsd sh
# /bin/bash
/bin/bash: 1: Syntax error: word unexpected (expecting ")")
# 


After creating a symlink inside the chrooted environment which links / to /emul/linux, "chroot /linux /bin/bash" does work.

regards,
chris


>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-i386-maintainer->jdolecek 
Responsible-Changed-By: jdolecek 
Responsible-Changed-When: Mon Nov 25 06:59:59 PST 2002 
Responsible-Changed-Why:  
I'll look on it. 
State-Changed-From-To: open->feedback 
State-Changed-By: jdolecek 
State-Changed-When: Fri Nov 29 11:41:00 PST 2002 
State-Changed-Why:  
This problem should be fixed in rev. 1.60 of kernel source file 
syssrc/sys/compat/linux/common/linux_exec_elf32.c 
Can you confirm it works for you now? 

From: Christian Groessler <cpg@aladdin.de>
To: gnats-bugs@netbsd.org
Cc: cpg@aladdin.de, jdolecek@netbsd.org
Subject: Re: kern/19161
Date: 18 Dec 2002 00:23:53 +0100

 It works.

 regards,
 chris

State-Changed-From-To: feedback->closed 
State-Changed-By: jdolecek 
State-Changed-When: Tue Dec 17 15:42:02 PST 2002 
State-Changed-Why:  
Confirmed working. 
Thanks for report. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.