I have a fully custom, minimal, embedded Linux (vanilla, 3.3.8, i486, Vortex86dx) system that boots from an initramfs image. No standard distribution scripts are used, just a single rcS file that does the initialisation.I have an IDE Flash disk with two partitions at /dev/hda1 and /dev/hda2. As this is a minimal embedded distribution for a fixed system, it has a static /dev directory that contains /dev/hda1 and /dev/hda2, and there is no UDEV.At the point that init calls rcS, the /dev/hda1 entry is no longer present. No other scripts, user applications or daemons have been run at this point. /dev/hda1 appears to have been deleted by the kernel(?)I do not have this same problem if I boot my target via an NFS root filing system during my development process.I use Buildroot to create the /dev directory via the device_table_dev.txt file. e.g. # IDE Devices/dev/hda    b   640 0   0   3   0   0   0   -/dev/hda    b   640 0   0   3   1   1   1   4I inspected the rootfs.tar.gz from Buildroot output/images. The /dev directory contains /dev/hda1:brw-r-----  1 root root  3,   0 Jul  2 13:44 hdabrw-r-----  1 root root  3,   1 Jul  2 13:44 hda1brw-r-----  1 root root  3,   2 Jul  2 13:44 hda2brw-r-----  1 root root  3,   3 Jul  2 13:44 hda3brw-r-----  1 root root  3,   4 Jul  2 13:44 hda4My post-boot directory listing (done from within rcS, at the top of the script) on the target looks like this:brw-r-----   1 root   root    3,   0 Jul  2 12:44 hdabrw-r-----   1 root   root    3,   2 Jul  2 12:44 hda2brw-r-----   1 root   root    3,   3 Jul  2 12:44 hda3brw-r-----   1 root   root    3,   4 Jul  2 12:44 hda4/dev/hda1 is missing. /dev/hda2 is a partition on the same disk yet it is still there. Strange.If I run the Busybox utility mdev -s, it restores/dev/hda1 on the target and it works normally. e.g. I can mount it Has anyone ever seen this behaviour before?Does the kernel delete entries from /dev?
Does the kernel delete entries in /dev on an initramfs?
linux;linux kernel;devices;initramfs