How to configure the Ubuntu 16.04 GRUB 2 Boot Loader

Source: Internet
Author: User

How to configure the Ubuntu 16.04 GRUB 2 Boot Loader
How to configure the Ubuntu 16.04 GRUB 2 Boot Loader

As you know, GRUB 2 is the default Boot Loader for most Linux operating systems. GRUB is short for GRand uniied Bootloader. It is the first program to be loaded when Linux is started. After that, GRUB is responsible for loading and giving control to Linux kernel, linux kernel initializes other parts of the operating system. In this article, we will introduce the important configurations of the GRUB 2 Boot Loader for Ubuntu 16.04 LTS desktop edition. Of course, the operations and configurations are also common to GRUB configurations in other Linux distributions.

GRUB 2 Boot Loader settings

The default configuration file for GRUB 2 is/boot/grub. cfg, which is a very important file during Linux boot. Do not edit or modify this file unless you are familiar with it.

All settings related to GRUB 2 are stored in the/etc/default/grub file by default. Changes to the content are directly reported to GRUB 2. For the sake of insurance, we should first back up it:

sudo cp /etc/default/grub /etc/default/grub.bak

Let's take a look at the main options of the GRUB boot loader:

cat /etc/default/grub

After editing the configuration file, run the following command to apply the change to GRUB 2:

sudo update-grub

Next we will begin to make three important optimization adjustments for GRUB2 boot loader.

1. Select the default Operating System

To speed up the boot process, you can manually specify the system from which the boot starts by default. If it is set to 0, the system starts to boot from the first system in the GRUB menu. If it is set to 1, the system starts to boot from the second entry, and so on.
If you have installed multiple operating systems, you can use the GRUB_DEFAULT = saved parameter to boot from the last system. After the configuration is complete, the computer will start directly from the last system every time you restart the computer. Note: This function also requires a GRUB_SAVEDEFAULT = true entry to take effect.

You can also specify the name of the default boot system for GRUB to start up, for example, the "Lubuntu14.04 LTS" entry in your GRUB menu, you can directly specify GRUB_DEFAULT = Lubuntu 14.04 LTS to start Lubuntu by default.

2. Set the timeout time

By default, the Start Menu stays for 10 seconds. You can directly increase or shorten the wait time in the configuration file. If you set GRUB_TIMEOUT to 0, the ignore menu is directly guided by the default Operating System selected in the previous step.

3. Modify the GRUB background image

To change the GRUB background image, you only need to copy the prepared image to the/boot/grub/path.

GRUB only supports 265-color JPG/JPEG images. Therefore, we recommend that you use PNG images.

After the background image is replaced, remember to execute sudo update-grub to make it take effect.

Original article from: http://www.sysgeek.cn/ubuntu-16-04-grub-2-boot-loader/original Author: System geeks

This article Reprinted from: http://www.linuxprobe.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.