KIWI - Appliance Builder Next Generation
EL8 fork
On RHEL 8-based distributions, grub2-mkconfig uses the
grub.d/10_linux_bls script which reads Boot Loader Specification
(BLS) entries from /boot/loader/entries/ and inlines them as
menuentry blocks directly in grub.cfg. This is different from
RHEL 9+ where grub.d/10_linux uses the blscfg command to load
BLS entries at boot time.
When kiwi builds a disk image, kernel packages are installed into
a chroot (the image root). The BLS entries created by the kernel
scriptlets at that point contain:
- linux/initrd paths prefixed with the build host's image root
path (e.g. /var/tmp/kiwi-build/build/image-root/boot/vmlinuz-...)
- an options line from the build host's /proc/cmdline
Previously, kiwi corrected these BLS entries only *after* running
grub2-mkconfig. On RHEL 9+ this works fine because grub.cfg just
contains blscfg and reads the (now corrected) BLS entries at boot
time. On RHEL 8, however, grub2-mkconfig had already inlined the
*uncorrected* BLS entries into grub.cfg, resulting in wrong kernel
paths and boot options that caused the image to fail to boot.
This commit adds calls to _fix_grub_loader_entries_boot_cmdline()
and _fix_grub_loader_entries_linux_and_initrd_paths() before
grub2-mkconfig, so that BLS entries are corrected before they get
inlined into grub.cfg. The existing post-grub2-mkconfig calls are
retained because grub2-mkconfig itself may re-create or modify BLS
entries on some distributions.
Fixes boot failure on AlmaLinux 8 ppc64le GenericCloud images built
with kiwi where grub.cfg contained build-root paths like:
linux /var/tmp/kiwi-build/build/image-root/boot/vmlinuz-4.18.0-...
instead of:
linux /vmlinuz-4.18.0-...
|
||
|---|---|---|
| .github | ||
| build-tests | ||
| doc | ||
| dracut/modules.d | ||
| helper | ||
| kiwi | ||
| package | ||
| test | ||
| tools | ||
| .bumpversion.cfg | ||
| .codacy.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci-disabled.yml | ||
| .mailmap | ||
| .obs_test | ||
| .obs_test_status | ||
| .virtualenv.dev-requirements.txt | ||
| .virtualenv.requirements.txt | ||
| kiwi.yml | ||
| LICENSE | ||
| Makefile | ||
| MANIFEST.in | ||
| README.rst | ||
| setup.cfg | ||
| setup.py | ||
| tox.ini | ||
KIWI - Next Generation ====================== .. |GitHub Action Code Style| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-code-style.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |GitHub Action Config Functions| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-config-functions.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |GitHub Action Documentation| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-documentation.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |GitHub Action Publish Pages| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-publish-pages.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |GitHub Action Publish PyPi| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-publish-to-pypi.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |GitHub Action Unit Types| image:: https://github.com/OSInside/kiwi/actions/workflows/ci-units-types.yml/badge.svg :target: https://github.com/OSInside/kiwi/actions .. |Health| image:: https://app.codacy.com/project/badge/Grade/228f7e8cd15d448688a590c272ec3789 :target: https://www.codacy.com/gh/OSInside/kiwi/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OSInside/kiwi&utm_campaign=Badge_Grade .. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__ .. |Installation| replace:: `Installation <https://osinside.github.io/kiwi/installation.html>`__ .. |Contributing| replace:: `Contributing <https://osinside.github.io/kiwi/contributing.html>`__ .. |Donate| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif :target: https://www.paypal.me/SchaeferMarcus |GitHub Action Code Style| |GitHub Action Config Functions| |GitHub Action Documentation| |GitHub Action Publish Pages| |GitHub Action Publish PyPi| |GitHub Action Unit Types| |Health| **KIWI, the OS image and appliance builder.** * |Installation| * |Contributing| * |Doc| We'll donate it for good luck so's you're sure to come back :) |Donate|