Image for Fedora 28 amd64 has no devices

i downloaded a few images to look around in including the image for Fedora 28 amd64 (since i administered 15 Fedora machines a couple jobs ago (retired now)). i extracted rootfs.tar.xz from each under a non-root user because i only wanted to see the contents of some libraries, fully expecting tar to give me a flood of error messages. but for Fedora, there were no error messages. so my first curiosity, was /dev even there … yes it was. so my second curiosity, what was in it … just null … and it was a regular file. the contents were a couple of messages i guess were being thrown away. apparently /dev didn’t get built except for the directory, and something inside the build container (or chroot) did >/dev/null which created a file. if there was something testing for /dev being empty (for failure) or not then that test was fooled.

i guess i need to download more images, now.

It’s not particularly surprising that some images may not have anything in /dev.
Most distributions use devtmpfs or a similar temporary filesystem to provide the /dev nodes, leading to no actual file existing on disk.

The presence of null as a regular file suggests that some package that got installed during image creation tried to write to /dev/null prior to devtmpfs being setup on /dev (maybe?).

In any case, not something to worry about as LXC/LXD do setup a tmpfs on /dev for all containers, so the content of their /dev on-disk is irrelevant.

so building a new /dev at startup works fine in a container. good to know.