LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-23-2008, 01:42 PM   #1
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Rep: Reputation: 30
chroot: cannot run command `/bin/bash': No such file or directory


Hi,

I have removed the glibc package. Doh! I thought I remove it and then install newer version because "make menuconfig" didn't work.

Anyway, I could not run any commands. It always gave me:

...`/bin/bash': No such file or directory

So, I'm using Slax cd to boot, but then I still cannot do much.
It responds with the following when I try to CHROOT:

Quote:
chroot: cannot run command `/bin/bash': No such file or directory
What can I do? Please help.

Thanks
 
Old 03-23-2008, 01:58 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
You won't be able to run bash in the chrooted environment, as it lacks the shared libraries you deleted... If Slax uses the same package manager as Slackware, you can try installing the glibc package directly from the Slax CD, just use the option -root to the installpkg command.
 
Old 03-23-2008, 02:16 PM   #3
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
I've downloaded the latest glib package and tried to do "installpkg glib-...tgz". It went mental at some point during the installation. I had to switch the computer off and on. I downloaded it to the Slax's / directory, so because it doesn't actually exist it didn't work. Am I right?

Where do I have to put the package and install it?
 
Old 03-23-2008, 02:32 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Well, what I meant was
1) boot from your CD
2) suppose, your old root is on /dev/hda2, mount it somewhere, say,
mount /dev/hda2 /mnt
3) install your package (presumably located at, say, /mnt/home/user/packagename.tgz) by doing this

installpkg -root /mnt /mnt/home/user/packagename.tgz
 
Old 03-23-2008, 02:33 PM   #5
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
Thanks, did "installpkg -root /mnt/sda3 glibc-...tgz". Now it works!
 
Old 03-23-2008, 05:37 PM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
For future reference: http://rlworkman.net/howtos/glibc-recovery
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot: cannot run command `/bin/bash': Exec format error snakeo2 Linux - Newbie 6 09-28-2010 03:41 AM
chroot: cannot run command `/tools/bin/env': No such file or directory Basel Linux From Scratch 5 06-30-2006 03:00 AM
bash: /usr/bin/localedef: No such file or directory satimis Linux From Scratch 2 07-28-2005 01:53 AM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 02:30 AM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 07:18 AM


All times are GMT -5. The time now is 01:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration