Courseiva
Linux Kernel and System StartupeasyMultiple ChoiceObjective-mapped

LPIC-2 Linux Kernel and System Startup Practice Question

After creating a new partition table on /dev/sda, what command should be run to install GRUB2 to the Master Boot Record?

⚠ Common exam trap

A common mix-up: candidates confuse installing GRUB to a partition (e.g., /dev/sda1) with installing it to the MBR of the whole disk (/dev/sda), because they think the bootloader should reside on the root filesystem partition, but the MBR is a disk-level structure, not a partition-level one.

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

grub-install /dev/sda

After creating a new partition table on /dev/sda, the Master Boot Record (MBR) resides on the disk device itself, not on a partition. The `grub-install /dev/sda` command installs GRUB2's boot code into the MBR (first 440 bytes) and embeds the core image in the post-MBR gap. This makes the disk bootable by the BIOS.

Answer analysis

Option-by-option breakdown

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

  • grub-mkconfig -o /boot/grub/grub.cfg

    Why it's wrong here

    This regenerates the configuration file, not installing the boot loader.

  • update-grub

    Why it's wrong here

    Similar to grub-mkconfig, it does not install the boot loader to disk.

  • grub-install /dev/sda1

    Why it's wrong here

    Installing to a partition would use the partition's boot sector, not the MBR; the correct target for MBR is the whole disk.

  • grub-install /dev/sda

    Why this is correct

    This installs GRUB to the MBR of /dev/sda.

About these practice questions

Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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-2 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-2 exam.