Courseiva
Operating Systems →mediumMultiple Choice

220-1102 Operating Systems Practice Question

A technician installed Ubuntu Linux on a Windows 10 Pro computer configured for dual-boot. After installation, the computer boots directly into Windows without displaying the GRUB menu. The technician boots from a Linux live USB and opens a terminal. Which command should the technician use FIRST to reinstall GRUB for a UEFI-based system?

⚠ Common exam trap

Watch out — candidates often confuse `grub-install /dev/sda` (MBR/BIOS method) with the UEFI-specific command, or they mistakenly think `update-grub` alone can fix a missing bootloader, when in fact it only updates the menu configuration, not the bootloader installation.

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 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

The system is UEFI-based, so GRUB must be installed with the `--target=x86_64-efi` flag to target the EFI firmware, and `--efi-directory=/boot/efi` specifies the EFI System Partition (ESP) mount point. The `--bootloader-id=GRUB` sets the boot entry name in the NVRAM. This command reinstalls GRUB to the ESP, ensuring the firmware can find and boot it.

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 grub-install /dev/sda

    Why it's wrong here

    This command installs GRUB to the MBR of the first disk, which is used for legacy BIOS booting, not UEFI. On a UEFI system, the bootloader must be installed to the EFI System Partition (ESP).

  • ✗

    sudo update-grub

    Why it's wrong here

    This command regenerates the GRUB configuration file (grub.cfg) but does not install or reinstall the GRUB bootloader to the ESP. It is useful after changing kernel parameters or adding new operating systems, but it will not fix a missing bootloader.

  • ✓

    sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

    Why this is correct

    This command correctly installs GRUB to the EFI System Partition (ESP) for a 64-bit UEFI system. It creates the necessary EFI boot entry so that the firmware can load GRUB, which then displays the menu including the Windows Boot Manager option.

  • ✗

    sudo fdisk -l

    Why it's wrong here

    sudo fdisk -l only reads and displays the partition table, such as the presence and type of an EFI System Partition (ESP) on /dev/sda. It does not write any bootloader files, format the ESP, or modify the firmware's NVRAM boot entries, so a missing or corrupted GRUB remains unfixed. While it can help confirm that an ESP exists for diagnostic purposes, it is purely a listing tool and cannot restore the UEFI boot path.

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.