DEV Community

Ashen Chathuranga
Ashen Chathuranga

Posted on • Edited on

GRUB Configuration Guide for Dual Boot (Arch Linux + Windows)

This guide explains how to configure GRUB on Arch Linux for a dual-boot setup with Windows 10 or 11, ensuring that both operating systems appear in the GRUB menu.


✅ Prerequisites

  • A UEFI system with both Arch Linux and Windows installed.
  • EFI system partition (ESP) mounted at /boot/efi.
  • GRUB installed:
  sudo pacman -S grub efibootmgr
Enter fullscreen mode Exit fullscreen mode
  • Required tools:
  sudo pacman -S os-prober ntfs-3g
Enter fullscreen mode Exit fullscreen mode

⚙️ Step-by-Step Instructions

1. Edit GRUB Configuration

Edit the GRUB settings to enable OS detection and customize the menu.

sudo nano /etc/default/grub
Enter fullscreen mode Exit fullscreen mode

Recommended Settings:

GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
GRUB_DISABLE_OS_PROBER=false
GRUB_GFXMODE=auto
GRUB_GFXPAYLOAD_LINUX=keep
# Optional theme (install separately)
# GRUB_THEME="/usr/share/grub/themes/Vimix/theme.txt"
Enter fullscreen mode Exit fullscreen mode

💡 Explanation:

  • GRUB_TIMEOUT=5: Show GRUB menu for 5 seconds.
  • GRUB_TIMEOUT_STYLE=menu: Forces menu to display.
  • GRUB_DISABLE_OS_PROBER=false: Enables detection of other OSes like Windows.
  • loglevel=3: Reduces log noise during boot.
  • GFXMODE/PAYLOAD: Enables consistent graphical boot.

Save and exit the file:

  • Ctrl+O, Enter, then Ctrl+X.

2. Verify EFI Partition is Mounted

Ensure your EFI system partition is mounted at /boot/efi:

findmnt /boot/efi
Enter fullscreen mode Exit fullscreen mode

If not mounted, find the EFI partition (usually FAT32) and mount it:

sudo mount /dev/sdX1 /boot/efi
Enter fullscreen mode Exit fullscreen mode

Replace /dev/sdX1 with your actual EFI partition (check with lsblk or fdisk -l).


3. Detect Windows with os-prober

Check if os-prober detects Windows:

sudo os-prober
Enter fullscreen mode Exit fullscreen mode

You should see output like:

/dev/sdXY:Windows Boot Manager:Windows:chain
Enter fullscreen mode Exit fullscreen mode

If not:

  • Ensure the NTFS partition is accessible.
  • Check that Windows is not hibernated or BitLocker-locked.

4. Regenerate GRUB Configuration

After configuring everything, generate the GRUB config:

sudo grub-mkconfig -o /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

You should see messages like:

Found Windows Boot Manager on /dev/sdXY
Found Arch Linux on /dev/sdXZ
Enter fullscreen mode Exit fullscreen mode

5. (Optional) Reinstall GRUB

Only do this if GRUB doesn't load at boot or is corrupted.

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
sudo grub-mkconfig -o /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

6. Reboot

reboot
Enter fullscreen mode Exit fullscreen mode

You should now see the GRUB menu with options for:

  • Arch Linux
  • Windows Boot Manager
  • UEFI Firmware Settings

🛠 Troubleshooting

  • No Windows Entry in GRUB Menu:

    • Ensure GRUB_DISABLE_OS_PROBER=false is set.
    • Reinstall os-prober and ntfs-3g.
    • Run sudo os-prober manually and check output.
    • Reboot into Windows and disable Fast Startup.
  • Check Boot Mode (UEFI vs BIOS):

  [ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "BIOS mode"
Enter fullscreen mode Exit fullscreen mode
  • Backup GRUB Settings:
  sudo cp /etc/default/grub /etc/default/grub.bak
Enter fullscreen mode Exit fullscreen mode
  • Manually Edit Boot Parameters:

    • Press e at the GRUB menu to edit boot options for a session.
  • View Boot Logs:

  journalctl -b
Enter fullscreen mode Exit fullscreen mode

🎨 Optional: GRUB Theme

Install a GRUB theme for a visual boost:

yay -S grub-theme-vimix
Enter fullscreen mode Exit fullscreen mode

Then enable it in /etc/default/grub:

GRUB_THEME="/usr/share/grub/themes/Vimix/theme.txt"
Enter fullscreen mode Exit fullscreen mode

🧱 GPU Drivers (Optional)

Install appropriate GPU drivers to avoid graphical issues:

# NVIDIA
sudo pacman -S nvidia nvidia-utils

# AMD
sudo pacman -S mesa xf86-video-amdgpu

# Intel
sudo pacman -S mesa xf86-video-intel
Enter fullscreen mode Exit fullscreen mode

✅ Summary

Task Command
Install required tools sudo pacman -S grub os-prober ntfs-3g
Edit GRUB config sudo nano /etc/default/grub
Enable Windows detection GRUB_DISABLE_OS_PROBER=false
Mount EFI sudo mount /dev/sdX1 /boot/efi
Generate config sudo grub-mkconfig -o /boot/grub/grub.cfg
(Optional) Reinstall GRUB sudo grub-install ...
Reboot system reboot

Top comments (2)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.