1

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.

  • I don't think it should be closed. I'm working through the same issue really, looking at how an initial bootstrap could be made. I'm using a MYIR Z-Turn board which has the same problem: You need to make a bootstrap to get a real device tree, but to do that you need the memory maps for the devices and header files for the devices. But then what's the process if you knew that? – MrMowgli Apr 16 '16 at 6:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.