CompTIA Linux+ (XK0-006)TroubleshootingMedium
After replacing a failed hard drive, an administrator edits /etc/fstab with what they believe is the new drive's UUID and reboots. The system drops into an emergency shell with the message: "Failed to mount /data - Dependency failed for Local File Systems." Which command should the administrator run to find the correct UUID for the new drive?
- Ablkid
- Bmount -a
- Cfdisk -l /dev/sda
- Dsystemctl list-units --failed
Show answer & explanationAnswer & explanation
Correct answer: A. blkid
blkid lists block devices along with their UUID, filesystem type, and label, allowing the administrator to obtain the correct UUID to place in /etc/fstab. Using the wrong UUID causes systemd to fail the corresponding mount unit and drop to emergency mode.
Why the other options are wrong
- B. mount -a would just re-attempt mounting with the same incorrect UUID and fail again.
- C. fdisk -l shows partition tables and sizes but not filesystem UUIDs.
- D. systemctl list-units --failed shows failed units but not the UUID needed to fix the entry.
UUID Mismatch Boot Failure
An incorrect or stale UUID in /etc/fstab causes systemd to fail mounting that filesystem, halting the boot process into emergency mode.
- blkid lists device UUIDs and filesystem types
- Fix fstab entry, then run systemctl daemon-reload and mount -a
- Emergency shell message references 'Dependency failed for Local File Systems'
Memory trick: Blkid before you fstab it, or the boot will grab it (emergency shell).