You are not logged in.
Pages: 1
I get the above error message and I don't understand why.
Steps to reproduce:
cd /
mkdir -p mydir/bin
cp -r /usr/bin/* /mydir/bin/observe that this command:
/mydir/bin/bashsuccessfully gets us into a next shell. exit that shell
but here's the thing:
chroot /mydir /usr/bin/bash
=> chroot: failed to run command ‘/usr/bin/bash’: No such file or directorywhy can't usr/bin/bash be found under /mydir when run with chroot?
Offline
sorry, correction to the original post to include the /usr subtree
cd /
mkdir -p mydir/usr/bin
cp -r /usr/bin/* /mydir/usr/bin/The problem remains
[ / ]# tree mydir
mydir
└── usr
└── bin
└── bash
[root /]# chroot /mydir /usr/bin/bash
chroot: failed to run command ‘/usr/bin/bash’: No such file or directoryLast edited by sjltaylor (2013-02-08 11:13:55)
Offline
Yeah, but you copied everything into /mydir/bin. /usr/bin/bash doesn't exist under the new root.
Edit: nevermind, you changed your post
Last edited by jakobcreutzfeldt (2013-02-08 11:15:10)
Offline
/bin/bash is a symlink to
/usr/bin/bash[root /]# stat /usr/bin/bash
File: ‘/usr/bin/bash’
Size: 738008 Blocks: 1456 IO Block: 4096 regular file
Device: ca00h/51712d Inode: 32381 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-02-07 21:10:42.000000000 +0000
Modify: 2013-01-27 00:22:36.000000000 +0000
Change: 2013-02-07 21:10:42.000000000 +0000
Birth: -
[root /]# stat /bin/bash
File: ‘/bin/bash’ -> ‘../usr/bin/bash’
Size: 15 Blocks: 0 IO Block: 4096 symbolic link
Device: ca00h/51712d Inode: 26 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-02-07 21:10:42.000000000 +0000
Modify: 2013-01-27 00:22:36.000000000 +0000
Change: 2013-02-07 21:10:42.000000000 +0000
Birth: -Offline
how do I fix that?
Offline
Pages: 1