Courseiva
Operating Systems →hardMultiple Choice

220-1102 Operating Systems Practice Question

A technician is configuring a dual-boot system with Windows 10 and Linux. After installing Linux, Windows no longer appears in the boot menu. The technician boots from a Linux live USB. Which command should the technician use to update the GRUB bootloader to include Windows?

⚠ Common exam trap

Many exam-takers confuse installing GRUB to the disk (`grub-install`) with updating its configuration to detect other OSes, leading them to choose option B when the actual fix is to regenerate the menu with `update-grub`.

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

✓

update-grub

The `update-grub` command (or `grub-mkconfig -o /boot/grub/grub.cfg` on some distributions) automatically scans all installed operating systems and regenerates the GRUB configuration file to include Windows. This is the standard method after installing Linux alongside Windows to restore the dual-boot menu.

Answer analysis

Option-by-option breakdown

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

  • ✓

    update-grub

    Why this is correct

    Running update-grub is the standard way to regenerate the GRUB configuration file (/boot/grub/grub.cfg) after changing the system's boot environment. It invokes os-prober to detect other installed operating systems such as Windows 10 and creates menu entries for them. This command ensures the dual-boot menu reflects all available OSes, making it the correct choice here.

  • ✗

    grub-install /dev/sda

    Why it's wrong here

    While grub-install /dev/sda is necessary to write the GRUB boot code into the Master Boot Record or EFI system partition, it does not detect or add other operating systems to the boot menu. This command installs the bootloader itself but leaves the menu configuration untouched, so it would not make Windows 10 appear as a choice. It is appropriate only for initial installation or repairing a missing/invalid bootloader.

  • ✗

    grub-mkdevicemap

    Why it's wrong here

    grub-mkdevicemap rebuilds the device.map file that translates GRUB device names like (hd0) into actual hardware devices such as /dev/sda. This is a low-level utility that helps GRUB identify disk order but has no role in scanning for installed operating systems or generating menu entries. Running it would not add Windows to the boot list, so it is not the correct command.

  • ✗

    grub-set-default 0

    Why it's wrong here

    The grub-set-default 0 command merely sets which existing boot entry is selected by default on the next boot, with the number referring to a position in the menu. It does not scan for operating systems nor modify the contents of the GRUB menu. If Windows is not already listed, this command cannot add it, making it ineffective for configuring a dual-boot system.

About these practice questions

Courseiva writes every 220-1102 question from scratch — 925 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 220-1102 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 220-1102 exam.