17.  Appendix C - GRUB Details And A Sample grub.conf

17.1.  References on GRUB

See

	bash# man grub
	bash# man grubby   # (command line tool for configuring grub, lilo, and elilo)
	bash# man grub-install
      

Edit the file /etc/grub.conf to make entries for the new kernel. See the sample file below:

17.2.  Tips On GRUB

In Redhat Linux, during grub display, just type c for command-line option of GRUB:

	To boot Linux do this:
    grub> help
	  
    grub> root
        (hd1,1): Filesystem is type ext2fs, partition type 0x83
    grub> root (hd1,0)
	  
    grub> kernel / <Press-TAB-KEY>
    This will list all files
	  
    grub> kernel /boot <Press-TAB-KEY>
    This will list all files in /boot
	  
    grub> kernel /boot/vmlinuz
	  
    grub> boot
      

See also the GRUB Manual . To boot MS Windows 95/2000 etc do this: If you want to boot an unsupported operating system (e.g. Windows 95), chain-load a boot loader for the operating system. Normally, the boot loader is embedded in the boot sector of the partition on which the operating system is installed.

	grub> help
	grub> help rootnoverify
	grub> rootnoverify (hd0,0)
	grub> makeactive
	grub> chainloader +1
	grub> boot
      

17.3.  Sample GRUB Conf File

	# 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,8)
	#          kernel /boot/vmlinuz-version ro root=/dev/hda9
	#          initrd /boot/initrd-version.img
	#boot=/dev/hda
	# By default boot the second entry
	default=1
	# Fallback to the first entry.
	fallback 0
	# Boot automatically after 2 minutes
	timeout=120
	splashimage=(hd0,8)/boot/grub/splash.xpm.gz
	title Windows 2000 
	unhide (hd0,0)
	hide (hd0,1)
	hide (hd0,2)
	rootnoverify (hd0,0)
	chainloader +1
	makeactive
	title Red Hat Linux (2.4.18-19.8.0.19mar2003)
		root (hd0,8)
		kernel /boot/bzImage.2.4.18-19.8.0.19mar2003 ro root=LABEL=/ hdd=ide-scsi
		initrd /boot/initrd-2.4.18-19.8.0custom.img.19mar03
	title Red Hat Linux (2.4.18-19.8.0custom)
		root (hd0,8)
		kernel /boot/vmlinuz-2.4.18-19.8.0custom ro root=LABEL=/ hdd=ide-scsi
		initrd /boot/initrd-2.4.18-19.8.0custom.img
	title Red Hat Linux (2.4.18-14)
		root (hd0,8)
		kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
		initrd /boot/initrd-2.4.18-14.img
	title MyKernel.26jan03 (Red Hat Linux 2.4.18-14)
		root (hd0,8)
		kernel /boot/bzImage.myker.26jan03 ro root=LABEL=/ hdd=ide-scsi
		initrd /boot/initrd-2.4.18-19.8.0.img
	title Windows 98
	hide (hd0,0)
	hide (hd0,1)
	unhide (hd0,2)
	rootnoverify (hd0,2)
	chainloader +1
	makeactive
	title DOS 6.22
	hide (hd0,0)
	unhide (hd0,1)
	hide (hd0,2)
	rootnoverify (hd0,1)
	chainloader +1
	makeactive
	title Partition 2 (floppy)
	hide (hd0,0)
	unhide (hd0,1)
	hide (hd0,2)
	chainloader (fd0)+1
	title Partition 3 (floppy)
	hide (hd0,0)
	hide (hd0,1)
	unhide (hd0,2)
	chainloader (fd0)+1