LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   chroot: cannot run command `/bin/bash': No such file or directory (http://www.linuxquestions.org/questions/slackware-14/chroot-cannot-run-command-%60-bin-bash-no-such-file-or-directory-630056/)

hubabuba 03-23-2008 02:42 PM

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

Uncle_Theodore 03-23-2008 02:58 PM

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.

hubabuba 03-23-2008 03:16 PM

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?

Uncle_Theodore 03-23-2008 03:32 PM

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

hubabuba 03-23-2008 03:33 PM

Thanks, did "installpkg -root /mnt/sda3 glibc-...tgz". Now it works!

rworkman 03-23-2008 06:37 PM

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


All times are GMT -5. The time now is 12:37 AM.