Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Lab 17.2RHCSA 10, Chapter 17

Change GRUB 2 boot options

Level
Medium
25 min
Machines
server1
Status
Not started

Goal

Make the boot messages visible, change the menu timeout, and choose the default kernel.

Before you start

  • Work on server1 as root. Take a VM snapshot first: mistakes in GRUB can stop the boot.

Tasks

  1. Show the kernel command line of the running kernel and the BLS entries in /boot.
  2. Remove the options rhgb and quiet from all kernels, so you see the boot messages.
  3. Set the GRUB menu timeout to 10 seconds.
  4. Show the default kernel. If you have more than one kernel, make the older one the default, check it, and set the newest back.
  5. Reboot. In the GRUB menu, press e and look at the linux line, then boot with Ctrl+X. Check the new command line.

Check your work

cat /proc/cmdline
grubby --info=DEFAULT | grep args
grep GRUB_TIMEOUT /etc/default/grub
grubby --default-kernel
  • /proc/cmdline has no rhgb and no quiet.
  • GRUB_TIMEOUT=10 and the menu waited 10 seconds.

Hints

Show the hints

Solution

Show the solution
  1. Look at the current state.
    cat /proc/cmdline
    ls /boot/loader/entries/
  2. Remove rhgb and quiet.
    grubby --update-kernel=ALL --remove-args="rhgb quiet"
  3. Timeout of 10 seconds.
    sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=10/' /etc/default/grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
  4. Default kernel.
    grubby --default-kernel
    grubby --info=ALL | grep ^kernel
    grubby --set-default /boot/vmlinuz-OLDER-VERSION
    grubby --set-default /boot/vmlinuz-$(uname -r)
  5. Reboot and check.
    systemctl reboot
    cat /proc/cmdline

My notes

No notes yet.

Lessons for this lab

Commands in this lab