Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chroot with bash: illegal instruction
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
svoop
n00b
n00b


Joined: 11 Jan 2009
Posts: 63

PostPosted: Mon Nov 05, 2012 7:59 pm    Post subject: chroot with bash: illegal instruction Reply with quote

Hi

(I've posted this in "Installing Gentoo", but here's probably a better place to ask.)

I've installed Gentoo on a i7-2600 (sandy bridge) as Xen dom0, no problem at all. Now I try to install a Gentoo domU.

After having downloaded and unpacked stage3 and portage to the domU partition /mnt/dom1-tango, now I'm stuck here:

Code:
mount -t proc none /mnt/dom1-tango/proc
mount -o bind /dev /mnt/dom1-tango/dev
chroot /mnt/dom1-tango /bin/bash
Illegal instruction


I don't know whether chroot or bash causes the error. However, I can use both of them individually without any problem. The following work just fine:

Code:
/mnt/dom1-tango/bin/bash
/usr/bin/chroot /bin/ls


The problem persists if I replace /mnt/dev-tango/bin/bash with /bin/bash.

The dom0 binaries were compiled with the following settings in make.conf (I'm on GCC 4.5.4 p1.0):

Code:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse4.1 -msse4.2 -mtune=generic -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"


(I've also tried without "-msse4.1 -msse4.2", same result. And the precompiled binary from stage3 fails as well.)

Here's the cpuinfo:

Code:
processor   : 7
vendor_id   : GenuineIntel
cpu family   : 6
model      : 42
model name   : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping   : 7
microcode   : 0x1a


I'm running out of options here, any idea what's wrong here?

Thanks a bunch for your help!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Mon Nov 05, 2012 8:30 pm    Post subject: Reply with quote

How were the libraries in the chroot built? Bash in the chroot will use the library in the chroot.

There are a lot of libraries in play here, should start with glibc, then readline and termcap... and there's more...
_________________
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
svoop
n00b
n00b


Joined: 11 Jan 2009
Posts: 63

PostPosted: Tue Nov 06, 2012 7:47 am    Post subject: Reply with quote

eccerr0r wrote:
How were the libraries in the chroot built?


They are precompiled from stage3:
ftp://mirror.switch.ch/mirror/gentoo/releases/amd64/current-stage3/stage3-amd64-20121013.tar.bz2

In fact, I've used the same stage3 to install the dom0 without any problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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