GRUB

From Mage
Jump to: navigation, search

GRUB is a multi-boot bootloader that is installed by default on most Linux distributions. Here's a quick breakdown on getting it working with Arch Linux.

Install the package

pacman -S grub

package details - grub


If you're on UEFI, install efibootmgr as well.

pacman -S efibootmgr

package details - efibootmgr



Install the bootloader

UEFI

Create a partition in the first 2TB of your drive. This partition must be FAT and at least 100MB. The partition table of the disk must be GPT and the partition should be set as an EFI System Partition. Mount this partition under /boot/efi/. Install the bootloader to this EFI partition by executing the following command:

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


BIOS

Create a partition for /boot/ in the first 2TB of your disk (ext4 is fine). Set this partition to Active so it will be used for booting.

Install GRUB to the disk by executing the following command, replacing /dev/sdX with your disk's location:

grub-install --target=i386-pc /dev/sdX


Generate the config file

After the bootloader has been installed we need to generate the main configuration file /boot/grub/grub.cfg.

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