Re: Cannot chroot '/bin/bash': No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, Mar 7, 2013 at 10:30 PM, David C. Rankin <
drankinatty@xxxxxxxxxxxxxxxxxx> wrote:

> On 03/06/2013 08:24 PM, Ross Hamblin wrote:
> # cd /mnt
> # chroot /mnt
> chroot: failed to run command `/bin/bash`: No such file or directory
>
>   For some reason it is like the system has no ability to find anything.
> The
> install cd is a pre /lib change cd, so that may be the issue. I have
> downloaded
> the latest install cd and will try again.
>
> Thank you again Ross.
>
> Any other suggestions welcomed.


Well, that error usually happens, at least to me, when the dynamic loader
is unable to solve the shared dependencies of bash, hence the suggestion to
use busybox: it is statically linked, so it doesn't suffer of that problem.

In my machine the dynamic loader is `/usr/lib/ld-linux.so.2` but the
reference to it is `/lib/ld-linux.so.2`. It works because of the `/lib` ->
`usr/lib` symbolic link. I'd bet that the cause of your problem is that
this link is missing. If

If the symbolic link in /lib is correct, it also may happen because the
`/etc/ld.so.cache` file is corrupted. You can rebuild it using `chroot /mnt
/usr/bin/ldconfig` or maybe `ldconfig -r /mnt` (untested). That can work
because `ldconfig` is (obviously) a statically linked program.

HTH
Rodrigo


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux