Courseiva
System Architecture →hardMultiple Choice

LPIC-1 System Architecture Practice Question

A minimal Linux system boots using a legacy BIOS with GRUB 2 installed in the MBR of /dev/sda. The administrator wants to install a new boot loader configuration that writes the boot code to the MBR and also places core.img in the gap between the MBR and the first partition. Which command accomplishes this?

⚠ Common exam trap

The trap here is treating menu-regeneration commands like update-grub as if they install the boot loader, when only the installer targeting the whole disk writes MBR boot code and embeds core.img.

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

Installing GRUB 2 for legacy BIOS boot requires writing code to the disk's master boot record and embedding the core image in the space before the first partition. Passing the whole disk device to the installer achieves both. Configuration generators such as grub-mkconfig or its wrapper only rebuild the menu file and never modify the MBR, and targeting a partition instead of the disk writes to the wrong location.

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

    grub-mkconfig regenerates the grub.cfg menu configuration from scripts in /etc/grub.d and defaults in /etc/default/grub. It updates boot menu entries and kernel parameters but never writes boot code to a disk's MBR or embeds core.img. It is a configuration-generation step, not a boot loader installation step, so it cannot accomplish the stated goal.

  • ✗

    grub-install /dev/sda1

    Why it's wrong here

    Pointing grub-install at a partition such as /dev/sda1 installs boot code into that partition's boot sector rather than the disk MBR. On a legacy BIOS system this typically produces an unbootable configuration unless a partition boot record chain-loading scheme is deliberately used, so it does not satisfy the requirement to write boot code to the MBR.

  • ✗

    update-grub

    Why it's wrong here

    update-grub is a convenience wrapper found on Debian-derived systems that simply invokes grub-mkconfig to rebuild the menu file. Like the underlying generator, it refreshes menu entries only and does not touch the MBR or install core.img. Using it here would leave the existing boot code untouched, failing the requirement to install boot code into the disk's master boot record.

  • ✓

    grub-install /dev/sda

    Why this is correct

    On a BIOS/MBR system, running grub-install with the disk device as the target embeds the boot image in the MBR and writes core.img into the post-MBR gap, then installs modules under /boot/grub. This matches the administrator's requirement to update both the MBR boot code and the embedded core image for a legacy BIOS boot path.

About these practice questions

One of 402 original LPIC-1 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official LPI exam blueprint

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.