Updating GRUB package
The very first thing to do is make sure that GRUB is up-to-date. When you update the system, pacman will take care of updating GRUB to the latest version.
If you want to manually make sure that the system has the latest version of GRUB, use the following command.
This command will reinstall GRUB, of course. However, pacman will check for the latest version from the server and if there’s an update available, will grab and install it.
Editing GRUB configuration
GRUB allows custom configuration. You can perform a number of actions using this opportunity, for example, setting the default OS (if multiple OS is installed), GRUB menu timeout, custom background image and much more. It’s also possible to set custom scripts for GRUB.
GRUB uses its own configuration file for performing all the actions. The file is located at “/etc/default/grub”. For GRUB scripts, “/etc/grub.d” directory is used.
Edit the GRUB configuration file.
For example, to change the GRUB wallpaper, change the value of “GRUB_BACKGROUND” variable.
GRUB also allows coloring the texts for easier reading.
At the start of the file, you’ll notice “GRUB_DEFAUTL” variable. It’s used to define which OS is the default one in the bootloader.
The next entry “GRUB_TIMEOUT” will decide how long the GRUB menu should remain open. By default, the value is 5 (seconds). If you want to unlimited GRUB menu show, set the value to any negative integer.
Once editing is complete, save the file.
Let’s check out the GRUB script directory.
GRUB customizer
This is a very helpful tool that allows easier customization of various GRUB settings. It’s a graphical tool and available directly from the Arch Linux repository.
Start “grub-customizer” from the menu.
It’ll require the root password to start. After all, you’re calling a tool to perform system-level changes.
Every single option of the tool is simple and self-explanatory.
Reload GRUB
After making all the changes, it’s necessary to update the GRUB cfg file at the “/boot/grub” directory. Run the following command after making any change to GRUB’s configuration file.
If you’re not interested in running this lengthy command, you can use the “update-grub”. It’s a script that runs the previously mentioned command. However, it’s not available on the Arch Linux official directory. “update-grub” has to be grabbed from AUR.
Prepare your system for building and installing AUR packages.
Grab “update-grub” from AUR.
Start building “update-grub”.
Note: For easier AUR access, it’s recommended to use a suitable AUR helper. AUR helpers can automate the entire task. Learn how to use AUR.
Once the installation is complete, you can directly call “update-grub” to do the job.
Final thoughts
GRUB is the most popular bootloader for all the Linux distros. It can work with other OS as well. For taking full control over the boot process, it’s necessary to have knowledge on manipulating GRUB configurations and updating GRUB properly.