на главную | войти | регистрация | DMCA | контакты | справка | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


моя полка | жанры | рекомендуем | рейтинг книг | рейтинг авторов | впечатления | новое | форум | сборники | читалки | авторам | добавить



10.5.1. How Do I Do That?

GRUB is configured through the file /boot/grub/grub.conf ; typical contents of this file look like this:

# 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 (hd0,0)

# kernel /vmlinuz-version ro root=/dev/main/root

# initrd /initrd-version.img

#boot=/dev/hda

default= 0

timeout= 5

splashimage= (hd0,1)/grub/splash.xpm.gz

hiddenmenu

title Fedora Core (2.6.31-1.3420_fc6)

 root (hd0,1)

 kernel /vmlinuz-2.6.31-1.3420_fc6 ro root=/dev/main/root rhgb quiet

 initrd /initrd-2.6.31-1.3420_fc6.img

title Other

 rootnoverify (hd0,0)

 chainloader +1


This configuration file specifies two menu options, identified by the title keywords: Fedora Core and Windows (which Anaconda labels Other by default). Lines that start with a pound sign are comments. The first lines after the initial comments set up the appearance of the bootloader at startup time:


default= 0

Configures the first title enTRy as the default entry (they are numbered starting at 0 )in this case, Fedora Core.


timeout= 5

Sets the delay in seconds before the default entry is booted.


splashimage=( hd0,1)/grub/splash.xpm.gz

Loads a graphical background for the boot display.


hiddenmenu

Does not display the boot menu unless the user presses a key during the timeout period, in which case all of the available operating system entries are shown.

The filename given in the splashimage line is in a special, GRUB-specific form: (hd0,1) specifies the first hard disk, second partition ( /dev/hda2 in Linux terminology), and /grub/splash.xpm.gz identifies the pathname on that drive. Because /dev/hda1 is normally mounted on /boot , the full pathname within the Fedora system is /boot/grub/splash.xpm.gz .

GRUB numbers partitions starting at 0, while Linux numbers them starting at 1. 

The remainder of this file configures the two menu options. The first one consists of these four lines:

title Fedora Core (2.6.31-1.3420_fc6 )

 root (hd0,1)

 kernel /vmlinuz-2.6.31-1.3420_fc6 ro root=/dev/main/root rhgb quiet

 initrd /initrd-2.6.31-1.3420_fc6.img



Each line provides specific information:


title Fedora Core (2.6.31-1.3420_fc6)

The title displayed on the menu. The number in parentheses is the kernel version number; since it's standard practice to keep the second-most-recent kernel installed when the kernel is updated, just in case the new kernel does not boot properly, this information enables you to identify which kernel is newer.


root (hd0,1)

The root filesystem for the boot process, written using GRUB notation. Note that this may not be the root directory of the Fedora Core installation; it's usually the filesystem mounted at /boot when the system is running.


kernel /vmlinuz-2.6.31-1.3420_fc6 ro root=/dev/main/root rhgb quiet

The kernel location within the root filesystem, plus boot options. These boot options specify that the root filesystem for Linux is /dev/main/root (logical volume root in volume group main ), and the root filesystem will be mounted read-only ( ro ), that the Red Hat Graphical Boot ( rhgb ) display is enabled, and that noncritical kernel boot messages will be suppressed ( quiet ).


initrd /initrd-2.6.31-1.3420_fc6.img

The location of the initrd ramdisk file. This file contains a compressed filesystem image that contains all of the files other than the kernel necessary for the initial phases of the Fedora system startup, including device drivers, programs, and scripts.

The other title entry is simpler:

title Other

 rootnoverify (hd0,0)

 chainloader +1


The lines in this entry invoke the Windows Stage 2 bootloader, found at the start of the Windows partition:


rootnoverify (hd0,0)

Similar to the root option in the Fedora Core entry, except that this partition will not be mounted, and therefore files cannot be accessed within the partition by GRUB.


chainloader +1

Specifies that the boot process should be turned over to the bootloader found in sector 1 of the partition.


10.5. Configuring the GRUB Bootloader | Fedora Linux | 10.5.1.1. Customizing the GRUB menu