Skip to content

Install the GRUB Bootloader

NOTE

GRUB is a versatile and widely supported bootloader, making it an excellent choice for most systems.

1. Install GRUB to the Boot Partition

Use the following command to install GRUB:

bash
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub --removable

Explanation of Arguments

  • --target=x86_64-efi: Specifies the installation for 64-bit EFI systems. Omit this for legacy BIOS installations.
  • --efi-directory=/boot: Indicates the directory where GRUB should be installed.
  • --bootloader-id=grub: Sets the name of the bootloader as it appears in the BIOS boot menu.
  • --removable: Ensures compatibility and prevents boot issues when BIOS settings are changed.

2. Generate the GRUB Configuration File

TIP

This command creates the configuration file, enabling GRUB to manage and load operating systems.

bash
grub-mkconfig -o /boot/grub/grub.cfg

3. Final Steps

You’ve successfully installed GRUB and set up Arch Linux!

  • Exit the chroot environment:

    bash
    exit
  • Unmount the partitions:

    bash
    umount -R /mnt
  • Reboot your system:

    bash
    reboot

NOTE

Remember to remove the installation media (e.g., USB) after rebooting to avoid booting into the installer again.

Released under the MIT License. Built by harilvfs (aka Hari Chalise).