Bug 24458 - chroot don't change root directory ?
chroot don't change root directory ?
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: bero
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-20 12:28 EST by Laurent
Modified: 2007-04-18 12:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-20 12:28:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Laurent 2001-01-20 12:28:56 EST
Here is an example of what I do:
# cd /some/where
# cp /bin/bash bin/
# ls -l bin/
# -rwxr-xr-x    1 root     root       512540 jan 20 16:41 bash
# chroot /some/where
# chroot: cannot execute /bin/bash: No such file or directory
#whoami
root

I don't understand, /bin/bash exist and is executable,
with FreeBSD I do that without a problem
Comment 1 Bernhard Rosenkraenzer 2001-01-20 12:50:41 EST
This is almost certainly a user mistake:
Our shell is linked dynamically.
Make sure /lib/ld-linux.so.2, /lib/libc.so.6, /lib/libdl.so.2 and
/lib/libtermcap.so.2
are in the chroot structure. Without them, bash can't be executed.

Alternatively, recompile bash with the "-static" CFLAG. This is what the BSDs do
to their shells.

Note You need to log in before you can comment on or make changes to this bug.