OLE study materials
OLE study resources

OLE: Kernel and Boot Management: GRUB 2, Kernel Modules, and Boot Troubleshooting

OLE · Work through your exam, one topic at a time.

All guide sections

Kernel and Boot Management: GRUB 2, Kernel Modules, and Boot Troubleshooting

This domain covers the boot chain on Oracle Linux: GRUB 2 configuration and how to change it persistently, kernel module loading, UEK versus RHCK kernels, and recovering a system that will not boot.

GRUB 2

  • BIOS systems read /boot/grub2/grub.cfg; UEFI systems read /boot/efi/EFI/oracle/grub.cfg. Never edit grub.cfg directly - regenerate it with grub2-mkconfig -o /boot/grub2/grub.cfg.
  • Persistent kernel arguments live in /etc/default/grub as GRUB_CMDLINE_LINUX.
  • grubby is the safer interface: grubby --default-kernel, grubby --info=ALL, grubby --update-kernel=ALL --args="transparent_hugepage=never", grubby --update-kernel=ALL --remove-args="...".
  • GRUB_DEFAULT=saved plus grub2-set-default 0 and grub2-editenv list control the default entry.

Kernel modules

  • lsmod, modinfo <mod>, modprobe <mod>, modprobe -r, depmod -a.
  • Persistent load at boot: a file in /etc/modules-load.d/; options and blacklists in /etc/modprobe.d/*.conf (blacklist floppy, options ...).
  • Rebuild the initramfs with dracut -f after storage or driver changes.

Boot troubleshooting

  • Boot the entry, press e, and add rd.break for an initramfs shell; or init=/bin/bash. Add systemctl.unit=emergency.target for the emergency target.
  • Classic root password recovery: at rd.break, mount -o remount,rw /sysroot, chroot /sysroot, passwd root, touch /.autorelabel, exit twice.

Worked example

A database host must disable transparent huge pages permanently. Run grubby --update-kernel=ALL --args="transparent_hugepage=never", reboot, and verify with cat /proc/cmdline. Reasoning: grubby rewrites the BLS/GRUB entries for all installed kernels, so a later kernel update does not lose the setting, unlike a one-off edit at the boot menu.

Traps

  • Editing /boot/grub2/grub.cfg is lost at the next kernel update or grub2-mkconfig.
  • Editing /etc/default/grub without re-running grub2-mkconfig changes nothing.
  • After changing the root password via chroot, skipping touch /.autorelabel causes SELinux login failures.
  • grub2-set-default only works when GRUB_DEFAULT=saved.