I'm currently independently researching device files as a part of learning more about the Linux system in depth. My current goal is to bootstrap Debian Linux through
cdebootstrap. I followed the guide located at https://www.debian.org/releases/stable/i386/apds03.html. However, there is something that confused me. When I was googling how other guides, they just said to bind the dev tree from the current operating system. I'm doing a from scratch install, to learn more about the base system. The guide stasted there's 3 different ways of going about this:
- install the makedev package, and create a default set of static device files using (after chrooting) # apt-get install makedev # mount none /proc -t proc # cd /dev # MAKEDEV generic - manually create only specific device files using MAKEDEV - bind mount /dev from your host system on top of /dev in the target system; note that the postinst scripts of some packages may try to create device files, so this option should only be used with care
If I'm manually creating the devices, rather than binding my tree because of the post install scripts, My question is what is the common practice for using makedev? Would generic or std be better? If not, is there another list of device files that should be used? I also noticed when using
MAKEDEV generic, there are a lot more device files listed in the chroot than when booted into the actual OS.
Also, what is the difference between static and dynamic device files? This also raised my interest.
Third, if I were to decide to manually create my own devices as mentioned in the 2nd option, what would be the base list of required devices needed?
EDIT: I've concluded using makedev would be my best bet, I've received some strange behavior from cloning my tree including some unwanted files. Question can be closed.