Subject: port-i386/19161: linux emulation needs /emul/linux/lib, doesn't fall back to /lib for shared libs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cpg@aladdin.de>
List: netbsd-bugs
Date: 11/25/2002 06:00:21
>Number:         19161
>Category:       port-i386
>Synopsis:       linux emulation needs /emul/linux/lib, doesn't fall back to /lib for shared libs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 25 06:01:01 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: