Subject: Re: Linux emulation problem
To: None <port-i386@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-i386
Date: 11/20/2002 13:06:51
In article <200211201150.MAA07768@panther.aladdin.de>,
Christian Groessler <cpg@aladdin.de> wrote:
>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 ")")
># 
>
>
>Any ideas?

You need to have the /emul/linux hierarchy inside the chroot tree.

christos