nerdexam
CompTIA

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.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

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)
  • A
    7% (2)
  • B
    73% (22)
  • C
    3% (1)
  • E
    17% (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.

AEntries for all possible devices get created on boot even if those devices are not connected.

udev populates /dev/ dynamically and only creates entries for devices that are actually detected or hotplugged, not for every theoretically possible device.

BAdditional rules for udev can be created by adding them to /etc/udev/rules.d/.Correct

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.

CWhen using udev, it is not possible to create block or character devices in /dev/ using mknod.

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.

DThe /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.Correct

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.

EThe content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

/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

#udev#device management#/dev directory#tmpfs

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice