Building GRUB2

Requirements

ubuntu

apt install build-essential
...?

slackware

you need build-time requriements and those

slackpkg install \
    freetype \
    fuse \
    glib2 \
    libpng \
    harfbuzz \
    python3

Build & deploy

grab the latest

ver=2.12

wget https://ftp.gnu.org/gnu/grub/grub-$ver.tar.gz
tar xzf grub-$ver.tar.gz
cd grub-$ver/

–or– current from git

cd grub/
./bootstrap

and proceed

./configure --help
./configure --sysconfdir=/etc --localstatedir=/var \
    --disable-nls \
    --disable-efiemu \
    --disable-device-mapper \
    --disable-grub-emu-sdl2 \
    --disable-grub-emu-sdl \
    --enable-grub-mount \
    --disable-libzfs \
    --enable-liblzma

# tune your chroot env
grep ^proc /proc/cpuinfo 
export MAKEFLAGS=-j32

make > ../grub.log && echo BUILT
make install

troubleshooting

No rule to make target '../grub-core/extra_deps.lst', needed by 'syminfo.lst'. Stop.

==> switch to current, grab the source from savannah git

configure.ac:278: error: possibly undefined macro: AC_SUBST

==> install pkg-config

autoreconf: failed to run autopoint: No such file or directory

==> install gettext-tools

resources

troubles

https://stackoverflow.com/questions/41182142/possibly-undefined-macro-ac-subst


https://dausruddin.com/autoreconf-failed-to-run-autopoint-no-such-file-or-directory/

https://nanxiao.me/en/fix-autoreconf-failed-to-run-autopoint-no-such-file-or-directory-issue-on-suse/

https://stackoverflow.com/questions/72555674/failed-to-run-autopoint-no-such-file-or-directory


https://mail.gnu.org/archive/html/grub-devel/2025-01/msg00071.html

https://mail.gnu.org/archive/html/grub-devel/2025-01/msg00072.html

https://mail.gnu.org/archive/html/grub-devel/2023-12/msg00061.html

https://mail.gnu.org/archive/html/grub-devel/2023-12/msg00034.html

https://stackoverflow.com/questions/834748/gcc-makefile-error-no-rule-to-make-target


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun