GRUB boot loader

ignitionxvi

Limp Gawd
Joined
Apr 17, 2004
Messages
324
Hey Guys,

I was just getting started trying to have a Knoppix / XP Pro dual boot, but i'm not really sure how to set up the GRUB boot loader. I've found a 62 page manual on their site about it, but that seems really overwhelming. How hard is it to work with once you get the gist of it? I want to know what i'm about to try to tackle. Thanks

edit: also, does LILO happen to be easier to use?
 
I set up grub via command line when I was much more of a noob than I am now. Pretty simple. My grub.conf looks like this:

Code:
[bradt][grub]# cat grub.conf
default 0
timeout 30

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


title=Gentoo Linux (2.6.4)
root (hd0,1)
kernel (hd0,1)/kernel-2.6.4 root=/dev/hda4


title=Windows XP
root (hd0,0)
chainloader +1


title=Gentoo Linux (2.6.5)
root (hd0,1)
kernel (hd0,1)/kernel-2.6.5 root=/dev/hda

In grub, everything starts at 0, so if you had three options, they would be 0, 1, and 2. If you have 2 harddrives, they would be hd0 and hd1. If you had four partitions, they would be 0, 1, 2, 3, etc.

The first block sets it to load option 0 (Gentoo with the 2.6.4 kernel) if no keys are pressed after 30 seconds

Second block sets the background image, found on my boot partition.

Third, fourth, and fifth blocks set the options.


As long as you know where your kernel is and how your drives are partitioned, you shouldn't have any problems.
 
here is mine so you have another CONFIG to examine

#############
# SETUP #
#############

default 0
timeout 10
splashimage= (hd0,1)/grub/splash.xpm.gz

#############
# Win2k #
############
title=Win2000
root (hd0,0)
chainloader (hd0,0)+1


##############
# Linux #
##############
title=Gentoo Linux
root (hd0,1)
kernel (hd0,1)/kernel-2.4.26_pre6-gentoo root=/dev/ataraid/disc0/part3 vga=791 doataraid



As stated GRUB counts from "0" not "1".
My OS RAID setup is such:

Partition 1 = Windows Win2k
Partition 2 = Linux /boot
Partition 3 = Linux /

For booting windows2k /XP it is really easy.
For linux the kernel MUST be referenced from your /boot partition if you have one. I have one you might not. Since I have a boot partition I have to tel GRUB where my root partition is using the root= statement


Lilo is alot easier (only due to the numbering if you are not use to counting from 0) BUT you must remember to run the command "lilo" after installing a new kernel. If you dont it can be a world of pain of booting off a repair CD, chroot....
While with GRUB once it is written to the "Master Boot Record" it just accesses its CONFIG file so if you install a new kernel but forget to edit your grub.conf you can via its menu of boot off a recover CD and correct. ON that sense it is alot easier
 
thanks for the help guys! it doesn't seem to hard, if i have any problems i'll post em!
 
Back
Top