6.37. GRUB-0.97

The GRUB package contains the GRand Unified Bootloader.

Approximate build time: 0.2 SBU
Required disk space: 10.2 MB

6.37.1. Installation of GRUB

This package is known to have issues when its default optimization flags (including the -march and -mcpu options) are changed. If any environment variables that override default optimizations have been defined, such as CFLAGS and CXXFLAGS, unset them when building GRUB.

Start by applying the following patch to allow for better drive detection, fix some GCC 4.x issues, and provide better SATA support for some disk controllers:

patch -Np1 -i ../grub-0.97-disk_geometry-1.patch

By default, GRUB doesn't support ext2 filesystems with 256-byte inodes. Fix this by applying the following patch:

patch -Np1 -i ../grub-0.97-256byte_inode-1.patch

Prepare GRUB for compilation:

./configure --prefix=/usr

Compile the package:


To test the results, issue:

make check

Install the package:

make install
mkdir -v /boot/grub
cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub

Replace i386-pc with whatever directory is appropriate for the hardware in use.

The i386-pc directory contains a number of *stage1_5 files, different ones for different file systems. Review the files available and copy the appropriate ones to the /boot/grub directory. Most users will copy the e2fs_stage1_5 and/or reiserfs_stage1_5 files.

6.37.2. Contents of GRUB

Installed programs: grub, grub-install, grub-md5-crypt, grub-set-default, grub-terminfo, and mbchk

Short Descriptions


The Grand Unified Bootloader's command shell


Installs GRUB on the given device


Encrypts a password in MD5 format


Sets the default boot entry for GRUB


Generates a terminfo command from a terminfo name; it can be employed if an unknown terminal is being used


Checks the format of a multi-boot kernel