mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: After a power failure, a Linux server boots into…
After a power failure, a Linux server boots into emergency mode. The system logs indicate an unclean filesystem on /dev/sda2. Which command should the administrator run to repair the filesystem?
⚠ Common exam trap
Watch out — candidates often confuse filesystem repair tools (fsck vs. xfs_repair) or mistake a disk surface scan (badblocks) for a filesystem consistency check, leading them to choose an inappropriate command for the specific filesystem type.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
fsck -f /dev/sda2
After a power failure, the system logs indicate an unclean filesystem on /dev/sda2, meaning the filesystem was not properly unmounted and may contain inconsistencies. The `fsck -f /dev/sda2` command forces a filesystem check even if the filesystem appears clean, which is necessary to repair corruption on ext2/ext3/ext4 filesystems. This is the standard tool for checking and repairing such filesystems after an unclean shutdown.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
fsck -f /dev/sda2
Why this is correct
Correct: Forces filesystem check and repair.
- ✗
badblocks /dev/sda2
Why it's wrong here
Checks for bad blocks but does not repair filesystem.
- ✗
xfs_repair /dev/sda2
Why it's wrong here
Used for XFS filesystems, not the common ext4.
- ✗
mount -o remount,ro /
Why it's wrong here
Remounts read-only, does not repair filesystem.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
Key term
ext4
ext4 is the default file system for many Linux distributions, designed to store and manage files on a hard drive or SSD with journaling, large volume support, and backward compatibility.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.