On Mon, Nov 15, 2010 at 11:11 AM, Peter Stuge <[email protected]> wrote:
> Matt Turner wrote:
>> chroot: failed to run command `/tmp/stage1-preclean-chroot.sh': No such file 
>> or directory
>
> Can you check with strace which file it is that is actually missing?
>
>
> //Peter

Yes, good idea.

bcm91250a-be space # strace -o output.strace chroot
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/
/bin/bash
chroot: failed to run command `/bin/bash': No such file or directory

It actually reports
execve("/bin/bash", ["/bin/bash"], [/* 27 vars */]) = -1 ENOENT (No
such file or directory)

But what the heck?

bcm91250a-be space # ls -lh
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
-rwxr-xr-x 1 root root 880K Nov 15 00:38
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
bcm91250a-be space # file
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash
/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/bin/bash:
ELF 32-bit MSB executable, MIPS, N32 MIPS64 version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with
unknown capability 0x41000000 = 0xf676e75, with unknown capability
0x10000 = 0x70401, stripped

Matt
execve("/usr/bin/chroot", ["chroot", "/space/catalyst/tmp/default/stag"..., 
"/bin/bash"], [/* 27 vars */]) = 0
brk(0)                                  = 0x10017000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2acad000
uname({sys="Linux", node="bcm91250a-be", ...}) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=15388, ...}) = 0
mmap(NULL, 15388, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2accc000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, 
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\1o\250\0\0\0004"..., 512) = 
512
lseek(3, 736, SEEK_SET)                 = 736
read(3, "\0\0\0\4\0\0\0\20\0\0\0\1GNU\0\0\0\0\0\0\0\0\2\0\0\0\6\0\0\0\t", 32) = 
32
fstat(3, {st_mode=S_IFREG|0755, st_size=1542312, ...}) = 0
mmap(NULL, 1523520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x2acde000
mprotect(0x2ae35000, 65536, PROT_NONE)  = 0
mmap(0x2ae45000, 40960, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x157000) = 0x2ae45000
mmap(0x2ae4f000, 12096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ae4f000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2acd0000
SYS_6246()                              = 0
mprotect(0x2ae45000, 32768, PROT_READ)  = 0
mprotect(0x10015000, 4096, PROT_READ)   = 0
mprotect(0x2acdc000, 4096, PROT_READ)   = 0
munmap(0x2accc000, 15388)               = 0
brk(0)                                  = 0x10017000
brk(0x10038000)                         = 0x10038000
chroot("/space/catalyst/tmp/default/stage1-mips4_n32-20101114/tmp/stage1root/") 
= 0
chdir("/")                              = 0
execve("/bin/bash", ["/bin/bash"], [/* 27 vars */]) = -1 ENOENT (No such file 
or directory)
write(2, "chroot: ", 8)                 = 8
write(2, "failed to run command `/bin/bash"..., 33) = 33
write(2, ": No such file or directory", 27) = 27
write(2, "\n", 1)                       = 1
close(1)                                = 0
close(2)                                = 0
exit_group(127)                         = ?

Reply via email to