34

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?

1 Answer 1

34

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.

4
  • 2
    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 ? Jun 2, 2013 at 9:23
  • 4
    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. Jun 2, 2013 at 9:30
  • So does that mean it's better to use devtmpfs instead of tmpfs for /dev? Jun 5, 2014 at 9:11
  • 1
    @CMCDragonkai yes, but your distribution should take care of that anyway Jun 18, 2014 at 12:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .