24

I have noticed the following option in the kernel: CONFIG_DEVTMPFS

Device Drivers -> Generic Driver Options -> Maintain devtmpfs to mount at /dev

And I see that it is enabled by default in the Debian distribution kernel 3.2.0-4-amd64

I am trying to understand what difference this option brings. Without this option, /dev is mounted as tmpfs , with this option, it is mounted as devtmpfs. Other than that, I don't see any difference.

The help did not clarify it for me either:

This creates a tmpfs/ramfs filesystem instance early at bootup. In this filesystem, the kernel driver core maintains device nodes with their default names and permissions for all registered devices with an assigned major/minor number.

It provides a fully functional /dev directory, where usually udev runs on top, managing permissions and adding meaningful symlinks.

In very limited environments, it may provide a sufficient functional /dev without any further help. It also allows simple rescue systems, and reliably handles dynamic major/minor numbers.

Could somebody please explain the difference between using CONFIG_DEVTMPFS vs the standard /dev?

25

devtmpfs is a file system with automated device nodes populated by the kernel. This means you don't have to have udev running nor to create a static /dev layout with additional, unneeded and not present device nodes. Instead the kernel populates the appropriate information based on the known devices.

On the other hand the standard /dev handling requires either udev, an additional daemon running or to statically create device nodes on /dev.

  • 1
    Does it really mean, I don't need udev? The help says It provides a fully functional /dev directory, where usually udev runs on top, managing permissions and adding meaningful symlinks. If kernel populates /dev, what is there left to do for udev ? – user1968963 Jun 2 '13 at 9:23
  • 2
    In most circumstances you need udev. Directly from your quote, udev handles managing permissions and adding meaningful symlinks as well as running external scripts, notifying desktop environments etc. – Ulrich Dangel Jun 2 '13 at 9:30
  • So does that mean it's better to use devtmpfs instead of tmpfs for /dev? – CMCDragonkai Jun 5 '14 at 9:11
  • @CMCDragonkai yes, but your distribution should take care of that anyway – Ulrich Dangel Jun 18 '14 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.