Appearance
GRUB Bootloader Guide
Enable GRUB Menu
If the GRUB menu is not showing during boot (common on single-OS systems):
Method 1: Show Menu Permanently
Edit GRUB configuration:
bashsudo nano /etc/default/grub
Modify these settings:
bashGRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=10
Update GRUB configuration:
bashsudo update-grub
Method 2: Show Menu Temporarily
Hold Shift
(BIOS) or Esc
(UEFI) during boot to access the GRUB menu.
Restore GRUB After Windows Installation
Windows installation often overwrites the bootloader. Here's how to restore GRUB:
For Manjaro/Arch-based Systems
Boot into Manjaro live environment
Open terminal and access your system via chroot:
bashsudo manjaro-chroot -a
Install GRUB to the main drive:
bashgrub-install /dev/sda
Note: Replace
/dev/sda
with your actual boot drive (check withlsblk
)Verify installation:
bashgrub-install --recheck /dev/sda
Update GRUB configuration:
bashupdate-grub
Exit chroot and reboot:
bashexit reboot
GRUB Configuration
The main GRUB configuration file is /etc/default/grub
. Here are common settings:
Key Configuration Options
bash
# Timeout before default boot (seconds)
GRUB_TIMEOUT=10
# Default boot entry (0 = first entry)
GRUB_DEFAULT=0
# Boot menu display style
GRUB_TIMEOUT_STYLE=menu # or 'hidden'
# Remember last selected entry
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
# Disable OS prober (faster boot, manual entries only)
GRUB_DISABLE_OS_PROBER=false
After making changes, always update GRUB:
bash
sudo update-grub
Troubleshooting
Common GRUB Issues and Solutions
1. GRUB Rescue Mode
If you see grub rescue>
prompt:
bash
# List available partitions
ls
# Find your Linux partition (look for ext4)
ls (hd0,gpt2)/
# Set root and boot
set root=(hd0,gpt2)
set prefix=(hd0,gpt2)/boot/grub
insmod normal
normal
2. Fix Corrupted GRUB Configuration
bash
# Regenerate GRUB configuration
sudo grub-mkconfig -o /boot/grub/grub.cfg
# Or use update-grub (Ubuntu/Debian)
sudo update-grub
3. Check Boot Drive
bash
# List block devices
lsblk
# Check EFI partition (UEFI systems)
sudo efibootmgr -v
# Mount EFI partition
sudo mount /dev/sda1 /boot/efi
4. GRUB Not Detecting Windows
bash
# Install os-prober
sudo apt install os-prober
# Enable OS detection
sudo nano /etc/default/grub
# Set: GRUB_DISABLE_OS_PROBER=false
# Update GRUB
sudo update-grub
Useful GRUB Commands
bash
# Install GRUB to specific device
sudo grub-install /dev/sda
# Install GRUB for UEFI
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi
# Generate configuration file
sudo grub-mkconfig -o /boot/grub/grub.cfg
# List GRUB modules
ls /usr/lib/grub/x86_64-pc/
# Check GRUB version
grub-install --version