10.100.1. Installation of GRUB
Note
This package is known to have issues when its default
optimization flags (including the -march
and -mtune
options) are changed. If any environment variables that override
default optimizations have been defined, such as CFLAGS
and CXXFLAGS
,
unset them when building GRUB.
Glibc-2.19 does not declare gets():
sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h
Prepare GRUB for compilation:
./configure --prefix=/usr \
--sysconfdir=/etc --disable-werror
Compile the package:
make
To test GRUB you must have QEMU installed and then, issue:
make check
Install the package:
make install
10.100.2. Configuring GRUB
Now that grub is installed, we need to configure the defaults that
will be used to generate the configuration after we install the
kernel. Create this file with the following:
install -m755 -dv /etc/default
cat > /etc/default/grub << "EOF"
# Begin /etc/default/grub
GRUB_DEFAULT=0
#GRUB_SAVEDEFAULT=true
GRUB_HIDDEN_TIMEOUT=
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=Cross-LFS
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX_DEFAULT=""
#GRUB_TERMINAL=console
#GRUB_GFXMODE=640x480
#GRUB_GFXPAYLOAD_LINUX=keep
#GRUB_DISABLE_LINUX_UUID=true
#GRUB_DISABLE_LINUX_RECOVERY=true
#GRUB_INIT_TUNE="480 440 1"
#GRUB_DISABLE_OS_PROBER=true
# End /etc/default/grub
EOF
The meaning of the above options and possible alternate
values:
-
GRUB_DEFAULT=
-
Write Me
-
GRUB_SAVEDEFAULT=
-
Write Me
-
GRUB_HIDDEN_TIMEOUT=
-
Write Me
-
GRUB_HIDDEN_TIMEOUT_QUIET=
-
Write Me
-
GRUB_TIMEOUT=
-
Write Me
-
GRUB_DISTRIBUTOR=
-
Write Me
-
GRUB_CMDLINE_LINUX=
-
Write Me
-
GRUB_CMDLINE_LINUX_DEFAULT=
-
Write Me
-
GRUB_TERMINAL=
-
Write Me
-
GRUB_GFXMODE=
-
Write Me
-
GRUB_GFXPAYLOAD_LINUX=
-
Write Me
-
GRUB_DEFAULT=
-
Write Me
-
GRUB_DISABLE_LINUX_UUID=
-
Write Me
-
GRUB_DISABLE_LINUX_RECOVERY=
-
Write Me
-
GRUB_INIT_TUNE=
-
Write Me
-
GRUB_DISABLE_OS_PROBER=
-
Write Me