Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot use chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MasquedAvenger
Guru
Guru


Joined: 21 Aug 2003
Posts: 559
Location: Southern California

PostPosted: Fri Jul 15, 2005 9:07 pm    Post subject: cannot use chroot Reply with quote

Hey everyone. I have a bit of a problem. I cannot use chroot from my installed OS. Everytime I type chroot /directory /bin/bash I get the following error:

chroot: cannot run command '/bin/bash': No such file or directory

This is odd because /bin/bash exists both on my system and in the directory I'm trying to chroot to, and I've never had a problem on any other system. Does anyone else have the same problem? Any suggestions? Thanks in advance.

James
_________________
"There are no uninteresting things; only uninterested people." --G.K. Chesterton
Back to top
View user's profile Send private message
azuriel
Apprentice
Apprentice


Joined: 27 Feb 2005
Posts: 166

PostPosted: Fri Jul 15, 2005 9:21 pm    Post subject: Reply with quote

Your post was a little ambiguous, there is a /directory/bin/bash, right? When you were installing gentoo, a command such as
Code:
chroot /mnt/gentoo /bin/bash
is issued to chroot into your mounted hard drive; in this case there existed a /mnt/gentoo/bin/bash. Hope this solves your problem.
_________________
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Back to top
View user's profile Send private message
racoontje
Veteran
Veteran


Joined: 19 Jul 2004
Posts: 1290

PostPosted: Fri Jul 15, 2005 9:37 pm    Post subject: Reply with quote

I've had this error before and I've never found a solution for it really, try chroot /mnt/gentoo /bin/sh.. I think maybe I forgot the permissions when I extracted the stage tarball (-xvjf instead of -xvpjf) so /bin/sh and /bin/bash do exist but they aren't executable/properly readable.. Et cetera.
Back to top
View user's profile Send private message
MasquedAvenger
Guru
Guru


Joined: 21 Aug 2003
Posts: 559
Location: Southern California

PostPosted: Sat Jul 16, 2005 2:13 am    Post subject: Reply with quote

Doesn't work :( I changed the permissions, checked that both the host filesystem and the chrooted directory had /bin/bash, and still I get the same error. This is weird, because whether I boot off the livecd or the hard drive, no matter what directory I try to chroot into, it does the same thing. Weird... And frustrating... :(

James
_________________
"There are no uninteresting things; only uninterested people." --G.K. Chesterton
Back to top
View user's profile Send private message
Yogi-CH
Guru
Guru


Joined: 19 Apr 2004
Posts: 372
Location: Somewhere in Texas, last I remember...

PostPosted: Sat Jul 16, 2005 4:29 pm    Post subject: Re: cannot use chroot Reply with quote

MasquedAvenger wrote:
Hey everyone. I have a bit of a problem. I cannot use chroot from my installed OS. Everytime I type chroot /directory /bin/bash I get the following error:

chroot: cannot run command '/bin/bash': No such file or directory

This is odd because /bin/bash exists both on my system and in the directory I'm trying to chroot to, and I've never had a problem on any other system. Does anyone else have the same problem? Any suggestions? Thanks in advance.

James


Yes. I have the same problem. It worked on Live CD but it doesn't work now that I have udated a couple things. In my case, it is because I cannot remember which pkg gave me a warning regarding chroot and what to do about it. In your case I have no idea, unfortunately. I think it only happened on one LiveCD & I d/l another ISO to try again ...and it worked, that time. Perhaps that'll work for you, as well.

[EDIT: I remember, now, what the deal was w/chroot. It was a 'chroot jail' and not chroot itself that I was warned about. That leaves making certain (1)you have a good d/l (check the md5); (2)make certain you are chrooting properly. As for my current prob., I haven't a clue. :roll: :lol:]
_________________
...Yogi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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