Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-14-2006, 06:52 PM
|
#1
|
Member
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273
Rep:
|
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
thanks
|
|
|
07-16-2006, 04:05 AM
|
#2
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
07-17-2006, 09:05 AM
|
#3
|
Member
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273
Original Poster
Rep:
|
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
/hda windows
/sda ( gentoo)
sda1 /boot
sda2 /swap
sda3 /root
sda4 /extended
sda5 /home
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.
my fstab
/dev/sda1 /boot
/dev/sda3 /root
/dev/sda2 /swap
here is my grub.conf
grub.conf
default o
timeout 30
splashimage=(hd0,0)_/boot/grub/splash.xpm.gz
title=gentoo server
root_(hd0,0)
kernel_/kernel-genkernel-x86_64-2.6.16-gentoo-r13
initrd_/boot/initramfs-kernel-genkernel-x86_64-2.6.16-gentoo-r13
title=windows xp
root_(hd0,1)
makeactive
chainloader_+1
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
|
|
|
07-18-2006, 09:05 AM
|
#4
|
Member
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273
Original Poster
Rep:
|
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
|
|
|
07-18-2006, 04:46 PM
|
#5
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
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.
|
|
|
07-19-2006, 07:53 AM
|
#6
|
Member
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273
Original Poster
Rep:
|
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.
|
|
|
09-28-2010, 04:41 AM
|
#7
|
Member
Registered: Apr 2006
Location: Australia
Distribution: Debian Squeeze
Posts: 135
Rep:
|
Quote:
Originally Posted by snakeo2
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.
|
Thanks for mentioning that, I was having the same problem using i386 Debian 5 on a x64 machine and creating a new install using "debootstrap --arch amd64 lenny /mnt/ http://ftp.debian.com/debian"
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 05:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|