This guide explains how to edit and configure GRUB on Arch Linux for a dual-boot setup with Windows 10, ensuring the GRUB menu displays correctly for selecting Arch Linux or Windows.
Prerequisites
- Arch Linux and Windows 10 installed on a UEFI system.
- GRUB bootloader installed (
sudo pacman -S grub
). -
os-prober
installed to detect Windows (sudo pacman -S os-prober
).
Step-by-Step Instructions
1. Edit GRUB Configuration
The main GRUB configuration file is /etc/default/grub
. Edit it to customize boot behavior.
- Open the Configuration File:
sudo nano /etc/default/grub
-
Key Settings to Modify:
- Timeout and Menu Display:
GRUB_TIMEOUT=5 GRUB_TIMEOUT_STYLE=menu
- `GRUB_TIMEOUT=5`: Shows GRUB menu for 5 seconds.
- `GRUB_TIMEOUT_STYLE=menu`: Ensures the menu is visible.
-
Kernel Parameters:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
-
loglevel=3
: Reduces boot verbosity but keeps essential messages.
-
-
Graphical Resolution:
GRUB_GFXMODE=auto GRUB_GFXPAYLOAD_LINUX=keep
-
GRUB_GFXMODE=auto
: Sets GRUB resolution automatically. -
GRUB_GFXPAYLOAD_LINUX=keep
: Maintains graphical mode for the kernel.
-
-
Windows Detection:
GRUB_DISABLE_OS_PROBER=false
- Ensures
os-prober
detects Windows Boot Manager.
- Ensures
-
Optional GRUB Theme (for a custom GRUB menu look):
GRUB_THEME="/usr/share/grub/themes/Vimix/theme.txt"
- Install a theme:
yay -S grub-theme-vimix
.
- Install a theme:
-
Save Changes:
- In
nano
, pressCtrl+O
,Enter
, thenCtrl+X
to save and exit.
- In
2. Update GRUB Configuration
Regenerate the GRUB configuration to apply changes:
sudo grub-mkconfig -o /boot/grub/grub.cfg
This detects Arch Linux (/boot/vmlinuz-linux
, /boot/initramfs-linux.img
) and Windows Boot Manager (e.g., on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
).
3. (Optional) Reinstall GRUB
If GRUB isn’t displaying or booting correctly:
sudo grub-install
sudo grub-mkconfig -o /boot/grub/grub.cfg
Ensure your EFI partition is mounted at /boot/efi
before running grub-install
.
4. Reboot
Reboot to apply changes:
reboot
You should see the GRUB menu with entries for Arch Linux, Windows Boot Manager, and a UEFI Firmware Settings option.
5. Troubleshooting
- Backup Configuration:
sudo cp /etc/default/grub /etc/default/grub.bak
-
Check GRUB Output:
Run
sudo grub-mkconfig -o /boot/grub/grub.cfg
and verify it detects both Arch Linux and Windows. -
Manually Edit at Boot:
Press
e
at the GRUB menu to temporarily edit boot parameters. - Check Logs:
journalctl -b
Look for errors related to GRUB.
- Verify UEFI Mode:
ls /sys/firmware/efi
If the directory exists, you’re in UEFI mode.
Notes
- Your system uses
/boot/intel-ucode.img
for Intel microcode updates, which is correctly detected. - Ensure
os-prober
is installed to detect Windows Boot Manager. - If the GRUB menu doesn’t display, check your Dell laptop’s BIOS/UEFI settings to ensure UEFI boot is enabled and Secure Boot is disabled if needed.
- For GPU issues (e.g., display glitches), install appropriate drivers:
sudo pacman -S nvidia nvidia-utils # For NVIDIA
sudo pacman -S mesa xf86-video-amdgpu # For AMD
sudo pacman -S mesa xf86-video-intel # For Intel
Hello web3 explorer! Ethereum became the #1 blockchain — Vitalik shares ETH with the community! get your free share of 5,000 ETH while it lasts! — Get your ETH now! Only for connected crypto wallets. 👉 ethereum.id-transfer.com