Subject: Problems using chroot(8).
To: None <netbsd-users@netbsd.org>
From: Micke <miny3945@comhem.se>
List: netbsd-users
Date: 07/11/2006 10:55:29
Hi all,
I'm trying to change root directory for Apache 2.0.58 using chroot but have run into some problems. It probably has to do with some file or library not present in the new directory structure, but I'm not sure. When I use ktruss and chroot Apache I see the following line:
execve("/usr/local/apache/bin/httpd", 0xbfbfea58, 0xbfbfea68) Err#8 ENOEXEC
According to execve(2) this means that the elf (?) magic number is invalid. My question is how elf determines if a magic value is invalid? Does it depend on loaded libraries (the whole process image) and could I use this as an indicator of that I'm still missing libraries in the chroot:ed installation?
Oh, and is ktruss a good tool for doing this kind of work (it seems to me like it is), or are there some better suited tools for doing this?
Please cc me because I'm not on the list.
/Micke