Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2002 16:13:39 -0700
From:      Marc Butler <marcbutler@timing.com>
To:        freebsd-current@FreeBSD.org
Subject:   Problem with /dev/stdout in a chroot environment.
Message-ID:  <20021230161339.A89641@timing.com>

next in thread | raw e-mail | index | archive | help
I'm currently trying to build CURRENT (DEC 29 2002) within a chroot
environment under CURRENT (DEC 17 2002).  Presently I am stuck on an
error which appears to be related to /dev/stdout in a chroot
environment (devfs?).

Specifically writing to /dev/stdout does not work (specifically:
genassym.sh).

For example (my default shell is tcsh, chroot directory is "chroot"):

bugs.ttyp0% sudo chroot chroot 
# echo "test" > /dev/stdout
# echo "test" > /dev/tty
# echo "test" > /dev/fd/1
# 

As you can see none of these result in test written to the shell.

Additionally /bin/sh sounds off if specifically started in place of
tcsh:

bugs.ttyp0% sudo chroot chroot /bin/sh
sh: can't access tty; job control turned off

In the chroot environment /dev looks to be broken when compared to the
/dev system in the hosting environment:

bugs.ttyp0% devnum chroot/dev/fd/1
chroot/dev/fd/1: dev = 4/11
bugs.ttyp0% devnum /dev/fd/1
/dev/fd/1: dev = 255/67108864 (character) rdev = 22/1

I'm not sure whether this is the result something that I have done
incorrectly, or if it is a bug.  I have made a cursory look at jail,
but it appears to be _overkill_ for the task.

-- 
Marc Butler <marcbutler@timing.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021230161339.A89641>