chroot: failed to run command '/bin/bash': Permission denied
This is a wiki page. Be bold and improve it!
If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.
$ sudo chroot /mnt/linux /bin/bash
chroot: failed to run command '/bin/bash': Permission denied
The error is what it says: /mnt/linux/bin/bash was found, but you are not allowed to execute it, even if you are root.
You will get the same error message if you run the command directly:
# /mnt/linux/bin/bash
bash: /mnt/linux/bin/bash: Permission denied
Most likely, the partition was mounted with the noexec flag, disallowing running any executable stored on that partition.
To check this, check the output of findmnt:
$ findmnt
...
|-/mnt/linux /dev/sdb1 ext4 rw,nosuid,nodev,noexec,noatime,data=ordered
...
See the noexec attribute.
The solution is to umount the partition. Check /etc/fstab, and if the partition is there, replace auto by noauto, user by nouser, add exec.
Remount the partition and try again.