Courseiva
hardMultiple ChoiceObjective-mapped

XK0-006 Practice Question: After a kernel upgrade, the system fails to boot

After a kernel upgrade, the system fails to boot. Which file should be edited to configure GRUB2 to boot into the previous kernel version by default?

⚠ Common exam trap

Many candidates confuse the manually editable configuration file (/etc/default/grub) with the generated boot file (/boot/grub2/grub.cfg), leading them to incorrectly edit the latter directly.

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

/etc/default/grub

/etc/default/grub, because this file contains the GRUB2 configuration variables (such as GRUB_DEFAULT) that control which kernel is booted by default. After editing this file, you must run 'grub2-mkconfig -o /boot/grub2/grub.cfg' to regenerate the boot configuration, which sets the previous kernel as the default entry.

Answer analysis

Option-by-option breakdown

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

  • /etc/grub.d/40_custom

    Why it's wrong here

    Used for custom menu entries, not default boot selection.

  • /boot/grub/grub.conf

    Why it's wrong here

    Legacy GRUB configuration, not GRUB2.

  • /boot/grub2/grub.cfg

    Why it's wrong here

    Auto-generated; editing is not recommended as it is overwritten.

  • /etc/default/grub

    Why this is correct

    Correct configuration file for GRUB2 defaults.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 979 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 XK0-006 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 XK0-006 exam.