%general-entities; ]> Populating /dev /dev/* Creating Initial Device Nodes The commands in the remainder of the book should be run as the root user. Also, double-check that ${CLFS} is set as root. When the kernel boots the system, it requires the presence of a few device nodes, in particular the console and null devices. The device nodes will be created on the hard disk so that they are available before udev has been started, and additionally when Linux is started in single user mode (hence the restrictive permissions on console). Create these by running the following commands: mknod -m 0600 ${CLFS}/dev/console c 5 1 mknod -m 0666 ${CLFS}/dev/null c 1 3 mknod -m 0666 ${CLFS}/dev/zero c 1 5 When systemd starts a tmpfs filesystem is mounted over /dev and the previous entries are no-longer available. The folling command creates files that are copied over when udevd starts: mkdir -pv ${CLFS}/lib/udev/devices/{pts,shm} mknod -m 0600 ${CLFS}/lib/udev/devices/console c 5 1 mknod -m 0666 ${CLFS}/lib/udev/devices/null c 1 3 mknod -m 0666 ${CLFS}/lib/udev/devices/zero c 1 5 mknod -m 0600 ${CLFS}/lib/udev/devices/kmsg c 1 11 ln -snvf /proc/self/fd ${CLFS}/lib/udev/devices/fd ln -snvf /proc/self/fd/0 ${CLFS}/lib/udev/devices/stdin ln -snvf /proc/self/fd/1 ${CLFS}/lib/udev/devices/stdout ln -snvf /proc/self/fd/2 ${CLFS}/lib/udev/devices/stderr ln -snvf /proc/kcore ${CLFS}/lib/udev/devices/core