Modifying Grub2 Runtime Parameters

Overview of GRUB2 Boot Parameters

  • GRUB2 (Grand Unified Bootloader version 2) allows customization of boot options via runtime parameters during system startup.

Accessing GRUB2 Boot Menu

  • Default Visibility: The GRUB2 boot menu is not displayed by default during booting.

  • Options to Access:

    • Pressing Escape: At the right moment at the beginning of the boot sequence.

    • This may be challenging due to timing.

    • Resetting Machine: If you reset the machine while booting, the GRUB2 boot menu will automatically appear on the next boot.

    • This method is often easier for users.

Editing Boot Options

  • Press 'e': To edit runtime boot options after accessing the GRUB2 menu.

    • Focus is placed on the line starting with "Linux" which controls how the kernel starts.

    • Allows the passing of options such as:

    • systemd.unit=emergency.target

    • systemd.unit=rescue.target

    • Further details on these options are discussed in lesson 22 on troubleshooting.

GRUB2 Command Mode

  • Using 'c': Enters GRUB2 command mode, an alternative to pressing 'e'.

    • Not recommended for beginners due to complexity.

    • Users can type help for an overview of available commands in this mode.

    • Tip: Use exit to return to the boot menu from command mode.

Practical Demonstration

  • Demonstration of attempting to access the GRUB2 boot menu:

    • Example Action: Restarting the virtual machine and trying to press Escape at the right time.

  • Successful access to GRUB2 Boot Menu led to three display options:

    • First Option: Default kernel to start.

    • Second Option: Rescue kernel with minimal options for troubleshooting driver issues.

    • Not typically needed for RHCSA (Red Hat Certified System Administrator) certification.

    • Third Option: UEFI firmware settings directing to BIOS-like interface for system properties adjustment.

Avoiding Command Mode

  • Warning against Command Mode: Users are advised against accidentally entering command mode; always choose 'e' for editing.

Analyzing the Linux Kernel Line

  • Kernel Starting Line: The line that begins with "Linux" loads the Linux kernel, which initiates the operating system.

  • Key Elements:

    • $root: Refers to the root filesystem's location where boot files are located.

    • Several parameters give information on how the system should be booted:

    • vmlinuz: The actual kernel image being loaded.

    • The root filesystem is initially mounted as read-only (RO).

    • Kernel options include rhgb (Red Hat graphical boot) and quiet (which suppresses boot messages).

Customizing Boot Options

  • Removing Boot Parameters: Users can modify the kernel line by removing rhgb and quiet to display boot messages.

  • Use of Control Keys: After modifying options, pressing Ctrl + x or F10 is necessary to proceed with the booting process.

  • Outcome: After modifications, users see detailed boot messages rather than suppressed output.

Conclusion

  • Final Loading: The GDM (GNOME Display Manager) is loaded at the end of the boot process, allowing users to log in and access the shell.