From beb53ffad2e2f1525d04a7621817606b252e6954 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 21 Jan 2020 15:00:20 +0100 Subject: [PATCH] TT#73210 Use grml2usb v0.14.14 when handling grml64-small_2018.04.11-efi.iso grml2usb <=0.14.14 works when building with ISO grml64-small_2018.04.11-efi. Newer grml2usb versions provide SecureBoot support (which was introduced in grml2usb v0.16.0). This is failing with our grml64-small_2018.04.11-efi ISO though, because its provided EFI image doesn't contain a valid/mountable FAT file system: | % file /tmp/grml2iso.tmp/grml2usb55ey_q68/boot/efi.img | /tmp/grml2iso.tmp/grml2usb55ey_q68/boot/efi.img: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows Whereas the efi file from more recent Grml(-Sipwise) ISOs like https://deb.sipwise.com/deployment-iso/grml/grml-sipwise-buster-20191022_addons.iso looks like this: | % file /mnt/test1/boot/efi.img | /mnt/test1/boot/efi.img: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat", sectors/cluster 4, root entries 512, sectors 8192 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 6, sectors/track 32, heads 64, serial number 0xef681600, label: "GRML ", FAT (12 bit) and can be properly mounted for further adjusting by grml2usb/grml2iso. So use grml2usb version v0.17.0 except when handling ISO grml64-small_2018.04.11-efi ISO, then we use the version we had available on our Debian/stretch environments back then, AKA grml2usb v0.14.14. Change-Id: I452d7cbac138d59dc11fb1773ca3d6f6c307a6df (cherry picked from commit 608dd0367453242404e84bf0a8fc7d6fdb36d9b7) --- build_iso.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_iso.sh b/build_iso.sh index c3f3c18..14b615e 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -13,6 +13,7 @@ TEMPLATES="templates" GRML_URL="${GRML_URL:-https://deb.sipwise.com/files/grml/}" GRML_HASH_URL="${GRML_HASH_URL:-https://deb.sipwise.com/files/grml/}" SIPWISE_ISO="sip_provider_${MR}_${DATE}.iso" +GRML2USB_VERSION='v0.17.0' usage () { echo "Usage: $0 compat " @@ -46,6 +47,12 @@ else fi echo "*** Building ${MR} ISO ***" +case "${GRML_ISO}" in + grml64-small_2018.04.11-efi*) + GRML2USB_VERSION='v0.14.14' + echo "*** NOTE: identified Grml ISO ${GRML_ISO}, falling back to grml2usb version ${GRML2USB_VERSION} for building" + ;; +esac echo "*** Retrieving Grml ISO [${GRML_ISO}] ***" # shellcheck disable=SC2086 @@ -77,7 +84,6 @@ cp ${TEMPLATES}/boot/isolinux/isolinux.cfg ${TEMPLATES}/boot/isolinux/syslinux.c echo "*** Generating Sipwise ISO ***" if [[ ! -d grml2usb.git ]] ; then - GRML2USB_VERSION='v0.17.0' if ! git clone -b "${GRML2USB_VERSION}" --single-branch --depth 1 https://github.com/grml/grml2usb grml2usb.git ; then echo "Cloning grml2usb from github failed, falling back to git.grml.org" git clone -b "${GRML2USB_VERSION}" --single-branch --depth 1 git://git.grml.org/grml2usb.git