Question 35 of 511
Linux Kernel and System StartupeasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is `update-grub`. This command is the correct choice because it serves as a wrapper for `grub-mkconfig -o /boot/grub/grub.cfg`, automatically scanning all installed kernels and regenerating the GRUB configuration file to set the newest kernel as the default boot entry. On the Linux Professional Institute Certification Level 2 LPIC-2 exam, this question tests your understanding of boot process management and the distinction between installing a kernel and making it active; a common trap is confusing `update-grub` with `grub-install`, which only writes the bootloader to the disk without updating the kernel list. Remember that `update-grub` is the Debian/Ubuntu-specific shortcut, while the underlying `grub-mkconfig` works across all distributions—a key distinction for the exam. A helpful memory tip: think of "update" as updating the menu, not the bootloader itself, so when you install a new kernel, always run `update-grub` to refresh the boot order.

LPIC-2 Linux Kernel and System Startup Practice Question

This LPIC-2 practice question tests your understanding of linux kernel and system startup. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

After installing a new kernel, the system administrator notices that the system boots to the old kernel by default. Which command should be used to update the GRUB configuration to boot the new kernel?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "which command"

    Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

Question 1easymultiple choice
Full question →

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 (which is a wrapper for `grub-mkconfig -o /boot/grub/grub.cfg`) scans the installed kernels and regenerates the GRUB configuration file, automatically setting the newest kernel as the default boot entry. This ensures the system boots the newly installed kernel on the next reboot.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • grub-install

    Why it's wrong here

    grub-install installs GRUB to disk, not update configuration.

  • mkinitrd

    Why it's wrong here

    mkinitrd rebuilds initramfs, not GRUB configuration.

  • grub-set-default

    Why it's wrong here

    grub-set-default sets the default entry but does not update the kernel list.

  • update-grub

    Why this is correct

    update-grub regenerates the GRUB configuration file.

    Clue confirmation

    The clue word "which command" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse `grub-install` (which installs the bootloader) with updating the boot menu, or think `grub-set-default` can automatically detect and set the new kernel as default without regenerating the configuration.

Detailed technical explanation

How to think about this question

Under the hood, `update-grub` executes `grub-mkconfig`, which reads scripts in `/etc/grub.d/` (e.g., `10_linux`) to detect installed kernels in `/boot/` and generates the `grub.cfg` file. The default boot entry is determined by the `GRUB_DEFAULT` variable in `/etc/default/grub`, which can be set to `saved` to use the last booted kernel, but by default points to the first menu entry (usually the highest versioned kernel). In real-world scenarios, if the new kernel fails to boot, administrators can manually select the old kernel from the GRUB menu at boot time.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the LPIC-2 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LPIC-2 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LPIC-2 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LPIC-2 question test?

Linux Kernel and System Startup — This question tests Linux Kernel and System Startup — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: update-grub — The `update-grub` command (which is a wrapper for `grub-mkconfig -o /boot/grub/grub.cfg`) scans the installed kernels and regenerates the GRUB configuration file, automatically setting the newest kernel as the default boot entry. This ensures the system boots the newly installed kernel on the next reboot.

What should I do if I get this LPIC-2 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. 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 LPIC-2

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 system administrator wants to change the default kernel boot parameters temporarily to debug a boot issue. Which step should be taken at the GRUB menu to modify kernel parameters for the next boot only?

medium
  • A.Select the kernel entry and press 'e' to edit the boot parameters.
  • B.Edit /etc/default/grub and run update-grub to apply changes.
  • C.Press 'c' to enter the command line and modify parameters.
  • D.Press 'Esc' to access the advanced options menu.

Why A: Option A is correct because pressing 'e' at the GRUB menu allows you to edit the boot parameters for the selected kernel entry temporarily. This modifies the kernel command line only for the current boot, without persisting changes to disk. After editing, pressing Ctrl+X or F10 boots the system with the modified parameters, making it ideal for debugging boot issues.

Variation 2. You are a systems administrator for a company that runs a critical web server on a Linux system. The server has been running stably for months, but after a recent kernel update from version 5.10.0-8 to 5.10.0-9, the server fails to boot. The boot process starts, but after the kernel loads, the system hangs with no output on the console. You have physical access to the server and can interrupt the boot process. The server uses GRUB 2 as the bootloader and the root filesystem is on an LVM logical volume. The previous kernel (5.10.0-8) is still present in /boot. Which of the following is the best course of action to restore the server to a working state?

hard
  • A.Interrupt the boot process at GRUB, select the advanced options, and boot the old kernel 5.10.0-8.
  • B.Reinstall GRUB from a live CD to fix the bootloader configuration.
  • C.Boot from a live CD, chroot into the system, and reinstall the new kernel package.
  • D.Boot from a live CD, chroot into the system, and rebuild the initrd for the new kernel.

Why A: The server fails to boot after a kernel update, but the previous kernel is still present in /boot. By interrupting GRUB 2 at boot, selecting 'Advanced options for Ubuntu' (or similar), and booting the old kernel 5.10.0-8, you bypass the problematic new kernel without modifying the bootloader or filesystem. This is the fastest, least invasive recovery method because GRUB 2 automatically detects and lists all installed kernels in /boot, including the previous one.

Keep practising

More LPIC-2 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.