6.20. GRUB-2.12

The GRUB package contains the GRand Unified Bootloader.

Approximate build time: 0.3 SBU
Required disk space: 161 MB

6.20.1. Installation of GRUB

Prepare GRUB for compilation:

./configure --prefix=$LFS/tools               \
            --build=$(build-aux/config.guess) \
            --host=$(build-aux/config.guess)  \
            --target=$LFS_TGT                 \
            --program-prefix=lfs-             \
            --disable-werror

The meaning of the new configure options:

--build=..., --host=..., and --target=$LFS_TGT

This allows the build to generate GRUB utilities running on the host system, but generating the bootloader files for $LFS_TGT. Then we can use the bootloader files to boot the temporary system on the target machine.

--program-prefix=lfs-

This ensures that the installed programs have lfs- prepended to their names, to better distinguish them from the GRUB installation of the host distro.

--disable-werror

This allows the build to complete with warnings introduced by more recent Flex versions.

Compile the package:

make

Install the package:

make install

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