The entire process of updating grub in your Arch Linux requires four ruling steps. The primary steps are 1st two, and the last two steps support the first two steps by implanting the change. These steps encompass:
- Step #1 Updating GRUB packages
- Step #2 GRUB configuration
- Step #3 GRUB customization
- Step #4 GRUB reloading
The element of chief importance is the user login through the sudo user. Most of the Linux operations require you to login sudo on your server as a root user. The second requirement for the updating process of GRUB is the availability of a package manager known by the name of Pacman. It’s common to have a sudo user and Pacman in your Arch Linux server, so you don’t need some extra procedures to fulfill the requirements. It’s always better to check the prerequisites before operating on any software or update on Arch Linux.
Updating GRUB packages
You need to update the system for the latest packages that are available for your applications and software on Arch Linux. Updating GRUB packages can provide you its latest version that is available in the official repository of the Arch Linux database. Run the command of Arch Linux to sync, update and refresh the system packages through Pacman.
To manually check the latest version of GRUB available in the repository, input the following command.
Pacman, in this command, will reinstall the latest version of GRUB for your server. This way, you can rest assured that the package of GRUB you are going to update exists in its modified form. With this, you can conveniently proceed to edit the configuration of GRUB.
The editing in the configuration of GRUB presents various customize options to set your package as per your preferences. If you are working with more than one operating system, then use GRUB to establish the setting of your default operating system. Other customize options encompass menu timeout, background image setting, and the setting of the script for GRUB. For the operation of all these activities, GRUB has its file that needs editing to perform these operations. You can input this command with the editor to make changes in the configure file of GRUB.
$ sudo nano /etc/default/grub
The output window displays the 54 liner details of the GRUB configuration file. You can change the background, color, GRUB timeout, and the default OS of your server by altering the values of the respective category. It’s preferable to change the value of timeout to some negative number so that you can get the unlimited menu from the package of GRUB. Once you have completed all the editing on this file, save the alterations. You can also see the details of the GRUB script in its respective repository.
To customize the settings of GRUB, deploy the GRUB customizer from the official database of Arch Linux. This tool is based on the graphical interface and eases the customization activities on GRUB. Input the command to get the customizer from the Arch Linux depository.
$ sudo pacman -S grub-customizer
Now, select the customizer by searching it from the menu bar, select it, and input the root password to proceed further. You can conveniently access and customize the operationality of GRUB for list configuration, general, and appearance setting.
It is a compulsory process to update the depository of GRUB named under /boot/grub after your edition is complete. Input the following command on the terminal to reload the configuration file of GRUB after the changes.
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
You can also opt for the following command to update and reload the changes previously made in the configuration file of GRUB.
You won’t find this command on the official depository of Arch Linux, so grab it from the AUR using the server of Arch Linux. Put these commands to get the update-grub feature from AUR.
$ sudo pacman -S git base-devel
$ git clone https://aur.archlinux.org/update-grub.git
The first command set up the AUR installation features, and the second command deploys the update-grub package from AUR. You can apply the yay command to build the update-grub package on your Arch Linux.
The last thing for you to perform is to input the following command to utilize the feature of update-grub.
With this command, your GRUB will get updated on Arch Linux.
It’s the best choice to use the package of GRUB in the operating system of Arch Linux for system boot. Once you have complied with the steps and commands mentioned in this guide, you can rest assured about your system boot. GRUB will perform the automated function to boot the system every time you enter in your server. If you are not using GRUB, then you might face issues to boot your server. The server will send you a recommendation to boot the system using the GRUB. It can happen every time you deal with the installation of a new application.