220-1102 Question 245
Single answerfsckA Linux workstation was powered off during a file copy. On the next boot, the system drops to a maintenance shell and displays a message that the /home partition needs manual filesystem repair. The partition is ext4 and is currently not mounted. Which command should the technician use to safely check and repair that partition?
- A
fsck /dev/sdb1
- B
fsck /home
- C
fsck -r /home
- D
mount /dev/sdb1 /home && fsck /dev/sdb1
Show answer and explanation
Correct answer: A
Explanation
The correct response is to run fsck against the unmounted partition device, such as /dev/sdb1. In real-world Linux troubleshooting, unexpected shutdowns can leave ext4 and other filesystems in an inconsistent state. Standard practice is to boot into maintenance or recovery mode, ensure the affected filesystem is not mounted, and then run fsck on the device. This aligns with common Linux administration guidance and the fsck manual, which warns against checking mounted filesystems. For A+ Core 2, candidates should recognize both the purpose of fsck and the importance of using it safely on the correct target.
- A. Correct.
Correct. Running fsck against the device representing the unmounted ext4 partition is the proper approach. fsck is used to check and repair Linux filesystems, and best practice is to run it on an unmounted filesystem or from maintenance/recovery mode to avoid further corruption. Using the block device such as /dev/sdb1 is the standard method.
- B. Incorrect.
Incorrect. /home is a mount point, not the preferred filesystem device argument in this scenario. While some systems may resolve a mount point, A+ exam objectives and Linux administration best practice focus on identifying and checking the actual filesystem device, especially in recovery situations.
- C. Incorrect.
Incorrect. This option uses the wrong target and an outdated or misleading approach. The key issue is that /home is a mount point rather than the actual partition device. In addition, technicians should focus on checking the specific unmounted filesystem device directly instead of relying on this syntax.
- D. Incorrect.
Incorrect. Mounting the partition first and then running fsck is not safe. fsck should generally not be run on a mounted filesystem because active changes can interfere with repairs and may cause additional corruption or inconsistent results.