I have created the a chroot jail in combination with unionfs-fuse so that I don't need to install another system inside it.
However, the resulting system's /dev entries are not readable.This is causing problems with programs needing access to /dev/random, /dev/null and /dev/urandom.
I tried to solve the issue myself by making a directory consisting of persistent files and making equivalents of the aforementioned files using mknod as described here, and then creating an unionfs:
# unionfs-fuse -o cow /chroot/files=RW:/chroot/persistent/:/ /chroot/chroot/
And then,
# chroot chroot/
But, when I try to:
# head -c 10 /dev/random | hexdump -C
I get the error:
head: cannot open `/dev/random' for reading: Permission denied
How should I work around this problem?
(I do not need access to other files in /dev like /dev/sd* or /dev/mem.)