7.10. GRUB-2.00

The GRUB package contains the GRand Unified Bootloader.

7.10.1. Installation of GRUB

[Note]

Note

If you would like use a different bootloader than this one you can go to the following link for alternative bootloaders and the instructions to use them. http://trac.cross-lfs.org/wiki/bootloaders

Glibc-2.19 does not declare gets():

cp -v grub-core/gnulib/stdio.in.h{,.orig}
sed -e '/gets is a/d' grub-core/gnulib/stdio.in.h.orig > grub-core/gnulib/stdio.in.h

Prepare GRUB for compilation:

./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --libdir=/tools/lib64 --disable-werror \
    --enable-grub-mkfont=no --with-bootdir=tools/boot

The meaning of the new configure option:

--enable-grub-mkfont=no

Prevents GRUB from trying to build grub-mkfont, which requires Freetype.

--with-bootdir=tools/boot

This modifies GRUB's default location where it searches for kernel images and installs its bootloader files.

Compile the package:

make

Install the package:

make install

Details on this package are located in Section 10.92.3, “Contents of GRUB.”