Courseiva
Devices, Filesystems and FHSmediumMultiple ChoiceObjective-mapped

LPIC-1 Devices, Filesystems and FHS Practice Question

A Linux administrator is troubleshooting a server that fails to boot with the error 'Give root password for maintenance (or press Control-D to continue)'. The root filesystem is on /dev/sda2, formatted as ext4. The administrator suspects a filesystem inconsistency. The server is in a remote data center and the administrator has console access via IPMI. Which of the following is the safest procedure to repair the filesystem?

⚠ Common exam trap

A common mix-up: candidates choose 'fsck -y' or '-a' thinking they are the safest automated options, but they fail to recognize that these options can automatically apply destructive repairs (like truncating corrupt files) without administrator review, whereas the correct procedure ensures the filesystem is read-only and forces a check with the '-f' flag.

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

At the maintenance prompt, run 'mount -o remount,ro /dev/sda2 /' then 'fsck -f /dev/sda2' and then 'reboot'.

It first remounts the root filesystem as read-only to prevent any writes during the repair, which is essential for a consistent fsck run on an ext4 filesystem. Then it uses 'fsck -f' to force a check even if the filesystem appears clean, followed by a reboot to exit maintenance mode. This is the safest procedure as it avoids the risk of the filesystem being mounted read-write during repair, which could cause further corruption.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • At the maintenance prompt, run 'mount -o remount,ro /dev/sda2 /' then 'fsck -f /dev/sda2' and then 'reboot'.

    Why this is correct

    Correct: remount read-only, then fsck, then reboot.

  • At the maintenance prompt, run 'fsck /dev/sda2' and answer yes to all prompts.

    Why it's wrong here

    Filesystem is mounted; running fsck on a mounted rw filesystem can cause corruption.

  • At the maintenance prompt, run 'fsck -y /dev/sda2' to force repair.

    Why it's wrong here

    Filesystem is still mounted rw.

  • At the maintenance prompt, run 'fsck -a /dev/sda2' to automatically repair.

    Why it's wrong here

    Same issue: filesystem is mounted.

About these practice questions

This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.