LPIC-2 Linux Kernel and System Startup Practice Question
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?
⚠ Common exam trap
Many exam-takers 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.
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.
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.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 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 →
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: 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.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.