1.5 一个GRUB配置文件
基于本例的分区如下:
hda 15G
hda1 8G / Red Hat LINUX8.0
hda5 7G /home
hdc 20G
hdc1 6.4G WinXP
hdc5 6.4G
hdc6 6.4G
hdc7 6.4G
#fdisk -l
# Disk /dev/hdc: 255 heads, 63 sectors, 2434 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 894 7181023+ b Win95 FAT32
/dev/hdc2 895 2434 12370050 f Win95 Ext'd (LBA)
/dev/hdc5 895 1787 7172991 b Win95 FAT32
/dev/hdc6 1788 2434 5196996 b Win95 FAT32
Disk /dev/hda: 255 heads, 63 sectors, 1867 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ 83 Linux
/dev/hda2 1021 1802 6281415 83 Linux
/dev/hda3 1803 1867 522112+ 82 Linux swap
grub.conf,这个文件位于;/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,0)
# kernel /boot/vmlinuz-version ro root=/dev/hda1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /boot/initrd-2.4.18-14.img
title Microsoft Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader (hd1,0)+1
makeactive
boot