Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] NSLU2: chroot causes "Exec format error"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
BlueShark
n00b
n00b


Joined: 30 May 2005
Posts: 66
Location: Mainz, Germany

PostPosted: Mon Nov 12, 2007 10:01 am    Post subject: [solved] NSLU2: chroot causes "Exec format error" Reply with quote

I am trying to set up gentoo on a Linksys NSLU2. I followed this HowTo step by step. But when I try to chroot into the gentoo system, I always receive the same error:
Quote:
root@NSLU2:~# mount -o bind /dev/ /mnt/gentoo/dev/
root@NSLU2:~# mount -o bind /dev/pts /mnt/gentoo/dev/pts
root@NSLU2:~# mount -t proc none /mnt/gentoo/proc
root@NSLU2:~# cp /etc/resolv.conf /mnt/gentoo/etc/
root@NSLU2:~# chroot /mnt/gentoo/ /bin/bash
chroot: cannot execute /bin/bash: Exec format error


I have absolute no clue what went wrong. So for any idea I would be grateful.


Last edited by BlueShark on Mon Nov 19, 2007 6:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9826
Location: almost Mile High in the USA

PostPosted: Mon Nov 12, 2007 3:22 pm    Post subject: Reply with quote

Usually 'exec format error' means the current platform doesn't understand the file as a proper executable. What does

file /mnt/gentoo/bin/bash

report? Did it get built as an x86 (or whatever host system you used) binary?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
BlueShark
n00b
n00b


Joined: 30 May 2005
Posts: 66
Location: Mainz, Germany

PostPosted: Sun Nov 18, 2007 1:23 pm    Post subject: Reply with quote

Thank you for your quick answer. I didn't know the command file. It showed up, that the current kernel is MSB and the Gentoo files are LSB on the system.

Well, I created this post as an X-Post of this thread/post: https://forums.gentoo.org/viewtopic-p-4515305.html#4476242
Because this thread is a german thread and I got no reply for 4 days. My hope was to get an answer, since much more users speak english than german. Since I created this x-post I will keep both threads up to date and report my results and hopefully also a solution.
Back to top
View user's profile Send private message
BlueShark
n00b
n00b


Joined: 30 May 2005
Posts: 66
Location: Mainz, Germany

PostPosted: Mon Nov 19, 2007 6:22 pm    Post subject: Reply with quote

Alright, after a while I figured something (trivial) out:

At http://www.slug-firmware.net are several Kernels available. For example SlugOS/LE 3.10 Beta (NSLU2) and SlugOS/BE 3.10 Beta (NSLU2). LE indicates little endian and BE big endian. Furthermore, the stage3 archives stage3-armeb-uclibc-softfloat-2005.1.tar.bz2 and stage3-arm-uclibc-softfloat-2005.1.tar.bz2 available. Here the eb denotes the big endian one. So if you mix big endian and little endian, you will receive the same error as I did.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum