3 AUTHOR: Fabio Fracassi <f.fracassi@gmx.net>
4 Modified for GRUB 0.93 by Raphael J. Schmid <raphael@arrivingarrow.net>
7 GRUB is an alternative to LILO. This explains how to make it work.
11 GRUB is the GNU GRand Unified Bootloader, a project which intends to solve all
12 bootup problems once and for all.
14 One of the most interesting features, is that you don't have to install a new
15 partition or kernel, you can change all parameters at boottime via the GRUB
16 console, since it knows about the filesystems.
19 ftp://alpha.gnu.org/pub/gnu/grub/grub-0.93.tar.gz
20 http.us.debian.org/debian/pool/main/g/grub/grub_0.93+cvs20030224-2.diff.gz
22 When you've downloaded all of the above sources, let's get to work.
24 (1a) Extract GRUB itself: tar -xvzf grub-0.93.tar.gz
25 (1b) Extract the patch: gunzip grub_0.93+cvs20030224-2.diff.gz
27 (2) Apply the patch: patch -Np1 -i grub_0.93+cvs20030224-2.diff
29 (3) Build GRUB (as root):
30 ./configure --prefix=/usr \
33 && cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub
35 If you want, you can copy one of the stage1_5 files as well. (More on
40 Now there are two ways of going on. You can start the GRUB Console
44 Or via a floppy disk, after which you have to reboot:
45 cat /boot/grub/stage{1,2} >> /dev/fd0
49 First GRUB wants to know on which partition it is installed. Its way of
50 naming them is a little differently than done Linux's:
51 (hd<BiosNr>,<PartitionNr>)
53 For example: /dev/hda is (hd0), /dev/hda1 (hd0,0), /dev/hdb2 (hd1,1), and
54 so forth. Hopefully you'll get the clue. Otherwise try 'man grub'/'info
57 If you dont know the partition you can issue on the GRUB console:
58 'find /boot/grub/stage1'
60 Next, you tell GRUB where it is installed: 'root (hd0,1)' (In this case,
63 Install GRUB in the master boot record of the drive you just specified:
66 Your could start your system after a reboot now, using the command
67 'kernel (hd0,1)/boot/bzImage root=/dev/hda2'
69 There is the posibility to "teach" GRUB knowlage of the filesystem, that
70 way GRUB doesn't need a block map for the stage2 file and is thus more
71 robust against filesystem changes. This is archieved by means of the
77 embed /boot/grub/reiserfs_stage1_5 (hd0) # or e2fs_stage1_5
78 and note the number of sectors.
82 install /boot/grub/stage1 (hd0) \
83 (hd0)1+<number of sectors embed returned> \
84 p /boot/grub/stage2 /boot/grub/menu.lst
86 (6) Installing a Bootmenu:
88 Simply put a file named 'grub.conf' into the /boot/grub directory. Most
89 GRUB Console commands can be used in that file -- check the info page!
91 Here is my setup for reference:
94 # File /boot/grub/menu.lst - Bootmenu definition
97 # Start Entry 0 by default
101 # makeing it nicer ;)
102 color green/black light-green/black
104 # If you have the Pixmap patch applied you can
105 # define a Background Picture here
106 # The nice LFS image can be found at
107 # http://linuxfromscratch.org/~gerard/lfslogos/lfs-grub-splash.xpm
108 splashimage (hd0,1)/boot/grub/lfs-grub-splash.xpm
115 setkey equal parenright
116 setkey parenright parenleft
117 setkey parenleft asterisk
118 setkey doublequote at
119 setkey plus bracketright
121 setkey slash ampersand
122 setkey ampersand percent
124 setkey underscore question
125 setkey question underscore
126 setkey semicolon less
127 setkey less numbersign
128 setkey numbersign backslash
131 setkey asterisk braceright
135 kernel (hd0,1)/boot/bzImage root=/dev/hda2
138 title Old Suse Linux 6.4
139 kernel (hd1,0)/bzImage root=/dev/hdb2
143 chainloader (hd0,0)+1
146 title (Re)Install grup
148 embed /boot/grub/reiserfs_stage1_5
149 install /boot/grub/stage1 (hd0) (hd0)1+19 \
150 p /boot/grub/stage2 /boot/grub/menu.lst
153 This hint should have given you an idea of how powerful a tool GRUB is, yet
154 a very comfortable one to use. I don't know much more about GRUB than what
155 I wrote here check the Documentation (especially 'info grub') for more
159 - the German C't Magazin for their great article about GRUB
160 - Gerard Beekmans for creating Linux From Scratch
163 - Update: 08/May/2003 Raphael J. Schmid
164 Changed the hint to work with GRUB 0.93.
165 Also took the liberty of cleaning up formatting and wording a little,
166 although I'm not a native speaker either. Please bear with me :-)
167 - Update: 17/Apr/2002 Fabio Fracassi