Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Gentoo Linux Help > [SOLVED] Gentoo won't let me run bash

Forgot Password?
 Gentoo Linux Help   For help and discussion related to Gentoo Linux

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 03-07-2009   #1 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 493
[SOLVED] Gentoo won't let me run bash

I've been trying to install Gentoo out of Debian Lenny, using a spare partition. I've got the basic system set up, working as root, but when I try to chroot into it I get a permissions error: Cannot run command /bin/bash: permission denied. The same thing happens if I try to run Gentoo's version of bash (or of any other command for that matter) without chrooting.

I've checked the permissions on these commands and they are all world-executable. I notice that Gentoo's libc is a bit older than Lenny's. Is that what's causing the problem? And if so, how do I get round it?
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  


Old 03-07-2009   #2 (permalink)
Trusted Penguin
 
MikeTbob's Avatar
 
Join Date: Apr 2006
Location: Panther City, Tx
Posts: 4,110
You must be root to chroot into Gentoo, just in case you haven't already figured that out. Does it give you the same problem if you use any LiveCD such as Knoppix?
What are the exact commands you using to perform chroot?
mount /dev/hd?? /mnt/gentoo
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
__________________
I do not respond to private messages asking for help.
Please keep it on the forums only.
MikeTbob is online now  
Old 03-07-2009   #3 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 493
I don't have Knoppix but I tried with a live Ubuntu disc and I could chroot to the new partition without any difficulty and use commands in the bin directory, including bash. From Debian I can't. Weird isn't it! And yes, I was root when I tried. Various commands I've tried (all as root) are:
Code:
chroot /mnt/hda1
Code:
chroot /mnt/hda1 /bin/bash
Code:
cd /mnt/hda1/bin
./bash
They all give the same error
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Old 03-07-2009   #4 (permalink)
Trusted Penguin
 
MikeTbob's Avatar
 
Join Date: Apr 2006
Location: Panther City, Tx
Posts: 4,110
I would guess that it's a debian problem, although I wouldn't know where to begin pointing the finger, or like you mentioned, it could be a file version problem.
__________________
I do not respond to private messages asking for help.
Please keep it on the forums only.
MikeTbob is online now  
Old 03-08-2009   #5 (permalink)
Linux Guru
 
Join Date: Oct 2007
Posts: 2,410
Interesting problem ... when you try
Code:
chroot /mnt/hda1 /bin/bash
and get the permission failure what is the full output you get for mount?
what commands had you used before chroot?
Jonathan183 is offline  
Old 03-08-2009   #6 (permalink)
Trusted Penguin
 
MikeTbob's Avatar
 
Join Date: Apr 2006
Location: Panther City, Tx
Posts: 4,110
If you cannot figure out how to make this work from within Debian, I would suggest installing from a LiveCD like you mentioned "live Ubuntu disc" and use the handbook from the alt install guide (what little there is)
Gentoo Linux Documentation -- The Gentoo Linux alternative installation method HOWTO
Just *pretend* you're using Knoppix, it should work just fine.
__________________
I do not respond to private messages asking for help.
Please keep it on the forums only.
MikeTbob is online now  
Old 03-08-2009   #7 (permalink)
Linux User
 
gruven's Avatar
 
Join Date: Dec 2004
Location: Arkansas
Posts: 439
Send a message via ICQ to gruven Send a message via AIM to gruven Send a message via MSN to gruven Send a message via Yahoo to gruven Send a message via Skype™ to gruven
I would try to help, but honestly, I have not done a stable Gentoo install in ages. The last time I tried, it was broken and had circular dependencies like crazy, so I usually just stick with the handbook using funtoo tarballs and running an all ~arch install.

Yeah, I am asking for it, but at least it works.

About your problem, I have installed Gentoo from Debian before (and vice-versa), and never had that problem.
__________________

Linux User #376741
Preferred Linux Distro: Funtoo
Screenshots
Remember, Ubuntu is A Linux distribution, not THE Linux distribution.

There is no need to login to the GUI as root!
gruven is offline  
Old 03-08-2009   #8 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 493
Quote:
Originally Posted by Jonathan183 View Post
Interesting problem ... when you try
Code:
chroot /mnt/hda1 /bin/bash
and get the permission failure what is the full output you get for mount?
what commands had you used before chroot?
Here's the output of mount:

/dev/hda4 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/hda3 on /home type ext3 (rw)
/dev/hda1 on /mnt/hda1 type ext3 (rw,noexec,nosuid,nodev)
none on /mnt/hda1/proc type proc (rw)
/dev on /mnt/hda1/dev type none (rw,bind)

As you can see, I've got proc and dev mounted as specified. I mounted them first, then tried to chroot. Last night I thought it might be an X problem but I tried again just now from a virtual console and got the same results. I'm pretty sure it isn't the chroot that's failing, it's bash. I can't run any of the Gentoo commands, not even ldconfig, which is statically linked. Well, like Mike says, I can use Ubuntu to get round that but it irritates me when things happen that don't seem to have a rational explanation - especially in Linux!
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Old 03-08-2009   #9 (permalink)
Trusted Penguin
 
MikeTbob's Avatar
 
Join Date: Apr 2006
Location: Panther City, Tx
Posts: 4,110
Hazel, try this.
Instead of mounting /proc at none:
Code:
mount -o bind /proc /mnt/hda1/proc
Did you have any problems with the install before this happened?
__________________
I do not respond to private messages asking for help.
Please keep it on the forums only.
MikeTbob is online now  
Old 03-08-2009   #10 (permalink)
Linux Guru
 
Join Date: Oct 2007
Posts: 2,410
Quote:
Originally Posted by hazel View Post
/dev/hda1 on /mnt/hda1 type ext3 (rw,noexec,nosuid,nodev
I think your problem is caused by mount of hda1 ...
Jonathan183 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 07:56 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2