You are not logged in.

#1 2012-06-12 22:09:57

DeatzoSeol
Member
Registered: 2012-06-12
Posts: 10

chroot: /bin/bash permission denied (but mounted as exec)

Hello forum

there was a recent update of udev/systemd, and I forgot to re-mkinitcpio, so I bricked my installation. I wanted to rebuild the image by chrooting, so I mounted the drive and set everything up according to the wiki, but then I got this error of which Google and every other motherfracking search engine gives me either the response that I should mount it "exec", which it was from the very beginning, or find an old thread with the same problem but no replies (oblig. xkcd.com/979/). Well, the error was "chroot: failed to run command '/bin/bash': Permission denied", which should not happen as a) the architectures match, b) drive was specifically mounted "exec", c) permissions on bin/bash are 755...

Seriously, I'm beyond saving now. Anyone willing to help a fellow soul?

Last edited by DeatzoSeol (2012-06-12 22:11:44)

Offline

#2 2012-06-13 03:34:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,727

Re: chroot: /bin/bash permission denied (but mounted as exec)

Are you certain you mounted the correct partition?
Before you enter the chroot, can you see bash at /your/mount/point/bin. ?

Even better, based upon the chroot command given in the wiki, your current directory should be /your/mount/point.  In other words, after you mount your root volume, cd to it.  From there, ls -l bin/bash should show you bash and its permissions.  If all is well, then perform the chroot . /bin/bash


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2012-06-13 12:29:27

DeatzoSeol
Member
Registered: 2012-06-12
Posts: 10

Re: chroot: /bin/bash permission denied (but mounted as exec)

[/mnt/chroot]$ ls -l bin/bash
-rwxr-xr-x 1 root root 705700 May  5 02:10 bin/bash
$ mount
/dev/sdb2 on /mnt/chroot type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/sdb1 on /mnt/chroot/boot type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
sys on /mnt/chroot/sys type sysfs (rw,relatime)
proc on /mnt/chroot/proc type proc (rw,relatime)
tmp on /mnt/chroot/tmp type tmpfs (rw,relatime)
devtmpfs on /mnt/chroot/dev type devtmpfs (rw,relatime,size=3039380k,nr_inodes=759845,mode=755)
devpts on /mnt/chroot/dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
[/mnt/chroot]# chroot . /bin/bash
chroot: failed to run command ‘/bin/bash’: Permission denied

See, everything should "Just Work"®, no idea though why it doesn't...

Last edited by DeatzoSeol (2012-06-13 12:31:22)

Offline

Board footer

Powered by FluxBB