chroot: cannot run command `/bin/bash': Exec format error
im in the middle of installing gentoo, and i have followed the handbook step by step, and when it came time to chroot into the box, i got the error listed above. im using the livecd 2006. here is what i've done so far
booted the livecd
mount /dev/sda3 /mnt/gentoo
mount /sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
You need to have the bash binary (or an equivalent shell) available within the new root for use after the chroot to take place. Chances are you forgot to copy it in. Make sure you gets all the libs and such you need. IIRC from the one Gentoo install I ever did, there should be a section in the install docs about setting that up.
thanks for the reply, but i think the problem was that i was using a x86 cd for my 64 box and that was causing problems. I started from scratch again and now im having annother problem. im getting error 17, cant mount selected partition. here is my partition layoug
/sda ( gentoo)
from i got gather, error 17 refers to the wrong fileysystem for the partition selected, which makes no sense to me since i formated my /boot with ext2 and /root with ext3 so it makes no sense.
here is my grub.conf
im at work right now so i cant access my box, if you need anything let me know and i'll post when i get home. thanks
dam grub, ok im still having problems booting gentoo. any grub gurus outthere, please feel free to provide input. i know grub starts counint from (hd0,0) and regardless of whether you have a IDE or SATA, grub sees them as hd, now here is my question, windows xp is on hda and gentoo is on sda, so in the line for grub.conf where i have (hd0,0) shouldnt it be different? my mobo has two IDE slots, in the primary i have my hda where windows resides. on the secondary i have my cdrom as master and my cdrw as slave. my mobo comes with four SATA controlers and my the HDD where gentoo is plugged into SATA controller#1. so can anyone please tell me how would that translate for grub to boot my gentoo. thanks
It depends on how the BIOS configures the drives, most likely PATA/IDE drives will be initialised first, then SATA. In grub, drives are in BIOS order, so sda will (probably) be hd1.
joe, thanks for the tip, that's correct, last night i read a few threads and noticed that my grub.conf file had
root (hd0,0) which in fact would be my hda drive and not my sata drive which is where my gentoo resides. so i booted off the live cd chrooted into and edit my grub to read
(hd1,0) which would be the /boot partition on my sda drive and it worked. of course im still having problems, i tried emerging xorg-x11 and gettting error messages. it's complaining that it cant find a name to that ebuild. i know i read that xorg 7.0 had been added to portage so i dont know if this has anything to do with it. i will keep trying tonight when i get home from work. thanks. any advise please feel free comment.
It's obvious now but I didn't think it was because my /bin/bash was i386 but my /mnt/bin/bash was AMD64 stupid me :)
|All times are GMT -5. The time now is 08:44 PM.|