Like many other Linux distributions, fedora uses GRUB as the boot loader for 32-bit and 64-bit x86 systems ). Grub configuration files are mainly/boot/GRUB/grub. conf, while/boot/GRUB/menu. list is the soft link of this file ). The configuration file style is as follows:
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# Notice: You have a/boot partition. This means that
# All kernel and initrd paths are relative to/boot/, eg.
# Root (hd1, 0)
# Kernel/vmlinuz-version Ro root =/dev/sda7
# Initrd-version.img/initrd
# Boot =/dev/SDA
Default = 0
Timeout = 5
Splashimage = (hd0, 0)/GRUB/splash.xpm.gz
Hiddenmenu
Title fedora (2.6.23.1-42. fc8)
Root (hd0, 0)
Kernel/vmlinuz-2.6.23.1-42.fc8 Ro root = label =/
Initrd/initrd-2.6.23.1-42.fc8.img
Title WindowsXP
Rootnoverify (hd0, 0)
Chainloader + 1
There are three main parts. The comments (starting with #) are general options, the startup options of Fedora 8 and the startup options of windows.
General options,
Default indicates the default started system. It starts with 0 and indicates the first, second, and so on ......
Timeout seconds later, the default system is automatically loaded. If you do not select the value 5 seconds later, fedora 8 will be started;
Hiddenmen hides the menu by default until the user presses a key;
The background image displayed by the splashimage starter. The format of this image is a special format. It must be prepared by a special tool and placed in a proper position;
Fedora startup chapter,
Root sets the boot system partition, which is not the root system of the Linux system, but the boot partition. Grub is the system boot loader, therefore, the so-called root refers to the system starting from that partition, which is a boot partition for Linux systems;
Kernel kernel, suitable kernel located on the boot partition;
Initrd specifies the objects loaded by the ramdisk (virtual disk technology in memory) when the system is started. Generally, this image contains drivers of some special devices, for example, if a USB driver is supported, the Linux system can be started from the UBS device. The file can be customized based on the specific kernel and boot media, you can view RedHat related documents;
The order in which grub starts Linux is to load the specified kernel (kernel) and initrd images from the specified boot partition. For other systems, the processing is different, grub will hand over the task to the boot program of the system (such as Windows bootloader) to start the system;
Rootnoverify specifies the partition containing the boot device, similar to the Linux Root Command;
Chainloader specifies that the loading program of a non-Linux system is located on the + 1 Sector of the specified partition, so that the loaders of other systems can be correctly loaded and executed to load tasks of other systems;
In this file, the disk partition is described as (hdx, n), X indicates the disk number, starts from 0, and is specified according to the BIOS disk sequence; n indicates the disk partition number, it is also counted from 0. For example, the second partition (/dev/sda2) of the first disk in the BIOS sequence is expressed as (hd0, 1) in grub );
Grub. conf is a common text file format and can be edited using any text editor, such as VI, gedit, or Kate. Note that, any editing error will cause the system to fail to load and start normally, so be careful and be careful!