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 at localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory [root at 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 at localhost root]# ls /mnt/sysimage/bin/bash /mnt/sysimage/bin/bash [root at localhost root]# ls /bin/bash /bin/bash [root at localhost root]# ls -al /mnt/sysimage/bin/bash -rwxr-xr-x 1 root root 903272 Feb 21 2013 /mnt/sysimage/bin/bash [root at 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. -- Stephen Clark *NetWolves* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com
On Fri, Feb 21, 2014 at 11:09 AM, Steve Clark <sclark at 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 at 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. -- ---~~.~~--- Mike // SilverTip257 //
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 at localhost root]# /usr/sbin/chroot /mnt/sysimage /bin/bash > /usr/sbin/chroot: failed to run command `/bin/bash': No such file or directory > > [root at 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 at localhost root]# ls /mnt/sysimage/bin/bash > /mnt/sysimage/bin/bash > > [root at localhost root]# ls /bin/bash > /bin/bash > > [root at localhost root]# ls -al /mnt/sysimage/bin/bash > -rwxr-xr-x 1 root root 903272 Feb 21 2013 /mnt/sysimage/bin/bash > > [root at 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. -- Stephen Clark *NetWolves* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com