Subject: Re: Linux emulation problem
To: Christian Groessler <cpg@aladdin.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 11/20/2002 22:55:02
On Wed, Nov 20, 2002 at 12:50:13PM +0100, Christian Groessler 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?
I suspect a problem with /dev, or maybe /proc
try:
ktrace -i chroot /linux /bin/bash
kdump
and see what it's trying to do when exec'ing bash.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 23 ans d'experience feront toujours la difference
--