Courseiva
Operating Systems →easyMultiple Choice

220-1102 Operating Systems Practice Question

A technician configured a dual-boot system with Windows 10 and Ubuntu Linux. After the installation, the computer boots directly into Windows without showing the GRUB menu. The technician boots from a Linux live USB and opens a terminal. Which command should the technician use to regenerate the GRUB configuration and detect the Windows boot loader?

⚠ Common exam trap

A common mix-up: candidates confuse `grub-install` (which writes the bootloader code to disk) with `update-grub` (which rebuilds the menu entries), leading them to choose the command that installs the bootloader but fails to detect the Windows boot loader.

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

✓

sudo update-grub

The command `sudo update-grub` (or `grub-mkconfig -o /boot/grub/grub.cfg` on some distributions) scans the system for installed operating systems and regenerates the GRUB configuration file. This will detect the Windows Boot Manager on the EFI System Partition (ESP) or in the Master Boot Record (MBR) and add a menu entry for it, restoring 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.

  • ✓

    sudo update-grub

    Why this is correct

    sudo update-grub is the correct command because it regenerates the GRUB 2 configuration file (typically /boot/grub/grub.cfg) by scanning installed operating systems and adding entries for them. On a dual-boot system with Windows 10, it runs os-prober, detects the Windows boot manager, and creates a menu entry, making Windows bootable from the GRUB menu. This command is the standard way to apply changes after adding or removing an OS, and it is the only option here that actually updates the boot menu entries.

  • ✗

    sudo grub-install /dev/sda

    Why it's wrong here

    sudo grub-install /dev/sda installs the GRUB boot loader itself into the Master Boot Record (MBR) of the first disk or to the EFI System Partition on UEFI systems. While this is necessary for making the drive bootable, it does not scan or add entries for other operating systems, so it only writes the bootloader code without updating the menu configuration. Running this alone after configuring dual boot would leave the GRUB menu without a Windows entry, so it is not the correct command for detecting and adding Windows 10 to the boot menu.

  • ✗

    sudo fdisk -l

    Why it's wrong here

    sudo fdisk -l is a disk partition listing utility that displays the partition tables of block devices, such as /dev/sda, showing sizes, types, and starting sectors. It is purely a diagnostic tool and does not modify or interact with the GRUB bootloader configuration. Because it only reads partition information and never touches /boot/grub/grub.cfg or triggers os-prober, it cannot add Windows 10 to the GRUB menu, making it ineffective for this task.

  • ✗

    sudo lsblk

    Why it's wrong here

    sudo lsblk lists information about all available block devices, including their mount points and hierarchy, in a tree-like format. Similar to fdisk, it is a read-only utility that provides an overview of storage topology but has no capability to alter GRUB settings or regenerate boot menu entries. It cannot detect or register Windows 10 as a boot option, so it is not a valid method for updating the GRUB configuration in a dual-boot setup.

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

Same concept, more angles

1 more way this is tested on 220-1102

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. 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?

hard
  • ✓ A.update-grub
  • B.grub-install /dev/sda
  • C.grub-mkdevicemap
  • D.grub-set-default 0

Why A: 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.

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.