Grub Configuration Guide
This document describes how to configure the GRUB boot loader for LadinOS kernel.
Overview
GRUB (Grand Unified Bootloader) is the default boot loader for LadinOS. It manages the boot process and allows selecting between multiple kernel versions or operating systems.
Key features for LadinOS:
- Automatic detection of installed kernels
- Support for custom boot parameters
- Recovery mode options
Configuration Files
GRUB configuration in LadinOS is managed through the following files:
/boot/grub/grub.cfg
- Main configuration file (auto-generated, do not edit directly)/etc/default/grub
- Global settings (edit this file for customizations)/etc/grub.d/
- Scripts used to generate grub.cfg (advanced customization)
Custom Menu Entries
To add custom menu entries, create a new script in /etc/grub.d/
(e.g., 40_custom
):
Make the script executable:
Kernel Parameters
Common kernel parameters for LadinOS:
ro
- Mount root filesystem as read-only initiallyrw
- Mount root filesystem as read-writequiet
- Suppress most boot messagesdebug
- Enable kernel debugging outputinit=/bin/systemd
- Specify init system
To set permanent parameters, edit /etc/default/grub
:
Updating Grub
After making changes to configuration files, regenerate grub.cfg
:
This command runs all scripts in /etc/grub.d/
and updates /boot/grub/grub.cfg
.
Troubleshooting
Common issues and solutions:
- Grub menu not appearing: Check
GRUB_TIMEOUT
in/etc/default/grub
(set to 5 for 5-second delay) - Kernel panic on boot: Try adding
nomodeset
to kernel parameters - Changes not taking effect: Ensure you ran
update-grub
after editing files