LX0-103 · Question #86
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)
The correct answer is B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/. D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.. udev manages /dev/ as a dynamic in-memory filesystem and supports custom rules in /etc/udev/rules.d/, creating device nodes only for hardware that is actually present.
Question
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)
Options
- AEntries for all possible devices get created on boot even if those devices are not connected.
- BAdditional rules for udev can be created by adding them to /etc/udev/rules.d/.
- CWhen using udev, it is not possible to create block or character devices in /dev/ using mknod.
- DThe /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
- EThe content of /dev/ is stored in /etc/udev/dev and is restored during system startup.
How the community answered
(30 responses)- A7% (2)
- B73% (22)
- C3% (1)
- E17% (5)
Why each option
udev manages /dev/ as a dynamic in-memory filesystem and supports custom rules in /etc/udev/rules.d/, creating device nodes only for hardware that is actually present.
udev populates /dev/ dynamically and only creates entries for devices that are actually detected or hotplugged, not for every theoretically possible device.
udev reads rule files from /lib/udev/rules.d/ and /etc/udev/rules.d/; files placed in /etc/udev/rules.d/ take precedence and allow administrators to customize device naming, permissions, and event handling.
mknod can still be used to create block or character device files in /dev/ even when udev is managing the directory; udev does not prevent this.
udev mounts /dev/ as a devtmpfs (a type of tmpfs) early in the boot process, giving it a writable, in-memory directory that is repopulated from scratch on every boot based on detected hardware.
/dev/ is not stored in /etc/udev/dev; it is a runtime tmpfs that is rebuilt each boot from udev rules and kernel uevent messages.
Concept tested: udev dynamic device management and rules configuration
Source: https://www.freedesktop.org/software/systemd/man/udev_rules.html
Topics
Community Discussion
No community discussion yet for this question.