Hi List,
Strange problem.
I am running off of CentOS x86_64 6.4 usb key that is sdb
I have ssd disk that has a centos image on it. I have mounted the partitions /dev/sda3 as /mnt/sysimage and /dev/sda1 as /mnt/sysimage/boot
I am trying to chroot to /mnt/sysimage dir but get the following error.
[root@localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory
[root@localhost root]# ls /mnt/sysimage/ bin dev home lost+found opt root selinux sys usr boot etc lib media proc sbin smb tmp var
[root@localhost root]# ls /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash
[root@localhost root]# ls /bin/bash /bin/bash
[root@localhost root]# ls -al /mnt/sysimage/bin/bash -rwxr-xr-x 1 root root 903272 Feb 21 2013 /mnt/sysimage/bin/bash
[root@localhost root]# file /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dyn amically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
I can't figure out why this doesn't work. I use to be able to do this.
Anyone have any ideas.
On Fri, Feb 21, 2014 at 11:09 AM, Steve Clark sclark@netwolves.com wrote:
Hi List,
Strange problem.
Interesting, no doubt.
I am running off of CentOS x86_64 6.4 usb key that is sdb
I have ssd disk that has a centos image on it. I have mounted the partitions /dev/sda3 as /mnt/sysimage and /dev/sda1 as /mnt/sysimage/boot
I am trying to chroot to /mnt/sysimage dir but get the following error.
[root@localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory
If you run chroot without the third item (the command), it will use whatever value is in $SHELL [manpage] If no command is given, run '${SHELL} -i' (default: '/bin/sh -i'). [/manpage]
`echo ${SHELL}` to find out what that might be.
You might check the shell variable and also see if you can chroot without specifying a command as you have been doing.
I've chrooted a few cloned installs in the past week, but I didn't use the CentOS media. I have a copy of SystemRescueCD (default shell is zsh) on my PXE server and go at it that way.
On 02/21/2014 11:09 AM, Steve Clark wrote:
Hi List,
Strange problem.
I am running off of CentOS x86_64 6.4 usb key that is sdb
I have ssd disk that has a centos image on it. I have mounted the partitions /dev/sda3 as /mnt/sysimage and /dev/sda1 as /mnt/sysimage/boot
I am trying to chroot to /mnt/sysimage dir but get the following error.
[root@localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory
[root@localhost root]# ls /mnt/sysimage/ bin dev home lost+found opt root selinux sys usr boot etc lib media proc sbin smb tmp var
[root@localhost root]# ls /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash
[root@localhost root]# ls /bin/bash /bin/bash
[root@localhost root]# ls -al /mnt/sysimage/bin/bash -rwxr-xr-x 1 root root 903272 Feb 21 2013 /mnt/sysimage/bin/bash
[root@localhost root]# file /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dyn amically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
I can't figure out why this doesn't work. I use to be able to do this.
Anyone have any ideas.
I think I figured it out - the change root environment is tarred up from another system and I forgot lib64 dir.
On 02/21/2014 12:24 PM, Steve Clark wrote:
On 02/21/2014 11:09 AM, Steve Clark wrote:
Hi List,
Strange problem.
I am running off of CentOS x86_64 6.4 usb key that is sdb
I have ssd disk that has a centos image on it. I have mounted the partitions /dev/sda3 as /mnt/sysimage and /dev/sda1 as /mnt/sysimage/boot
I am trying to chroot to /mnt/sysimage dir but get the following error.
[root@localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory
[root@localhost root]# ls /mnt/sysimage/ bin dev home lost+found opt root selinux sys usr boot etc lib media proc sbin smb tmp var
[root@localhost root]# ls /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash
[root@localhost root]# ls /bin/bash /bin/bash
[root@localhost root]# ls -al /mnt/sysimage/bin/bash -rwxr-xr-x 1 root root 903272 Feb 21 2013 /mnt/sysimage/bin/bash
[root@localhost root]# file /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dyn amically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
I can't figure out why this doesn't work. I use to be able to do this.
Anyone have any ideas.
I think I figured it out - the change root environment is tarred up from another system and I forgot lib64 dir.
Yep that was it sorry for the noise. It is just so misleading the error message saying it can't find /bin/bash when it obviously there.