GRUB full contact

xiaoxiao2021-03-31  189

1, what is grub?

The full name of GRUB is Grand Unified Bootloader, which is a program that will boot the loader to the main boot record, and the main boot record is a sector starting at a hard disk. It allows a specific instruction located in the main boot record area to load a GRUB menu or a GRUB command environment. This allows the user to start the selection of the operating system, transferring a particular instruction to the kernel during kernel boot, or determines some system parameters (such as the available RAM size) before kernel boot.

2, boot process

These initial sectors-main boot records - start mounting a pre-selected operating system, an operating system option is a GRUB menu, or a GRUB command line interface that performs a specific option.

The process of loading GRUB and operating systems, including the following steps:

A. Loading basic boot loaders, which is usually the first step. The basic boot loader must be a very small space in the main guiding sector, less than 512 bytes. Therefore, the only thing that basic boot loader does is to load the second boot loader. This is mainly due to not enough space in the main guiding sector for other things.

B. Loading a second boot loader, which is often referred to as a second step. This second boot loader is actually a more advanced feature to allow users to load a specific operating system. In GRUB, this step is to let the user displays a menu or enter a command.

C, load the operating system on a specific partition, such as a Linux kernel. Once GRUB receives the correct instruction that starts the operating system from its command line or configuration file, it looks for the necessary boot files, and then hand over the control of the machine to the operating system.

Note: When the GRUB's configuration file changes, it is not necessary to restart the grub. All changes can be automatically detected. If the grub is restarted, the user will return under the GRUB housing of the command line mode.

3, install GRUB

First, get the latest available GRUB package. The GRUB package on the Red Hat Linux installation CD can also be used.

Second, under a housing prompt, run command / sbin / grub-install, here is the location where GRUB will be installed. For example: / sbin / grub-install / dev / hda

Finally, reboot the system. The GRUB graphics boot the load menu will appear.

转载请注明原文地址:https://www.9cbs.com/read-130777.html

New Post(0)