X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=9e53c466d7f5f301b9d3c1faa524a8b8f349ad05;hp=5cd58805ef16865b2273aafaf24647bf5d717ecb;hb=ddbbaaae48f26746c630a193e4894533116d2d01;hpb=5c3e795e201f2109ca49ecbdea8feb09b692a117 diff --git a/grml-live b/grml-live index 5cd5880..9e53c46 100755 --- a/grml-live +++ b/grml-live @@ -974,7 +974,7 @@ grub_setup() { ;; *) log "Secure Boot method '${SECURE_BOOT}' is unsupported." - error "Secure Boot method '${SECURE_BOOT}' is unsupported." ; eend 1 + eerror "Secure Boot method '${SECURE_BOOT}' is unsupported." ; eend 1 bailout 59 ;; esac @@ -1123,12 +1123,16 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then log "Skipping installation of boot addons as requested via \$NO_ADDONS." einfo "Skipping installation of boot addons as requested via \$NO_ADDONS."; eend 0 else - if ! [ -d "$TEMPLATE_DIRECTORY"/boot/addons ] ; then + if ! [ -r "$TEMPLATE_DIRECTORY"/boot/addons ] ; then log "Boot addons not found, skipping therefore. (Consider installing package grml-live-addons)" ewarn "Boot addons not found, skipping therefore. (Consider installing package grml-live-addons)" ; eend 0 else + log "Installing boot addons." + einfo "Installing boot addons." + # copy addons from system packages or grml-live-addons copy_addon_file ipxe.lkrn /usr/lib/ipxe addons + copy_addon_file ipxe.efi /usr/lib/ipxe addons copy_addon_file pci.ids /usr/share/misc addons copy_addon_file memtest86+.bin /boot addons @@ -1145,6 +1149,8 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then copy_addon_file memdisk /usr/lib/syslinux addons + eend 0 + # make memtest filename FAT16/8.3 compatible mv "${BUILD_OUTPUT}/boot/addons/memtest86+.bin" \ "${BUILD_OUTPUT}/boot/addons/memtest" @@ -1379,8 +1385,8 @@ else # use sane defaults if $SQUASHFS_OPTIONS isn't set if [ -z "$SQUASHFS_OPTIONS" ] ; then - # use blocksize 256k as this gives best result with regards to time + compression - SQUASHFS_OPTIONS="-b 256k" + # use block size 1m as this gives good result with regards to time + compression + SQUASHFS_OPTIONS="-b 1m" # set lzma/xz compression by default, unless -z option has been specified on command line if [ -z "$SQUASHFS_ZLIB" ] ; then @@ -1576,14 +1582,8 @@ else [ "$RC" = 0 ] && \ ( if cd $ISO_OUTPUT ; then - md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \ - touch -r ${ISO_NAME} ${ISO_NAME}.md5 - sha1sum ${ISO_NAME} > ${ISO_NAME}.sha1 && \ - touch -r ${ISO_NAME} ${ISO_NAME}.sha1 sha256sum ${ISO_NAME} > ${ISO_NAME}.sha256 && \ touch -r ${ISO_NAME} ${ISO_NAME}.sha256 - sha512sum ${ISO_NAME} > ${ISO_NAME}.sha512 && \ - touch -r ${ISO_NAME} ${ISO_NAME}.sha512 fi ) ;; @@ -1605,7 +1605,7 @@ fi # netboot package {{{ create_netbootpackage() { - local OUTPUT_FILE="${NETBOOT}/grml_netboot_package_${GRML_NAME}_${VERSION}.tar.bz2" + local OUTPUT_FILE="${NETBOOT}/grml_netboot_package_${GRML_NAME}_${VERSION}.tar" if [ -f "${OUTPUT_FILE}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then log "Skipping stage 'netboot' as $OUTPUT_FILE exists already." @@ -1660,12 +1660,57 @@ create_netbootpackage() { eoutdent fi - if tar -C "$OUTPUTDIR" -jcf "${OUTPUT_FILE}" "grml_netboot_package_${GRML_NAME}_${VERSION}" ; then + # don't include shim + grubnetx64 + grub files in i386 netboot packages, + # as those don't make much sense there + if [ "$ARCH" = amd64 ] ; then + if ! [ -r "${BUILD_OUTPUT}/boot/grub/netboot.cfg" ] ; then + log "File ${BUILD_OUTPUT}/boot/grub/netboot.cfg not found." + ewarn "File ${BUILD_OUTPUT}/boot/grub/netboot.cfg not found." + eindent + log "Hint: Are you using custom templates which do not provide grub.cfg?" + ewarn "Hint: Are you using custom templates which do not provide grub.cfg?" ; eend 0 + eoutdent + else + cp "${BUILD_OUTPUT}/boot/grub/netboot.cfg" "${WORKING_DIR}/grub.cfg" + adjust_boot_files "${WORKING_DIR}/grub.cfg" + + if [ -r "${CHROOT_OUTPUT}"/usr/lib/shim/shimx64.efi.signed ] ; then + log "Installing ${CHROOT_OUTPUT}/usr/lib/shim/shimx64.efi.signed as shim.efi in netboot package" + cp "${CHROOT_OUTPUT}"/usr/lib/shim/shimx64.efi.signed "${WORKING_DIR}"/shim.efi + elif [ -r "${CHROOT_OUTPUT}"/usr/lib/shim/shimx64.efi ] ; then + log "Installing ${CHROOT_OUTPUT}/usr/lib/shim/shimx64.efi as shim.efi in netboot package" + cp "${CHROOT_OUTPUT}"/usr/lib/shim/shimx64.efi "${WORKING_DIR}"/shim.efi + else + log "No shimx64.efi for usage with PXE boot found (shim-signed not present?)" + ewarn "No shimx64.efi for usage with PXE boot found (shim-signed not present?)" ; eend 0 + fi + + if [ -r /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed ] ; then + log "Installing /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed as grubx64.efi in netboot package" + cp /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed "${WORKING_DIR}"/grubx64.efi + elif [ -r /usr/lib/grub/x86_64-efi/monolithic/grubnetx64.efi ] ; then + log "Installing /usr/lib/grub/x86_64-efi/monolithic/grubnetx64.efi as grubx64.efi in netboot package" + cp /usr/lib/grub/x86_64-efi/monolithic/grubnetx64.efi "${WORKING_DIR}"/grubx64.efi + else + log "No grubnetx64.efi for usage with PXE boot found (grub-efi-amd64-signed not present?)" + ewarn "No grubnetx64.efi for usage with PXE boot found (grub-efi-amd64-signed not present?)." ; eend 0 + fi + + if [ -r "${CHROOT_OUTPUT}"/usr/share/grub/unicode.pf2 ] ; then + log "Installing ${CHROOT_OUTPUT}/usr/share/grub/unicode.pf2 as grub/fonts/unicode.pf2 in netboot package" + mkdir -p "${WORKING_DIR}"/grub/fonts/ + cp "${CHROOT_OUTPUT}"/usr/share/grub/unicode.pf2 "${WORKING_DIR}"/grub/fonts/ + else + log "No unicode.pf2 for usage with PXE boot found (grub-common not present?)" + ewarn "No unicode.pf2 for usage with PXE boot found (grub-common not present?)" ; eend 0 + fi + fi + fi + + if tar -C "$OUTPUTDIR" -cf "${OUTPUT_FILE}" "grml_netboot_package_${GRML_NAME}_${VERSION}" ; then ( cd $(dirname "${OUTPUT_FILE}") - sha1sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha1" sha256sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha256" - sha512sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha512" ) einfo "Generated netboot package ${OUTPUT_FILE}" ; eend 0 rm -rf "${OUTPUTDIR}"