Courseiva
hardMultiple SelectObjective-mapped

Boot Previous Kernel — GRUB Advanced Options

A Linux system is experiencing kernel panics after a recent update. The administrator wants to boot into a previous kernel version to restore functionality. Which three steps are required to achieve this? (Select THREE).

Quick Answer

The answer is to select the old kernel from the 'Advanced options for Ubuntu' submenu within GRUB. This is correct because when a kernel update causes a panic, the GRUB bootloader retains the previous kernel image in its menu, allowing you to bypass the faulty version and boot into a stable environment. On the CompTIA Linux+ XK0-005 exam, this scenario tests your ability to recover from a failed update by navigating GRUB’s advanced options, a common troubleshooting step that traps candidates who forget to make the fix persistent. After booting the old kernel, you must edit /etc/default/grub to set GRUB_DEFAULT to 'saved' and run update-grub, ensuring the system defaults to the last working kernel on subsequent reboots. Remember the mnemonic "Select, Save, Update" — select the old kernel, save the default, and update GRUB configuration.

⚠ Common exam trap

CompTIA often tests the distinction between temporary boot fixes (editing GRUB entries at boot time) and permanent configuration changes (editing /etc/default/grub and running update-grub), and candidates may mistakenly think that reinstalling the kernel package reverts to a previous version.

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

After booting, edit /etc/default/grub and set GRUB_DEFAULT to the saved entry, then run update-grub

After booting into a working kernel, editing /etc/default/grub to set GRUB_DEFAULT to 'saved' and running update-grub (or grub-mkconfig) ensures that the GRUB bootloader will remember and default to the last successfully booted kernel, which can be the previous version. This step is necessary to make the temporary fix persistent across reboots.

Answer analysis

Option-by-option breakdown

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

  • After booting, edit /etc/default/grub and set GRUB_DEFAULT to the saved entry, then run update-grub

    Why this is correct

    Makes the old kernel the default for future boots.

  • At the GRUB menu, press 'e' to edit the boot entry

    Why this is correct

    Needed to see kernel options.

  • Run 'yum reinstall kernel' to revert to the previous version

    Why it's wrong here

    Reinstalling may not restore the old kernel configuration.

  • Edit /etc/fstab to change root filesystem parameters

    Why it's wrong here

    Unrelated to kernel selection.

  • Select the old kernel from the 'Advanced options for Ubuntu' submenu

    Why this is correct

    Allows booting the previous kernel.

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

Same concept, more angles

2 more ways this is tested on XK0-006

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 Linux server with systemd is experiencing boot issues after a recent kernel update. Which command sequence should be used to boot into the previous kernel version?

medium
  • A.Boot from a live CD and run 'rpm -Uvh --oldkernel' to revert the kernel.
  • B.Interrupt the boot process, select 'Advanced options' in GRUB, then choose the previous kernel.
  • C.Use 'systemctl set-default multi-user.target' and reboot.
  • D.Use 'grub2-set-default' with the previous kernel entry before rebooting.

Why B: GRUB (Grand Unified Bootloader) stores multiple kernel versions in its menu. By interrupting the boot process and selecting 'Advanced options for Ubuntu' (or similar), you can choose the previous kernel entry, which loads the older kernel and its associated initramfs. This is the standard method to recover from a failed kernel update on systems using systemd and GRUB.

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

hard
  • A./etc/grub.d/40_custom
  • B./boot/grub/grub.conf
  • C./boot/grub2/grub.cfg
  • D./etc/default/grub

Why D: /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.

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.