Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chroot: failed to run command
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Tue Feb 02, 2010 6:25 am    Post subject: chroot: failed to run command Reply with quote

hi, i'm doing a remote install on a new amd64 machine. i think i'm using a x86 minimal cd, does this matter?

i'm on the chroot step and am getting this error.
Code:

livecd ~ # chroot /mnt/gentoo/ /bin/bash
chroot: failed to run command `/bin/bash': Exec format error


any ideas?
_________________
help the needy
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1734
Location: Kentucky

PostPosted: Tue Feb 02, 2010 6:37 am    Post subject: Reply with quote

You need a 64bit kernel to run 64bit code. I suggest you use http://www.sysresccd.org/Main_Page to install Gentoo instead. Besides containing both 32bit and 64bit kernels it has some nice built in tools also.
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7222
Location: ~Brussels - Belgique

PostPosted: Tue Feb 02, 2010 6:51 am    Post subject: Reply with quote

and don't forget to enter "rescue64" at the boot prompt.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Tue Feb 02, 2010 7:03 am    Post subject: Reply with quote

awww, so i guess i have to be there physically to swap out the disk then right?

cause i'm away from it, it's locked away.

is there anyway to do it via ssh without rebooting?

or, if i get back to it, could i just use an amd64 livedvd ?
_________________
help the needy
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7222
Location: ~Brussels - Belgique

PostPosted: Tue Feb 02, 2010 7:07 am    Post subject: Reply with quote

Yes, you can use an AMD64 live cd. It will also work
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Bash Commando
n00b
n00b


Joined: 14 Sep 2017
Posts: 2

PostPosted: Thu Sep 14, 2017 12:23 pm    Post subject: Reply with quote

I have an AMD64 gentoo live-cd and I'm experiencing the same error. Is there any other solution?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38871
Location: 56N 3W

PostPosted: Thu Sep 14, 2017 3:37 pm    Post subject: Reply with quote

Bash Commando,

Welcome to Gentoo.

What is the full name of the stage3 file you used?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bash Commando
n00b
n00b


Joined: 14 Sep 2017
Posts: 2

PostPosted: Thu Sep 14, 2017 4:02 pm    Post subject: Reply with quote

The stage3 tarball I downloaded (Via "links") is stage3-amd64-20170907.tar.bz2

And I've solved my part of the problem. While I couldn't "chroot" /bin/bash, I cd'd back to the /root directory and ran the following commands:

source /etc/profile
export PS1="(chroot) $PS1"

And I'm now using the terminal in a chroot environment.
Back to top
View user's profile Send private message
HungGarTiger
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2014
Posts: 128
Location: /nz/auckland

PostPosted: Thu Sep 14, 2017 6:26 pm    Post subject: Reply with quote

Bash Commando wrote:
The stage3 tarball I downloaded (Via "links") is stage3-amd64-20170907.tar.bz2

And I've solved my part of the problem. While I couldn't "chroot" /bin/bash, I cd'd back to the /root directory and ran the following commands:

source /etc/profile
export PS1="(chroot) $PS1"

And I'm now using the terminal in a chroot environment.


If the command
Code:
chroot /mnt/gentoo /bin/bash
didn't work then the changes you are making will not be in the Linux system you are trying to install, you will be performing changes in the installation medium. This is an important point to understand in the chroot command.
Code:
export PS1="(chroot) $PS1"
isn't changing your root directory, only the label of your terminal indicator. Trying
Code:
export PS1="(not chroot) $PS1"
will show you what I mean. Please read up on the chroot command and get an understanding of how it affects the root directory as this is probably the most common way to fix borked systems and will make your life much easier in the future if you have an understanding of the concept.

Edit* phone auto correct :lol:


Last edited by HungGarTiger on Thu Sep 14, 2017 7:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38871
Location: 56N 3W

PostPosted: Thu Sep 14, 2017 6:33 pm    Post subject: Reply with quote

HungGarTiger,

Its a lower case 'g' in
Code:
chroot /mnt/gentoo /bin/bash
just in case another reader wants to copy/paste from your post.

Everything else you said is spot on.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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