GRUB(統一引導裝入器)是基本的Linux引導裝入器。
其有四個作用,如下:
1.選擇操作系統(如果計算機上安裝了多個操作系統)。
2.表示相應引導文件所在的分區。
3.找到內核。
4.運行初始內存盤,設置內核和相關模塊。
GRUB的設置文件是
Fedora的是在/boot/grub/grub.conf
Ubuntu中是在 /boot/grub/menu.lst
/boot/grub/grub.conf中典型的GRUB設置文件,如下圖
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,9)
# kernel /boot/vmlinuz-version ro root=/dev/hda10
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=30
splashimage=(hd0,9)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,9)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Other
rootnoverify (hd0,0)
chainloader +1