How to improve Linux boot speed with a Grub tweakOctober 10, 2019
Linux is fairly fast, but be usable and as a result of the Grub boot loader, it may take a lot of time to begin. If you wish to accelerate the boot of your own Linux system, it is crucial that you modify the default option that your Linux boot speed isn ’ t too slow setting in the Grub bootloader.
Before we begin
Making adjustments to the Grub configuration file, however modest, is harmful. Any mistake may severely break your system and possibly mess it up. So, before showing you how to boost your boot time it is essential that we go over how to create a copy of your Grub configuration file. Gain Root accessibility from the shell by typing in su. Otherwise, if you can’t log in as root, try the sudo -s command.
Once you’ve obtained access to some Root shell, then use the CP control to generate a whole replica of the Grub bootloader config file.
Note: be sure to substitute username from the control below with the username you use on your Linux PC.
Cp / / etc/default/grub / / home/username/grub. Bak
speed up Grub’s boot period
Even the Grub bootloader includes a setting known as “GRUB_TIMEOUT. ” This setting is that the computer will sit and idle before opting to load the default operating system. By default, it’s ’s set to 5 minutes, and for many people, this ’s time to waitfor. In case you’re looking to boost your boot time, changing this amount is easily the means to do it.
You ’ ll need to modify the configuration file, to change the boot rate in the Grub bootloader. As it s among the most easy to navigate Assessing Grub ’ s configuration file is done through the Nano text editor. To begin the editing process, establish a terminal window and earn sudo or Root access.
Next, open the Grub configuration file in the Nano text editor.
Look at the text file for your “GRUB_TIMEOUT” entry. Then, erase the number 5 and switch it to a smaller amount. Remember that the lower this amount is, the faster your PC will boot up. For the absolute fastest results, change it
Otherwise, if you ’ re considering speeding Grub up, but want to be able to browse the menu, set it to two seconds.
After you’re satisfied with the modifications made to the GRUB_TIMEOUT flag, save your edits into the file by pressing on Ctrl + O about the keyboard. Then, shut the Nano text editor out by pressing on Ctrl +X.
Apply the changes
It ’ s time to employ them with the changes are built into the Grub configuration file. The only method to implement configuration changes is to update the Bootloader. You ’ ll should use your Linux distribution ’ s upgrading mechanism to do so.
To begin, launch a terminal window. When it’so open, obtain a root shell utilizing su or sudo -s.
Now that the terminal shell has root access obey the directions to upgrade the Grub bootloader that fit the Linux distribution you use.
About Ubuntu Linux and Debian that there ’s no need to fill out a lengthy command if you would like to finalize changes. Just run on the update-grub control!
On Fedora and OpenSUSE, there isn’t a straightforward update-grub command such as on Ubuntu. Instead, to use the adjustments to your own bootloader, you’ll should conduct the grub2-mkconfig command.
To update Grub settings on Arch Linux, you’ll must call the grub-mkconfig command.
Once the upgrade Grub command finishes running, the changes must be in effect!
Undo changes into Grub
Decided you don’t enjoy the changes designed to Grub? If that’s the case, you’ll need to restore the copy made. To do it, then launch a terminal window and gain a root shell.
Once obtaining a root shell, then navigate the Linux terminal session in where it opened (/) to the home folder in your Linux PC. Though, remember that you’ll must alter the username portion of the control below.
Next, delete the current Grub configuration file onto your Linux system using the RM command.
Rm / / etc/default/grub
Using the older Grub configuration file removed from the machine, it’s time to renew the backup. Using the MV command, put the grub.bak file in to position.
Mv grub.bak / / etc/default/grub
Finally, upgrade Grub to finalize the changes made.