GRUB instructions (1)

Source: Internet
Author: User
Article Title: GRUB instructions (1 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Starting from Red Hat Linux 7.2, GRUB (GRand uniied Bootloader) replaces LILO as the default start loader. I believe LILO is familiar to everyone. In Red Hat Linux, GRUB is used to replace LILO. However, compared with LILO, GRUB is still unfamiliar to everyone. This article will introduce the basic information, terms, interfaces, commands, and configuration files of GRUB, and hope to help you.
  
1. GRUB Overview
  
Before loading a system in Red Hat linux, it must be told to boot the system by specific instructions in a boot loader (boot loader. This program is generally located on the system's primary hard drive or other media drives that know how to start the Linux kernel.
  
If an x86 system only installs Red Hat Linux and has only one version of Linux kernel, it is not important to start the specific process of Red Hat Linux Through the boot loader. Red Hat Linux installer allows you to quickly and conveniently configure the boot loader to store in the Master Boot Record of the master hard drive to guide the operating system.
  
However, in order to boot from multiple linux kernels or other operating systems, it is necessary to understand how Red hat linux provides the necessary boot options, and understand the guiding process and how to change it.
  
This article discusses GRUB, which is the default method used by Red Hat Linux to load the operating system on x86 systems. At the same time, this article will also detail the various commands and configuration options used to control the boot process. GRUB Definition
  
Gnu grub (GRand uniied Bootloader) is a program that installs the boot loader to the Master Boot Record. The Master Boot Record is located in the sector starting with a hard disk. It allows specific commands in the primary Boot Record area to load a GRUB menu or GRUB command environment. This allows you to start operating system selection and deliver specific commands to the kernel during kernel boot, or determine some system parameters (such as available RAM size) before kernel boot ).
  
X86 Boot Process
  
After an x86 machine is started, the system BIOS starts to check system parameters, such as the memory size, date and time, disk devices, and the boot sequence of these disk devices. In general, the BIOS is configured to first check the drive or optical drive (or both), and then try to boot from the hard disk. If no bootable media is found on these removable devices, the BIOS usually redirects to the first sector of the first hard disk to find instructions for loading the operating system. These initial sectors-Master Boot records-start the loading of a pre-selected operating system, an operating system option vendor GRUB menu, or a GRUB command line interface that executes specific options.
  
The process of loading GRUB and the operating system includes the following steps:
  
1. Load basic boot loader, which is usually the first step. The basic Boot Loader must be in a very small space in the primary Boot Sector, less than 512 bytes. Therefore, the only thing the basic bootstrap loader does is to load the second bootstrap loader. This is mainly because there is not enough space in the primary Boot Sector for other things.
  
2. Load the second boot loader, which is usually called Step 2. This second bootstrap loader actually introduces more advanced features that allow users to load into a specific operating system. In GRUB, this step allows the user to display a menu or enter a command.
  
3. An operating system loaded on a specific partition, such as the Linux kernel. Once GRUB receives the correct command from its command line or configuration file to start the operating system, it will find the necessary boot file and hand over control of the machine to the operating system.
  
  
  
  
  

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.