linux boot loader --GRUB

    There are two popular boot loaders in the linux world: LILO and GRUB. LILO is the traditional Linux boot loader, very stable and well documented, but quickly overshadowed by GRUB.
    GRUB, as a comprehensive and unified boot loader, is also helpful for users who frequently change system configurations. After changing the configuration of LILO every time, it must be re-installed into the boot record (ie MBR, Master Boot Record, Master Boot Record), and GRUB will automatically read its own configuration file at startup, saving the above easy to forget Manage steps.
    Users can install GRUB on the boot drive by running grub-install. The argument to this command is the name of the device to boot. The way GRUB names physical disks is different from the customary Linux standard. GRUB device names look like:
       (hd0, 0)
    where the first number represents the physical drive number (starting at 0), and the second number represents the partition number (also starts at 0). Here (hd0, 0) is equivalent to the Linux device /dev/hda1. Therefore, if the user wants to install GRUB on the master device, they should use the command:
       # grub-install '(hd0, 0)'
    Note that the quotes must be used here to avoid the shell interpreting the brackets in its own way.
    By default, GRUB reads its default boot configuration from /boot/grub/grub.conf. Here is an example of a grub.conf file:
       default=0
       timeout=10
       splashimage=(hd0, 0)/boot/grub/splash.xpm.gz
       title Red Hat Linux (2.6.9-5)
           root (hd0, 0)
           kernel /boot/vmlinuz-2.6.9-5 ro root=/dev/hda1
    This example configures only one operating system, if GRUB within 10 seconds (timeout=10) does not receive any input from the keyboard, then automatically boots (default=0). The root filesystem for "Red Hat Linux" configuration is the GRUB device (hd0, 0). GRUB loads the kernel from /boot/vmliauz-2.6.9-5 and displays the file /boot/grub/splash.xpm.gz as a "splash screen" (or so called splash screen) when loaded.
    GRUB supports a powerful command interface, and can edit the configuration items in the configuration file at any time. You can enter command line mode by typing c on the GRUB splash screen. From the command line, you can boot operating systems not listed in the grub.conf file, display system information, and perform basic tests of the file system. What you can do with the grub.conf file, you can also do with the GRUB command line.

Note:
1. GRUB official manual: www.gnu.org/software/grub/manual/.
2. Reference books: "Linux System Management Technical Manual" Chapter 2: Boot and Shutdown.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326269275&siteId=291194637