Univention Bugzilla – Bug 53117
Unbreak GRUB2 upgrade
Last modified: 2022-04-28 12:00:28 CEST
The Upgrade to UCS 5.0-0 fails: 1. linux-image-amd64 pulls in linux-image-... 2. this calls /etc/kernel/postinst.d/zz-update-grub 3. this calls update-grub 4. this calls grub-mkconfig 5. this calls /etc/grub.d/05_debian_theme 6. this generates /boot/grub/grub.cfg.new with > if background_image /grub/uniboot.png; then > else > ... > fi This syntax is invalid as there must be at least one statement between "then" and "else": > error: syntax error. > error: Incorrect command. > error: syntax error. > Syntax error at line 114 The bug is introduced by grub2/4.4-0-0-ucs/2.02~beta3-5+deb9u2-ucs4.4-2/51-menu-color.patch, which removed the required statement: - if [ -z "${2}" ] && [ -z "${3}" ]; then - echo " true" +++ This bug was initially created as a clone of Bug #51984 +++
# dpkg-query -W -f '${Package}\t${Version}\t${Config-Version}\t${Status}\n' grub\* linux-image-\* univention-grub | grep -Fv not-installed grub-common 2.02+dfsg1-20+deb10u4 2.02~beta3-5+deb9u2A~4.4.0.201909191538 install ok unpacked grub-pc 2.02+dfsg1-20+deb10u4 2.02~beta3-5+deb9u2A~4.4.0.201909191538 install ok unpacked grub-pc-bin 2.02+dfsg1-20+deb10u4 2.02~beta3-5+deb9u2A~4.4.0.201909191538 install ok unpacked grub2-common 2.02+dfsg1-20+deb10u4 2.02~beta3-5+deb9u2A~4.4.0.201909191538 install ok unpacked linux-image-4.19.0-16-amd64 4.19.181-1 install ok half-configured linux-image-4.9.0-15-amd64 4.9.258-1 install ok installed linux-image-4.9.0-15-amd64-signed 5.0.0-16A~4.4.0.202103182253 install ok installed linux-image-amd64 4.19+105+deb10u11 install ok unpacked univention-grub 13.0.0-6A~5.0.0.202104161759 install ok installed Notice that "grub*" is transitioning from our patched UCS version to the un-patched version from Debian and is in the "unpacked" state. The the new binaries are already installed, but the conffiles below /etc/ are not yet renamed from .dpkg-new to their final location. The newer grub-mkconfig does not like the grub.cfg generated by our patched config file, so this has been fixed. r19358 | Bug #53117: GRUB2 upgrade Package: grub2 Version: 2.02~beta3-5+deb9u2A~4.4.0.202104171136 Branch: ucs_4.4-0 Scope: ucs4.4-8 [4.4-8] 86563c994f Bug #53117: GRUB2 changelog doc/changelog/changelog-4.4-8.xml | 9 +++++++++ 1 file changed, 9 insertions(+) DONE: <https://jenkins.knut.univention.de:8181/view/Publish/job/Publish%20UCS%204%20to%20testing/3127/console> OK: Upgrade 4.4-7 → 4.4-8 → 5.0-0 (BIOS and UEFI-SB) OK: New installation with ucs_4.4-8-20210417-164826-dvd-amd64.iso
Reopen: grub-efi-amd64-signed needs to be updated
Created attachment 10693 [details] Screenshot broken 4.4-8 secure boot installation
[4.4-8] 7ba3e77784 Bug #53117: Bump version number for UCS 4.4-8 base/grub-efi-amd64-signed/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) Package: grub-efi-amd64-signed Version: 3.0.0-2A~4.4.0.202104191750 Branch: ucs_4.4-0 https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-8/job/BuildDVD/8/console OK: ucs_4.4-8-20210419-175224-dvd-amd64.iso
What I tested: Unsetting all grub colors via ucr now creates a valid grub.cfg -> OK Update -> OK UEFI -> OK UEFI + Secure boot installation from 4.4-8 cd -> OK
UCS 4.4-8 has been released: https://docs.software-univention.de/release-notes-4.4-8-en.html If this error occurs again, please use the 'Clone This Bug' option.