In short: I am trying to install BIND9 on OSX inside a jail-environment (chroot) and failing to create a /dev/{null, random} file inside.

Since Apple is slowly removing support for DNS, DHCP and more services in their server application, I tried to work out a suitable solution for using DNS and DHCP services on a Mac operating system. I ended up using BIND9 and ISC-DHCP.

For the installation of BIND9 I am following this guide. I'm currently having issues at section 2.4 where I need to create a /dev/null and a /dev/random file in a jail environment.

What I found out until now:

The major/minor number for null/random is different on macOS than on linux.

$ ls -l /dev/null
$ crw-rw-rw-  1 root  wheel    3,   2 28 Jan 19:01 /dev/null

This happens when I create /dev/null with the right mknod command:

$ sudo mknod /home/user/null_test c 3 2
$ chmod 666 /home/user/null_test
$ cat /dev/null
$ cat /home/user/null_test
$ cat: null_test: Invalid argument

I also tried comparing the original /dev/null with stat -x, but with no reasonable result for me. The cat error at the end of the upper code block really leaves me in doubt if this could work.

Do you have a hint on how to create a working /dev/null and /dev/random copy?

  • 1
    You could always ignore the entire problem and use homebrew to install BIND. It currently has version 9.12.1-P2 ready to go. It also has ISC-DHCP version 4.4.1 – Tony Williams May 23 '18 at 22:45

You must log in to answer this question.

Browse other questions tagged .