Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Cannot chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sat Mar 26, 2005 7:44 pm    Post subject: [solved] Cannot chroot Reply with quote

That's weird. I have a complete working Gentoo system mounted under /new and I want to chroot there:
Code:

# chroot /new/ /bin/bash
chroot: cannot run command `/bin/bash': Permission denied
# whoami
root


Code:
-rwxrwxrwx  1 root root 624932 Mar 23 22:04 /new/bin/bash


Permission denied even if I'm the r00t?!

Note: I'm not installing Gentoo (for Moderators), I just want to chroot:)


Last edited by zieloo on Sun Mar 27, 2005 9:38 am; edited 1 time in total
Back to top
View user's profile Send private message
tredman2
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 169
Location: Holiday, FL

PostPosted: Sat Mar 26, 2005 8:48 pm    Post subject: Reply with quote

Don't know if it makes any difference, but try it without the trailing slash on /new.
_________________
Tim
"I drank what?" - Socrates, 399 BCE
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sat Mar 26, 2005 8:58 pm    Post subject: Reply with quote

I doesn't make any difference, chroot fails with the same message.
Back to top
View user's profile Send private message
tukachinchila
Apprentice
Apprentice


Joined: 11 Mar 2005
Posts: 274
Location: Oregon

PostPosted: Sat Mar 26, 2005 8:59 pm    Post subject: Reply with quote

Is "/new" mounted "noexec", "nosuid", or "ro"? Can you supply the output of:
Code:
mount -l
Back to top
View user's profile Send private message
tredman2
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 169
Location: Holiday, FL

PostPosted: Sat Mar 26, 2005 8:59 pm    Post subject: Reply with quote

Are you in /new when you execute the chroot command?
_________________
Tim
"I drank what?" - Socrates, 399 BCE
Back to top
View user's profile Send private message
Nard`
Apprentice
Apprentice


Joined: 23 Jan 2005
Posts: 250

PostPosted: Sat Mar 26, 2005 9:03 pm    Post subject: Reply with quote

hate to state the obvious, but:

can you execute /new/bin/bash normally? (i.e. without trying to chroot)?

if not:

ls -dl /new

Are permissions ok?

ls -dl /new/bin

Same as above, etc. Till you get to the problem ;)

--- Just an idea
_________________
Programming is the process of putting bugs in.
Debugging is the process of attempting to take bugs out, doing an ugly hack, hitting your computer, then claiming insurance.
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sat Mar 26, 2005 9:54 pm    Post subject: Reply with quote

Code:
# /new/bin/bash
bash: /new/bin/bash: Permission denied

# ls -dl /new/
drwxr-xr-x  18 root root 4096 Mar 23 17:48 /new/

# ls -dl /new/bin/bash
-rwxrwxrwx  1 root root 624932 Mar 23 22:04 /new/bin/bash

# ls -dl /new/bin/     
drwxr-xr-x  2 root root 4096 Mar 24 08:56 /new/bin/


And?
Back to top
View user's profile Send private message
tukachinchila
Apprentice
Apprentice


Joined: 11 Mar 2005
Posts: 274
Location: Oregon

PostPosted: Sat Mar 26, 2005 10:26 pm    Post subject: Reply with quote

Quote:
And?

What does
Code:
mount -l
show you?
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sun Mar 27, 2005 9:38 am    Post subject: Reply with quote

tukachinchila wrote:
Is "/new" mounted "noexec", "nosuid", or "ro"? Can you supply the output of:
Code:
mount -l


:oops: Yes, it was mounted with noexec bit...
Thanks a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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