Gentoo Archives: gentoo-user

From: Zhang Weiwu <zhangweiwu@××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] chroot complain not able to find file/directory when it's actually there
Date: Sun, 04 Jan 2009 04:41:37
Message-Id: 49603DFB.3070805@realss.com
1 Hello. Sorry for stupid newbie question:
2
3 # cp /bin/sh /usr/local/bin/sh
4 # chroot /usr/local /bin/sh
5 chroot: cannot run command `/bin/sh': No such file or directory
6
7 In theory it should work, right? This is the first time I run chroot not
8 for rescuing a broken system (which means /dev/ and /proc/ are not
9 mounted in chroot jail). However I guess /dev/ and /proc/ doesn't have
10 to be mounted to run chroot.
11
12 I am sure this is not because the executable is dynamically linked to a
13 file outside of the chroot jail, because I also tried to run executables
14 compiled with USE=static
15
16 What could be the reason (for complaining an existing file "No such file")?
17
18 Thanks in advance. Using coreutils-6.10-r2 on ibook/ppc

Replies

Subject Author
Re: [gentoo-user] chroot complain not able to find file/directory when it's actually there Alan McKinnon <alan.mckinnon@×××××.com>