I am setting up an embedded system that's supposed to run from RAMDISK only. Therefore I create a ramdisk, copy everything into it and then chroot. I encounter problems when accessing pcap-libs (or devices in /dev generally) as soon as I actually chroot:

# ls -l /dev/bpf0
crw-------  1 root  wheel   23,   0 Sep 27  2006 /dev/bpf0
# ls -l /tmp/chroot/dev/bpf0
crw-------  1 root  wheel   23,   0 Sep 28  2006 /tmp/chroot/dev/bpf0
# tcpdump
tcpdump: listening on fxp0, link-type EN10MB
[...]
60 packets received by filter
0 packets dropped by kernel
# chroot /tmp/chroot/
/bin/ksh: No controlling tty (open /dev/tty: Device not configured)
/bin/ksh: warning: won't have full job control
# tcpdump
tcpdump: Failed to open bpf device for fxp0: Device not configured

tcpdump is just an example. Other programs access bpf0 (exactly) correctly when in the native system and fail to access bpf0 when in chrooted environment.

What am I missing? And why is there this tty warning message? The tty device entry is in the chrooted /dev just like it is in the source system.

Help will be appreciated!

T.

Reply via email to