-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux grub mkconfig Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to grub-mkconfig on Linux, covering Arch Linux, CachyOS, and other distributions including GRUB configuration generation, boot menu creation, and GRUB setup.
- Understanding grub-mkconfig
- grub-mkconfig Basics
- Generating Configuration
- GRUB Configuration
- Troubleshooting
grub-mkconfig generates GRUB configuration.
Uses:
- Generate config: Create GRUB configuration
- Boot menu: Generate boot menu
- Kernel detection: Detect installed kernels
- GRUB setup: Set up GRUB bootloader
Why it matters:
- Boot configuration: Configure boot menu
- Kernel updates: Update after kernel install
- GRUB management: Manage GRUB bootloader
Basic usage:
# Generate GRUB configuration
sudo grub-mkconfig -o /boot/grub/grub.cfg
# -o = output (config file)Test generation:
# Preview (no write)
sudo grub-mkconfig
# Shows config without writingDefault output:
# Standard location
sudo grub-mkconfig -o /boot/grub/grub.cfg
# For BIOS systems
sudo grub-mkconfig -o /boot/grub/grub.cfg
# For UEFI systems
sudo grub-mkconfig -o /boot/EFI/grub/grub.cfgUpdate after kernel:
# After installing new kernel
sudo grub-mkconfig -o /boot/grub/grub.cfg
# Updates boot menuEdit config:
# Main config template
sudo vim /etc/default/grub
# Scripts in /etc/grub.d/Add entries:
# Custom entries in
sudo vim /etc/grub.d/40_custom
# Add custom boot entriesCheck installation:
# Check grub
which grub-mkconfig
# Install if missing
sudo pacman -S grubThis guide covered grub-mkconfig usage, GRUB configuration generation, and boot menu creation for Arch Linux, CachyOS, and other distributions.
- Bootloader Configuration - Bootloader guide
- GRUB Guide - GRUB setup
-
grub-mkconfig Documentation:
man grub-mkconfig
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.