Arch Linux - Grub2 MultiBoot

I often find myself installing or reinstalling Grub. Whilst I have already have a gist with all the necessary commands, I thought that it would be worthwhile to document the process for future installations.

Installation

Find the device name of the boot partition (e.g. using lsblk), and replace <EFI_PARTITION> with it in the commands below.

pacman -S grub efibootmgr os-prober dosfstools

1. Install packages.

mkdir -p /boot/efi
mount /dev/<EFI_PARTITION> /boot/efi

2. Mount boot partition to /boot/efi.

grub-install --efi-directory=/boot/efi --target=x86_64-efi
grub-mkconfig -o /boot/grub/grub.cfg

3. Install and configure Grub.

Repair

There are easier methods but I usually boot up an Arch install disk to repair the bootloader.

mkdir -p /mnt/root
mount /dev/<ROOT_PARTITION> /mnt/root

Mount the root partition / of Arch to /mnt/root.

arch-chroot /mnt/root

Change root directory. Perform steps 2 and 3 from the installation section.

After rebooting into Arch, I run steps 2 and 3 again to add the entry for Windows Boot Manager (as it doesn’t seem to detect Windows when running the commands from the install disk).

Common problems

  • Mounted the wrong partition
    • Use umount <path> to unmount partition
  • Mount error, special device does not exist
    • Ensure that the name of the device is correct
← Previous Post Next Post →