Re: [arch-general] Cannot chroot '/bin/bash': No such file or directory
On 03/06/2013 08:24 PM, Ross Hamblin wrote:
It's been a while now but ISTR this message when chroot from 32 bit host and 64 bit target, or maybe it was vice versa.
HTH Ross.
It does. It has to be something that simple. However, checking, I have booted with the i686 install medium. The box is an older dell P4, so the i686 is correct and matches the system installed. The install disk /bin/bash date is May 7, 2011. The /bin/bash on /dev/sda6 at /mnt/usr/bin/bash (after mount of the system / at /mnt) is January 26, 2013. Attempting the chroot again on fresh reboot gives the same failure: # 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. -- David C. Rankin, J.D.,P.E.
On Thu, Mar 7, 2013 at 10:30 PM, David C. Rankin < drankinatty@suddenlinkmail.com> 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
participants (2)
-
David C. Rankin
-
Rodrigo Rivas