Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't chrooting
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
TheCableMan
n00b
n00b


Joined: 19 Nov 2004
Posts: 32

PostPosted: Wed Sep 21, 2005 6:46 pm    Post subject: Can't chrooting Reply with quote

Hi i'm trying to install gentoo on an other harddriver. When I came to the chrooting, the command doesn't work. It says:
Code:
Zion mnt # chroot /mnt/gentoo/ /bin/bash
chroot: cannot run command `/bin/bash': Permission denied
Back to top
View user's profile Send private message
mbobak
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2003
Posts: 106
Location: Ann Arbor, MI

PostPosted: Wed Sep 21, 2005 6:56 pm    Post subject: Reply with quote

Please post the output of:
Code:
ls -l /bin/bash
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2915
Location: Singapore

PostPosted: Thu Sep 22, 2005 1:32 am    Post subject: Reply with quote

Let me guess... you forgot to include the "p" option when untarring the stage tarball? Should be: tar xvjfp stagefile-name-here.tar.bz2
_________________
Murphy's Law of Gentoo installation: If a compile can fail, it will.

MacGillicuddy's Corollary: At the most inopportune time.

Please search and read the FAQs before posting.
Back to top
View user's profile Send private message
TheCableMan
n00b
n00b


Joined: 19 Nov 2004
Posts: 32

PostPosted: Thu Sep 22, 2005 4:16 pm    Post subject: Reply with quote

no I didn't

Code:
Zion dump # ls -l /bin/bash
-rwxr-xr-x  1 root root 765432 Aug  1 19:49 /bin/bash
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Thu Sep 22, 2005 6:38 pm    Post subject: I think thats the wrong bash Reply with quote

Isnt the important bash
/mnt/gentoo/bin/bash

Quote:
SYNOPSIS
chroot NEWROOT [COMMAND...]
Run COMMAND with root directory set to NEWROOT.

ie with
Code:
 chroot /mnt/gentoo /bin/bash

its /mnt/gentoo/bin/bash that must be ...executable

EDIT: I think the first test would be (from the non chrooted environment)
Code:
ls -l /mnt/gentoo/bin/bash
Back to top
View user's profile Send private message
TheCableMan
n00b
n00b


Joined: 19 Nov 2004
Posts: 32

PostPosted: Thu Sep 22, 2005 7:59 pm    Post subject: Reply with quote

Code:
tcm@Zion /mnt/dump $ ls -l /mnt/gentoo/bin/bash
-rwxr-xr-x  1 root root 667404 Jul 26 19:10 /mnt/gentoo/bin/bash
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Thu Sep 22, 2005 10:13 pm    Post subject: A couple more questions, just trying to help Reply with quote

EDIT: You permissions look correct, and the file is there....hmmm

Can u do it as root ?
can u do it with any other shells? (/bin/sh)
Code:
chroot /mnt/gentoo /bin/sh

can you run /mnt/gentoo/bin/bash or /mnt/gentoo/bin/sh?
Back to top
View user's profile Send private message
phorsyon
n00b
n00b


Joined: 26 Sep 2002
Posts: 9

PostPosted: Thu Sep 22, 2005 10:39 pm    Post subject: Reply with quote

I have the same problem. The strange thing is i got it on 3 different boxes all running gentoo. I realized at first at one system which i have to fix right now, but I just can't chroot to do so. I used the minimal gentoo install disc (2005.1 and 2004.1) and even knoppix 3.8.

I did this a thousand times what's wrong now? It really drives me nuts. Iam pretty sure that was possible to chroot in any directory. Well I know for sure that I accidently chrooted in an empty directory before.

Maybe it's something obvious but i have NO F#%!ING CLUE whtat's wrong :evil:
Sorry but it's just frustrating :cry:
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Sep 22, 2005 11:13 pm    Post subject: Reply with quote

Hi.

Did you take a look at dmesg? Could it be a problem with /dev/null or /dev/console?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
phorsyon
n00b
n00b


Joined: 26 Sep 2002
Posts: 9

PostPosted: Fri Sep 23, 2005 12:44 pm    Post subject: Reply with quote

OK, I solved it. The machine I had to fix got a borked /bin and no /lib and /sbin at all 8O
Don't ask me why, one day before the box was just fine.

Right now the box is doing an emerge sync, the hdd is really loud. It seems like it will die any time soon. Well, this should explain this weirdness.

So by the way, at least by now it is not possible to chroot in an empty directory, but Iam still pretty sure that I did one time before :?

To the first post:
Check the environment where you want to chroot again, are /bin and /lib ok?
Back to top
View user's profile Send private message
polyacryl
n00b
n00b


Joined: 14 Sep 2003
Posts: 50

PostPosted: Thu Nov 10, 2005 8:04 pm    Post subject: Re: Can't chrooting Reply with quote

TheCableMan wrote:
Hi i'm trying to install gentoo on an other harddriver. When I came to the chrooting, the command doesn't work. It says:
Code:
Zion mnt # chroot /mnt/gentoo/ /bin/bash
chroot: cannot run command `/bin/bash': Permission denied

s1ider wrote:
If you mount the intended filesystem with user option you will get this error... chrooted filesystems must be mounted root only.
Back to top
View user's profile Send private message
Lukaszp
n00b
n00b


Joined: 30 Oct 2005
Posts: 5
Location: Siedlce, Poland

PostPosted: Fri Nov 11, 2005 4:21 pm    Post subject: Illegal instruction Reply with quote

I've got the same problem trying to chroot to new instalation.
I'm trying:

chroot /mnt/gentoo /bin/bash

and the message didsplayed is "Illegal instruction".
I've checked and i got bin/bash under /mnt/gentoo. Also permissions are good.
What can be the problem?
Back to top
View user's profile Send private message
wiz
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2005
Posts: 121
Location: {€urope}

PostPosted: Fri Nov 11, 2005 7:02 pm    Post subject: Reply with quote

are you sure you havent forgot to
Code:
mount -t proc none /mnt/gentoo/proc

just incase :)
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Fri Nov 11, 2005 8:26 pm    Post subject: Re: Illegal instruction Reply with quote

Lukaszp wrote:
I've got the same problem trying to chroot to new instalation.
I'm trying:

chroot /mnt/gentoo /bin/bash

and the message didsplayed is "Illegal instruction".
I've checked and i got bin/bash under /mnt/gentoo. Also permissions are good.
What can be the problem?
That sounds like you use a livecd for a different cpu than your system has. Which livecd are you using and what cpu do you have?
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Lukaszp
n00b
n00b


Joined: 30 Oct 2005
Posts: 5
Location: Siedlce, Poland

PostPosted: Sun Nov 13, 2005 3:21 pm    Post subject: Re: Illegal instruction Reply with quote

nixnut wrote:
That sounds like you use a livecd for a different cpu than your system has. Which livecd are you using and what cpu do you have?


I'm using stage3-i686-2005.1 and my processor is AMD K6. I'm installing it on old Toshiba laptop (Satellite 2180 CDT)
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Nov 13, 2005 3:47 pm    Post subject: Re: Illegal instruction Reply with quote

Lukaszp wrote:
nixnut wrote:
That sounds like you use a livecd for a different cpu than your system has. Which livecd are you using and what cpu do you have?


I'm using stage3-i686-2005.1 and my processor is AMD K6. I'm installing it on old Toshiba laptop (Satellite 2180 CDT)

Right, a K6 is NOT an i686 class processor, so you'll need a x86 stage file.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Lukaszp
n00b
n00b


Joined: 30 Oct 2005
Posts: 5
Location: Siedlce, Poland

PostPosted: Mon Nov 14, 2005 12:17 pm    Post subject: Re: Illegal instruction Reply with quote

nixnut wrote:
Right, a K6 is NOT an i686 class processor, so you'll need a x86 stage file.


Are you sure. I've read somewhere that AMD K5 is 585 arch. and K6 is 686 but don't know what that maigic "i" in "i686" is :)
Back to top
View user's profile Send private message
CyBaH
n00b
n00b


Joined: 14 Nov 2005
Posts: 3
Location: Emmen, The Netherlands

PostPosted: Mon Nov 14, 2005 2:07 pm    Post subject: Re: Illegal instruction Reply with quote

Lukaszp wrote:
nixnut wrote:
Right, a K6 is NOT an i686 class processor, so you'll need a x86 stage file.


Are you sure. I've read somewhere that AMD K5 is 585 arch. and K6 is 686 but don't know what that maigic "i" in "i686" is :)


Yes very sure...

K5-k6 are x86 proccessors.... from the athlon there is a special stageball downloadable..

So i suggest to repeat the installation with the right stage and i bet it will work fine then.

good luck

PS, the magic i at i686 stands for intel as far i know
_________________
The serversolution for your ict-puzzle: http://www.syn-3.nl | Ubernoob posting msg
Back to top
View user's profile Send private message
Lukaszp
n00b
n00b


Joined: 30 Oct 2005
Posts: 5
Location: Siedlce, Poland

PostPosted: Mon Nov 14, 2005 3:35 pm    Post subject: Re: Illegal instruction Reply with quote

CyBaH wrote:

Yes very sure...

K5-k6 are x86 proccessors.... from the athlon there is a special stageball downloadable..

So i suggest to repeat the installation with the right stage and i bet it will work fine then.

good luck

PS, the magic i at i686 stands for intel as far i know


Thanks! I found this in .../etc/make.conf.example:
Quote:
#All K6's are i586.


:)
Back to top
View user's profile Send private message
robbyt
n00b
n00b


Joined: 11 Aug 2004
Posts: 32

PostPosted: Fri Dec 16, 2005 11:33 pm    Post subject: Reply with quote

i'm having a problem close to this, and i think i just figured it out-

to preface, i have a daily backup script that tars up each folder under / to a diffrent tar. So i have etc.tar.gz root.tar.gz and so on...

So the day came to restore from backup-

booted off the gentoo rescue cd, mounted my backupserver, untared my tars to the new hd, tried chrooting...
"/bin/bash not found.."

so i did a gentoo forums search...

so it turns out! i've been forgetting to tar up my /lib/ directory! crap!
i tar'd one up off another working machine, dumped that on there, my chroot came to life.

but anyhow, point of this post, running /mnt/gentoo/bin/bash worked. That's a great way to test to see if the bash binary is working on the current system. That should be troubleshooting step #1 when stuff like this happens to you!
Back to top
View user's profile Send private message
sonnygaarslev
n00b
n00b


Joined: 24 Jan 2006
Posts: 8

PostPosted: Fri Jan 27, 2006 5:12 pm    Post subject: Reply with quote

I have am p3 cpu, and im using the x86 cd..

I have the same problem, anyone knows what to do?
Back to top
View user's profile Send private message
crocop
n00b
n00b


Joined: 26 Jan 2006
Posts: 47

PostPosted: Fri Jan 27, 2006 7:05 pm    Post subject: Reply with quote

I had the same problem, while installing gentoo on AMD64. The solution was to chroot from KANOTIX 64, which worked perfectly.
Good luck! :)
Back to top
View user's profile Send private message
Swisside
n00b
n00b


Joined: 13 Feb 2005
Posts: 27

PostPosted: Thu Mar 09, 2006 12:22 pm    Post subject: Reply with quote

Thanks crocop. You might just have solved my problem...

All I need now, is a Kanotix-Iso...
Back to top
View user's profile Send private message
frodoontop
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 86

PostPosted: Sat May 06, 2006 11:05 am    Post subject: Reply with quote

Mount it without the user option in /etc/fstab seems to do the trick. Thanks a lot :)
_________________
Rubyripper, a secure audio ripper for linux. Look at the wiki page http://wiki.hydrogenaudio.org/index.php?title=Rubyripper for technical and developer info, screenshots and discussion about it's future.
Back to top
View user's profile Send private message
Hamlet
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2005
Posts: 136
Location: Turin (Italy)

PostPosted: Wed Jun 14, 2006 3:27 pm    Post subject: Reply with quote

I had this problem many times, too (and I always forget how to solve it).

In my case, it's a problem of permission due not to file permissions but to file-system ones.
I've solved with:
Code:

mount -o remount,exec,suid,dev,rw /mnt/gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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