The GRUB package contains the GRand Unified Bootloader.
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.
Prepare GRUB for compilation:
./configure --prefix=/usr
Compile the package:
make
To test the results, issue: make check.
Note that the test results will always show the error “ufs2_stage1_5 is too big.” This is due to a compiler issue, but can be ignored unless you plan to boot from an UFS partition. The partitions are normally only used by Sun workstations.
Install the package:
make install mkdir /boot/grub cp /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.