As you most likely know, GRUB2 is default boot loader for many Linux working techniques. GRUB stands for GRand Unified Bootloader. GRUB boot loader is the primary program that runs when the pc begins. It’s chargeable for loading and transferring management to the working system Kernel. After which the Kernel takes cost, and initializes the remainder of the working system. On this tutorial, let me present you configure GRUB2 Boot Loader settings in Ubuntu system. We will configure the settings both by instantly modifying the grub configuration file utilizing any textual content editor or utilizing any GUI functions like Grub-customizer.
I examined the steps given under information on Ubuntu 16.04 and 18.04 LTS desktops, nevertheless these directions would possibly work on all Linux working techniques that makes use of GRUB2 boot loader.
Like I already stated we are able to configure boot loader settings from command line or GUI.
Allow us to see the command line method first.
Warning: The default configuration file for GRUB2 is /boot/grub/grub.cfg. You shouldn’t edit or modify this file, until you’re a lot acquainted with GRUB2. That is the principle file in addition into the Linux OS. Should you do something incorrect with this file, then you’ll absolutely be find yourself with damaged system. So, don’t contact this file!
The /boot/grub/grub.cfg file is mechanically generated by grub-mkconfig utilizing templates from /and many others/grub.d and settings from /and many others/default/grub. Any modifications you made in in /and many others/default/grub file will likely be mirrored to the GRUB2.
First, backup the /and many others/default/grub file earlier than making any modifications.
$ sudo cp /and many others/default/grub /and many others/default/grub.bak
The contents of typical grub file will appear to be under.
$ cat /and many others/default/grub
# Should you change this file, run ‘update-grub’ afterwards to replace
# For full documentation of the choices on this file, see:
# data -f grub -n ‘Easy configuration’
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
# Uncomment to allow BadRAM filtering, modify to fit your wants
# This works with Linux (no patch required) and with any kernel that obtains
# the reminiscence map info from GRUB (GNU Mach, kernel of FreeBSD …)
# Uncomment to disable graphical terminal (grub-pc solely)
# The decision used on graphical terminal
# be aware that you should utilize solely modes which your graphic card helps by way of VBE
# you’ll be able to see them in actual GRUB with the command `vbeinfo’
# Uncomment if you don’t need GRUB to go “root=UUID=xxx” parameter to Linux
# Uncomment to disable technology of restoration mode menu entries
# Uncomment to get a beep at grub begin
#GRUB_INIT_TUNE=”480 440 1″
Everytime you made any modifications on this file, you need to run the next command to use the modifications to the GRUB2.
$ sudo update-grub
Allow us to do just a few tweaks within the GRUB2 boot loader.
1. Choose default OS (GRUB_DEFAULT)
Open /and many others/default/grub file utilizing any textual content editor, for instance nano.
$ sudo nano /and many others/default/grub
Discover the road “GRUB_DEFAULT”. We will choose the default OS in addition utilizing this feature. Should you set the worth as “Zero”, the primary working system within the GRUB boot menu entry will boot. Should you set it as “1”, the second OS will boot, and so forth.
Additionally, you probably have a couple of OS in your system, you’ll be able to boot the final working system utilizing the worth GRUB_DEFAULT=saved. Everytime you reboot the system, the final working system will begin boot. Please be aware that you need to add a line GRUB_SAVEDEFAULT=true to make this trick work.
You can too specify the title of the working system’s entry in addition a specific OS. For instance, if there may be an entry known as “Lubuntu 16.04 LTS” within the BOOT menu, you might use GRUB_DEFAULT=”Lubuntu 16.04 LTS” in addition Lubuntu by default. Be conscious that you need to specify the worth throughout the quotes.
Don’t overlook to replace the modifications made in grub file by operating the next command:
$ sudo update-grub
2. Set OS timeout (GRUB_TIMEOUT)
By default, the chosen entry from the boot menu will begin to boot in 10 seconds.
You’ll be able to improve or lower this timeout setting. If the worth is “Zero”, the default OS will instantly begin to boot. If the worth is “5” , the boot menu will seem for five seconds, with the intention to choose which OS you wish to load when the system begins.
three. Change GRUB background picture
To alter the GRUB background picture, it’s worthwhile to copy your most well-liked picture to /boot/grub/ location.
$ sudo cp ostechnix.png /boot/grub/
You should use JPG/JPEG format photographs as properly. However GRUB helps solely 256 coloration JPG/JPEG picture codecs solely. So, it’s higher to make use of PNG format photographs.
Alternatively, you’ll be able to instantly point out the picture file path in /and many others/default/grub file like under.
$ sudo nano /and many others/default/grub
Add the next line:
Substitute the picture path with your individual.
When you made the mandatory modifications within the GRUB file, Save and shut it.
To use the modifications, you need to run the next command:
$ sudo update-grub
You must see the next output:
Producing grub configuration file …
Warning: Setting GRUB_TIMEOUT to a non-zero worth when GRUB_HIDDEN_TIMEOUT is ready is not supported.
Discovered background picture: ostechnix.png
Discovered linux picture: /boot/vmlinuz-Four.15.Zero-23-generic
Discovered initrd picture: /boot/initrd.img-Four.15.Zero-23-generic
Discovered linux picture: /boot/vmlinuz-Four.15.Zero-20-generic
Discovered initrd picture: /boot/initrd.img-Four.15.Zero-20-generic
Discovered memtest86+ picture: /boot/memtest86+.elf
Discovered memtest86+ picture: /boot/memtest86+.bin
Reboot and examine whether or not the modifications are working or not.
Configure GRUB2 Boot Loader settings Utilizing Grub-customizer
A few of you might not snug with commandline. Should you’re one among them, you should utilize a graphical instrument known as “Grub-customizer” to configure Grub2 and Burg boot loaders.
Utilizing Grub-customizer, we are able to,
Edit, take away, rename and re-arrange boot menu entries,
Cover or present boot menu,
Change default boot entry,
Change textual content coloration of boot menu entries,
Change boot menu background picture,
Improve or lower boot time,
Edit kernel parameters,
Reinstall Grub into Home windows MBR.
Grub-customizer has an official PPA for Ubuntu and its derivatives comparable to Linux Mint. You’ll be able to add it and set up Grub-customizer by operating the next instructions one after the other:
$ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
$ sudo apt replace
$ sudo apt set up grub-customizer
As soon as put in, launch it from Sprint or Menu. Right here is how Grub-customizer default interface appears like.
As you’ll be able to see within the above screenshot, Grub-customizer have the next threes tabs.
In Record configuration, you’ll be able to edit, delete, rename, and re-arrange(transfer) boot menu entries. For instance, to rename a menu entry, excellent click on on it, select Rename and enter the title of your selection.
Equally, to maneuver an entry, select it, proper click on after which click on Transfer up or Transfer down. You can too use UP/Down arrows within the menu bar to maneuver entries.
After making the modifications, click on on the Save button on the menu bar.
In Common settings part, we are able to,
Change default boot entry (can use helpful when dual-booting),
Boot into final booted entry i.e boot the final working system,
Present/conceal boot menu visibility,
Change boot menu delay,
Change kernel parameters.
In Look settings, we are able to,
Change font for boot menu entries,
Set font coloration,
Set background picture and so forth.
Don’t forget to hit the Save button after making any modifications.
There’s additionally a further part known as “Superior settings” in the proper backside aspect of Grub-customizer interface. Within the superior settings part, you’ll be able to shortly add, take away, allow/disable and edit values for numerous boot loader settings comparable to GRUB_DEFAULT, GRUB_TIMEOUT, GRUB_MENU_PICTURE and some extra.
Once more, I warn you – don’t edit or modify GRUB2 settings in manufacturing techniques. I like to recommend you to check these settings in any digital machine after which apply them in your private desktop.
Thanks for stopping by!
Assist us that can assist you:
Have a Good day!!