[Buildd-tools-devel] dchroot not working
Mauricio Ortiz Calvao
orca at if.ufrj.br
Tue Jul 25 12:57:52 UTC 2006
Hi there,
I have succesfully installed a chroot environment and then made it work
via dchroot for my amd64 machine at work, using as "core" system amd64
sarge release, and for chroot the i386 sarge release.
My problem is at home, where I have a "core" system using i386 sarge and
tried a chroot i386 etch. Within the chroot jail itselft everything works
fine as well, but when I try dchroot from the ambient system, it does not
work. An example of the strace log follows below:
orca at andromeda:~$ strace dchroot -c etch -d openoffice
execve("/usr/bin/dchroot", ["dchroot", "-c", "etch", "-d", "openoffice"],
[/* 35 vars */]) = 0
uname({sys="Linux", node="andromeda", ...}) = 0
brk(0) = 0x804c000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/opt/intel/cc/9.0/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = -1
ENOENT (Nosuch file or directory)
stat64("/opt/intel/cc/9.0/lib/tls/i686/cmov", 0xbfffeed4) = -1 ENOENT (No
such file or directory)
open("/opt/intel/cc/9.0/lib/tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
stat64("/opt/intel/cc/9.0/lib/tls/i686", 0xbfffeed4) = -1 ENOENT (No such
file or directory)
open("/opt/intel/cc/9.0/lib/tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
stat64("/opt/intel/cc/9.0/lib/tls/cmov", 0xbfffeed4) = -1 ENOENT (No such
file or directory)
open("/opt/intel/cc/9.0/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such
fileor directory)
stat64("/opt/intel/cc/9.0/lib/tls", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/cc/9.0/lib/i686/cmov/libc.so.6", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/opt/intel/cc/9.0/lib/i686/cmov", 0xbfffeed4) = -1 ENOENT (No such
fileor directory)
open("/opt/intel/cc/9.0/lib/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/intel/cc/9.0/lib/i686", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/cc/9.0/lib/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/intel/cc/9.0/lib/cmov", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/cc/9.0/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/intel/cc/9.0/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
open("/opt/intel/fc/9.0/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = -1
ENOENT (Nosuch file or directory)
stat64("/opt/intel/fc/9.0/lib/tls/i686/cmov", 0xbfffeed4) = -1 ENOENT (No
such file or directory)
open("/opt/intel/fc/9.0/lib/tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
stat64("/opt/intel/fc/9.0/lib/tls/i686", 0xbfffeed4) = -1 ENOENT (No such
file or directory)
open("/opt/intel/fc/9.0/lib/tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
stat64("/opt/intel/fc/9.0/lib/tls/cmov", 0xbfffeed4) = -1 ENOENT (No such
file or directory)
open("/opt/intel/fc/9.0/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such
fileor directory)
stat64("/opt/intel/fc/9.0/lib/tls", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/fc/9.0/lib/i686/cmov/libc.so.6", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/opt/intel/fc/9.0/lib/i686/cmov", 0xbfffeed4) = -1 ENOENT (No such
fileor directory)
open("/opt/intel/fc/9.0/lib/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/intel/fc/9.0/lib/i686", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/fc/9.0/lib/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/opt/intel/fc/9.0/lib/cmov", 0xbfffeed4) = -1 ENOENT (No such file
or directory)
open("/opt/intel/fc/9.0/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/opt/intel/fc/9.0/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=117655, ...}) = 0
old_mmap(NULL, 117655, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/var/chroot/etch-386/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260O\1"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1270928, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40034000
old_mmap(NULL, 1276892, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) =0x40035000
old_mmap(0x40163000, 32768, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e000) = 0x40163000
old_mmap(0x4016b000, 7132, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4016b000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x4016d000
mprotect(0x40163000, 20480, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x4016d6c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x40017000, 117655) = 0
getcwd("/home/orca", 4096) = 11
brk(0) = 0x804c000
brk(0x806d000) = 0x806d000
open("/etc/dchroot.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=409, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40017000
read(3, "# /etc/dchroot.conf\n#\n# This fil"..., 4096) = 409
stat64("/var/chroot/etch-386", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40017000, 4096) = 0
getuid32() = 1000
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40017000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40017000, 4096) = 0
open("/opt/intel/cc/9.0/lib/libnss_compat.so.2", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
open("/opt/intel/fc/9.0/lib/libnss_compat.so.2", O_RDONLY) = -1 ENOENT (No
suchfile or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=117655, ...}) = 0
old_mmap(NULL, 117655, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/var/chroot/etch-386/lib/tls/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\20"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30428, ...}) = 0
old_mmap(NULL, 33392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4016e000
old_mmap(0x40175000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x40175000
close(3) = 0
open("/opt/intel/cc/9.0/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/intel/fc/9.0/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/var/chroot/etch-386/lib/tls/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3405\0"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=80888, ...}) = 0
old_mmap(NULL, 88096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40177000
old_mmap(0x40189000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x40189000
old_mmap(0x4018b000, 6176, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4018b000
close(3) = 0
munmap(0x40017000, 117655) = 0
open("/opt/intel/cc/9.0/lib/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/opt/intel/fc/9.0/lib/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=117655, ...}) = 0
old_mmap(NULL, 117655, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/var/chroot/etch-386/lib/tls/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\34"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=38420, ...}) = 0
old_mmap(NULL, 37424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4018d000
old_mmap(0x40195000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x40195000
close(3) = 0
open("/opt/intel/cc/9.0/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/opt/intel/fc/9.0/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/var/chroot/etch-386/lib/tls/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\33"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=42472, ...}) = 0
old_mmap(NULL, 45720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40197000
old_mmap(0x401a1000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x401a1000
close(3) = 0
munmap(0x40017000, 117655) = 0
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
_llseek(3, 0, [0], SEEK_CUR) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1184, ...}) = 0
mmap2(NULL, 1184, PROT_READ, MAP_SHARED, 3, 0) = 0x40017000
_llseek(3, 1184, [1184], SEEK_SET) = 0
munmap(0x40017000, 1184) = 0
close(3) = 0
clone((etch) openoffice
dchroot: chroot: Operation not permitted
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x4016d708) = 7435
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 7435
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40017000
write(1, "dchroot: Child exited non-zero.\n", 32dchroot: Child exited
non-zero.
) = 32
write(1, "dchroot: Operation failed.\n", 27dchroot: Operation failed.
) = 27
munmap(0x40017000, 4096) = 0
exit_group(1) = ?
My dchroot.conf file reads:
# /etc/dchroot.conf
#
# This file configures the chroots that users can access with the
'dchroot'
# command. Input lines consist of a description and a path separated by
# whitespace. If more than one input line is present the first will be
the
# default chroot.
# Example : the following line enables a chroot called 'stable'
# located at /chroot/stable
#stable /chroot/stable
etch /var/chroot/etch-386
Any help is appreciated!
--
###############################################
PROF. MAURICIO O. CALVAO
Federal University of Rio de Janeiro
Institute of Physics, P. O. Box 68528
CEP 21941-972 Rio de Janeiro - RJ
Brazil
Home page: http://www.if.ufrj.br/~orca/
E-mail: orca at if.ufrj.br
Phone: (55)(21)2562-7483
###############################################
More information about the Buildd-tools-devel
mailing list