On 4/22/16, Haines Brown <hai...@histomat.net> wrote: > On Fri, Apr 22, 2016 at 12:04:41AM +0000, Mark Fletcher wrote: > >> 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/.
This is the [syntax] I use: LANG=C.UTF-8 chroot /mnt/cin /bin/bash /mnt/cin was my easier to type and remember alternative to /mnt/debinst. Gets it done for me every time. It was just a twist on what I'd found on the Net when I first taught myself that part of Debian (for debootstrap installations). I'd never *thought* about how or why it was doing what it was doing until reading through this thread... Are you all saying that it starts looking for /bin/bash AFTER it's inside the chroot session? I started to say: "If the answer to that question is yes, then what's happening with the failed /mnt/debinst/bin/bash is that the /mnt/debinst path in fact does *not* exist to your target chroot session once you're inside chroot. That aspect of the process was hard for my brain to wrap itself around originally after a few years's worth of experience where anything Linux was able to access anything else it wanted." BUT: After thinking yet that much harder on this, maybe there's some magic command that a fellow user knows that changes that. The potential for such a command never occurred to me because I had no driving need for it. I could always complete what was needed by simply switching between terminals that represented a latest shiny, new deboostrap install and its old, worn out, "cruft" filled predecessor. Just now the thought crossed my mind that maybe some chroot sessions do in fact demand the ability to access the outside World depending on their purpose along with what's already installed. Since you're working with /mnt/debinst, I'm a-suming this is potentially a phenomenally basic deboostrap install attempt because I remember being instructed to create that same directory for my own original debootstrap attempts. Good luck! Cindy -- Cindy-Sue Causey Talking Rock, Pickens County, Georgia, USA * would run in a pair of rain galoshes... if she owned them *