GRUB Boot Loader
来源:互联网 发布:知乎jennyyy扒皮 编辑:程序博客网 时间:2024/05/19 20:47
Chapter 9. The GRUB Boot Loader
- 9.1. Boot Loaders and System Architecture
- 9.2. GRUB
- 9.3. Installing GRUB
- 9.4. GRUB Terminology
- 9.5. GRUB Interfaces
- 9.6. GRUB Commands
- 9.7. GRUB Menu Configuration File
- 9.8. Changing Runlevels at Boot Time
- 9.9. Additional Resources
When a computer with Red Hat Enterprise Linux is turned on, the operating system is loaded into memory by a special program called a boot loader. A boot loader usually exists on the system's primary hard drive (or other media device) and has the sole responsibility of loading the Linux kernel with its required files or (in some cases) other operating systems into memory.
9.1. Boot Loaders and System Architecture
Each architecture capable of running Red Hat Enterprise Linux uses a different boot loader. The following table lists the boot loaders available for each architecture:
Table 9.1. Boot Loaders by Architecture
This chapter discusses commands and configuration options for the GRUB boot loader included with Red Hat Enterprise Linux for the x86 architecture.
The GNU GRand Unified Boot loader (GRUB) is a program which enables the selection of the installed operating system or kernel to be loaded at system boot time. It also allows the user to pass arguments to the kernel.
9.2.1. GRUB and the x86 Boot Process
This section discusses the specific role GRUB plays when booting an x86 system. For a look at the overall boot process, refer to Section 30.2, “A Detailed Look at the Boot Process”.
GRUB loads itself into memory in the following stages:
The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR[4]. The primary boot loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the Stage 1.5 or Stage 2 boot loader.
The Stage 1.5 boot loader is read into memory by the Stage 1 boot loader, if necessary. Some hardware requires an intermediate step to get to the Stage 2 boot loader. This is sometimes true when the /boot/partition is above the 1024 cylinder head of the hard drive or when using LBA mode. The Stage 1.5 boot loader is found either on the /boot/ partition or on a small part of the MBR and the /boot/ partition.
The Stage 2 or secondary boot loader is read into memory. The secondary boot loader displays the GRUB menu and command environment. This interface allows the user to select which kernel or operating system to boot, pass arguments to the kernel, or look at system parameters.
The secondary boot loader reads the operating system or kernel as well as the contents of /boot/sysroot/ into memory. Once GRUB determines which operating system or kernel to start, it loads it into memory and transfers control of the machine to that operating system.
The method used to boot Red Hat Enterprise Linux is called direct loading because the boot loader loads the operating system directly. There is no intermediary between the boot loader and the kernel.
The boot process used by other operating systems may differ. For example, the Microsoft®Windows® operating system, as well as other operating systems, are loaded using chain loading. Under this method, the MBR points to the first sector of the partition holding the operating system, where it finds the files necessary to actually boot that operating system.
GRUB supports both direct and chain loading boot methods, allowing it to boot almost any operating system.
Warning
During installation, Microsoft's DOS and Windows installation programs completely overwrite the MBR, destroying any existing boot loaders. If creating a dual-boot system, it is best to install the Microsoft operating system first.
9.2.2. Features of GRUB
GRUB contains several features that make it preferable to other boot loaders available for the x86 architecture. Below is a partial list of some of the more important features:
GRUB provides a true command-based, pre-OS environment on x86 machines. This feature affords the user maximum flexibility in loading operating systems with specified options or gathering information about the system. For years, many non-x86 architectures have employed pre-OS environments that allow system booting from a command line.
GRUB supports Logical Block Addressing (LBA) mode. LBA places the addressing conversion used to find files in the hard drive's firmware, and is used on many IDE and all SCSI hard devices. Before LBA, boot loaders could encounter the 1024-cylinder BIOS limitation, where the BIOS could not find a file after the 1024 cylinder head of the disk. LBA support allows GRUB to boot operating systems from partitions beyond the 1024-cylinder limit, so long as the system BIOS supports LBA mode. Most modern BIOS revisions support LBA mode.
GRUB can read ext2 partitions. This functionality allows GRUB to access its configuration file, /boot/grub/grub.conf, every time the system boots, eliminating the need for the user to write a new version of the first stage boot loader to the MBR when configuration changes are made. The only time a user needs to reinstall GRUB on the MBR is if the physical location of the /boot/ partition is moved on the disk. For details on installing GRUB to the MBR, refer to Section 9.3, “Installing GRUB”.
- GRUB Boot Loader
- boot loader:Grub
- GRUB 装入器(boot loader)
- Linux之boot loader:GRUB
- Linux-Boot loader: Grub入门
- Boot loader: Grub入门(转)
- 第二十二章 Boot Loader: Grub
- boot loader(grub) 的两个 stage
- Migrate to GRUB 2---Transitioning to a new boot loader
- GRUB(GRand Unified Boot loader)引导加载程序
- /boot/grub/grub.cfg
- /boot/grub/grub.cfg
- boot loader
- Boot Loader
- boot loader
- Boot Loader
- ubuntu : you may need to re-run your boot loader[grub] 解决办法
- /boot/grub/grub.conf文件
- Android通信—信使的使用实现Activity与Service的通信
- Android高级控件(五)——如何打造一个企业级应用对话列表,以QQ,微信为例
- Hello World
- CSS三列自适应布局
- YJPageView
- GRUB Boot Loader
- python 文件读写5个实例
- oracle数据库sql语句
- nyoj 239 月老的难题(匈牙利算法)
- 数据结构实验之链表六:有序链表的建立
- JVM 优化
- 练习三 1002
- Xcode中如何检测循环引用
- 委派构造函数