On Fri, Apr 22, 2016 at 12:04:41AM +0000, Mark Fletcher wrote: > > On Fri, 22 Apr 2016 at 08:18, Haines Brown <hai...@histomat.net> wrote: > > I attempt to chroot from /dev/sdb on /dev/sda. > > # mount /dev/sda1 /mnt/debinst > > I verify it is mounted and then do: > > # LANG=C.UTF8 /usr/sbin/chroot /mnt/debinst /bin/bash > /usr/sbin/chroot: failed to run command `/bin/bash': No such file or > directory > Does /mnt/debinst/bin/bash exist? > > It's looking for /bin/bash in the chrooted environment and not finding it.
I fixed this and: $ ls -la /mnt/debinst/bin ... -rwxr-xr-x 1 root root 941252 Apr 22 06:22 bash but still: # LANG=C.UTF8 chroot /mnt/debinst /mnt/debinst/bin/bash chroot: failed to run command `/mnt/debinst/bin/bash': No such file or directory Am I misunderstanding the chroot syntax? It seems the object is to run /mnt/debinst/bin/bash with its root being /mnt/debinst/. I did this: # LANG=C.UTF8 chroot /mnt/debinst chroot: failed to run command `/bin/bash': No such file or directory $ ls /bin | grep bash bash rbash $ ls /mnt/debinst/bin | grep bash bash Haines