Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does linux grub mean?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "what does linux grub refer to". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In linux, grub is a complete program for loading and managing system startup, and it is a bootstrap; it is the first software that runs when a computer starts, which loads the kernel of the operating system, and then initializes the rest of the operating system. Grub supports LBA, and the addressing translation used to find files can be put into the firmware of the hard drive.

The operating environment of this tutorial: Ubuntu 16.04 system, Dell G3 computer.

GRUB in Linux

GRUB is a complete program for loading and managing system startup. It is the most common boot loader (bootloader) in Linux distributions. The boot loader is important because the operating system cannot be started without it.

The bootstrapper is the first software that runs when the computer starts. The boot loader transfers control to the operating system kernel.

It loads the kernel of the operating system, which initializes the rest of the operating system (including Shell, display manager, desktop environment, and so on).

GRUB is the default bootstrap for many Linux distributions. This is because it is better than many previous versions of the bootstrap. Some of its functions are:

GRUB supports LBA (logical block addressing mode), which puts the addressing translation used to find files into the firmware of the hard drive

GRUB provides the greatest flexibility to load the options needed for the operating system using a command-based pre-operating system environment.

Boot options such as kernel parameters can be modified using the GRUB command line.

There is no need to specify the physical location of the Linux kernel for GRUB. It only needs the kernel's hard disk number, partition number, and file name.

GRUB can use direct load and chain load startup methods to start almost any operating system.

Bootstrapper and Boot Manager

I don't want to confuse you right now, but I think this topic is inevitable. There is a blurred line between the bootstrap program (boot loader) and the boot manager (boot manager).

You already know what the bootstrap is. It starts first, then loads the kernel into memory and executes it. Boot Manager allows you to choose between different operating systems (if you have more than one operating system on your computer). The boot manager does not load the system directly.

With the release of version 3. 3 of the Linux kernel, the Linux kernel includes a built-in EFI bootstrap. In fact, any system that supports EFI includes an EFI bootstrapper. On systems that support EFI, the firmware reads the EFI file in the EFI system partition (EFI System Partition) (ESP) to get boot information.

Insert a picture here that shows the partition table with ESP partitions:

GRUB is both a bootstrap and a bootstrap manager. I'll talk about GRUB later. Let's first look at other GRUB-like programs.

Little knowledge: GRUB is the acronym for GRand Unified Bootloader (Unified Boot Program).

What do the lines on the GRUB screen mean?

You will see a few lines on the GRUB screen. These lines vary from setting to setting and from release to release.

Usually, the first line is your Linux distribution. If you see something like advanced options, you can go into it and find some lines that start with "linux-generic-x-y-z" and so on.

When your Linux distribution updates the kernel version, it retains at least one old version. You can choose to boot to the old Linux kernel in case your system encounters any problems with the newer and newer Linux kernel.

You can also see a recovery option in Ubuntu-based distributions.

In the end, you may see an entry, such as system settings or UEFI settings, to access the system's BIOS settings.

What other boot managers are similar to GRUB?

GRUB is the most popular boot manager in Linux. But it's not the only one. There is a highly customizable boot manager called rEFInd Boot Manager, which is also popular with some Linux users.

There is also a text-based boot manager called systemd-boot. You can guess that this is designed for systemd-based Linux distributions. Some distributions are using systemd-boot, such as Pop OS.

Access or edit GRUB

Usually the GRUB screen you see is its menu interface. If you have more than one operating system installed, it will allow you to choose one of them to boot. If your Linux distribution has more than one kernel installed, you can also choose to load a different kernel.

Depending on the configuration of different Linux distributions, there may be some other options on your GRUB menu.

You can edit menu items by pressing the e key in the GRUB menu interface. This allows you to modify the parameters of the kernel before it loads. For example, in some cases, disabling the graphics driver provided by the kernel can help you solve the problem that your Linux system gets stuck at startup.

You can also press c on the GRUB menu interface to enter the GRUB command line menu.

GRUB profile

Any changes you make to GRUB in the menu interface are temporary. If you want to make some permanent changes to GRUB, such as changing the default timeout, you can modify the GRUB configuration file after the Linux system starts.

The default GRUB configuration file is / etc/default/grub. There is also a / etc/default/grub.d directory that also holds some configurations. You can edit the / etc/default/grub file directly, but I suggest you make additional changes by adding a configuration file (.cfg file) to this directory.

You must update GRUB for these changes to take effect.

Use the GRUB customizer to customize GRUB

If you are not used to editing files with a text editor in the terminal, you can use a graphical tool called the GRUB customizer.

It allows you to change the boot order, the default timeout, and so on. You can also use it to set the background of GRUB to a custom wallpaper.

The GRUB customizer can be installed from the Universe repository in Ubuntu 20.04 and through PPA in Ubuntu 18.04. It can be used in Arch Linux-based distributions through AUR.

That's all for "what does linux grub mean?" Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report