grml2iso: execute under pipefail Quoting from bash(1): | The return status of a pipeline is the exit status of the last | command, unless the pipefail option is enabled. If pipefail is enabled, | the pipeline's return status is the value of the last (rightmost) | command to exit with a non-zero status, or zero if all commands exit | successfully. Furthermore, move the "set -e" to the beginning of the file, to ensure it's active as soon as possible. While at it, drop trailing whitespace and update ISO name to a more recent one. This work was funded by Grml-Forensic.
grml2iso: support parallel execution Usage of a static working directory name doesn't make sense, and prevents usage running grml2iso multiple times in parallel. Instead use a temporary working directory. This work was funded by Grml-Forensic.
grml2iso: switch from isohybrid to xorriso/isohybrid to properly support EFI boot This is the related change for grml-live's commit 6725bfa1ffc4, where we introduced EFI support on 32bit systems and switched from isohybrid to xorriso/isohybrid combination. The isohybrid binary doesn't support 32-bit FI systems and fails hard when using `--uefi` on a 32-bit ISO. But xorriso with appropriate options for EFI usage (see $BOOT_ARGS) and /usr/lib/ISOLINUX/isohdpfx.bin from the isolinux package seems to provide everything we need. JFTR: To properly support 64bit EFI boot with our grml96 ISOs, we also had to adjust the order of the provided ISOs in the grml2iso command line in our release process. Closes: grml/grml#149
grml2iso: update ISO filename in usage example
Add syslinux-utils to Recommends + adjust error message for isohybrid isohybrid was moved from isolinux to syslinux-utils in Debian/jessie, see #751724
Fix logic of isohybrid execution if uefi option is not supported This fixes a problem which makes all 32bit Grml systems unbootable via grml2iso because uefi isn't supported there.
grml2iso: make sure we have the sbin directories in our PATH Under Debian/wheezy it fails out-of-the-box under sudo: | sudo /usr/sbin/grml2iso -c ./source/templates -o grml64-sipwise-release_20130626.iso grml64-full_2013.02.iso | Error: Could not find grml2usb executable. Is /usr/sbin missing in PATH? because of: | ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games in /etc/login.defs.
grml2iso: disable UEFI mode by default, only enable for xorriso under according prerequisites Getting an error message like: | isohybrid version supports --uefi option, enabling | Creating dd-able ISO using isohybrid | isohybrid: custom_grml.iso: unable to find efi image is quite confusing, especially if the /efi/boot/bootx64.efi and /boot/efi.img files are actually present on the image. When using xorriso everything is fine, but when using genisoimage within grml2iso the ISO lacks according UEFI support and the above mention error message appears. So instead only enable UEFI mode if building with xorriso and all the other prerequisites are fulfilled as well.
grml2iso: mention isolinux in 'isohybrid executable not found' message, add isolinux to recommends Binary package syslinux in version 3:4.05+dfsg-6+deb7u3 ships the isohybrid binary, but starting with version 3:6.00+dfsg-1 the isohybrid binary is part of the isolinux binary package...
grml2iso: extend error message of required ISO generation tools with xorriso
grml2iso: skip --uefi option of isohybrid if ISO doesn't ship /boot/efi.img Grml's 32bit ISOs don't provide /boot/efi.img, so there's no point in running isohybrid with its --uefi option then as this fails.
Normalize temporary working directory to not fail with relative directory path When invoking "grml2is -t tmpdir ..." then the kernel and initrd files receive a wrong leading directory path on the resulting ISO, leading to a broken ISO. Since specifying a relative path ("-t tmpdir" instead of "-t ${PWD}/tmpdir") should be possible as well let's just normalize it.
grml2iso: provide more user-friendly error message if grml2usb executable is not available
grml2iso: make sure to exit properly if provided argument to -c option does not exist Otherwise we're hiding the actual error message.
grml2iso: use absolute path for working directory to not fail when user specified relative path Otherwise using for example: | # grml2iso -t builddir ... fails with: | isohybrid version supports --uefi option, enabling | Creating dd-able ISO using isohybrid | isohybrid: [snip]/image.iso: unable to find efi image
grml2iso: make ISOs dd-able through isohybrid
grml2iso: support -t to set temporary working directory
grml2iso: fix typo + improve wording
grml2iso: use shell for calculation instead of using bc We are lacking a dependency on bc but there shouldn't be any reason why we'd have to use bc to calculate the cylinder foo, so let's just use the internal shell mechanism.
Support template parameters in overlay directory. For now only GRML_NAME, VERSION RELEASENAME DATE SHORT_NAME RELEASE_INFO and BOOTID are supported. As in grml-live grml2iso supports template filename as well which you will need for modifying file entries.