X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-live;h=fb4115a9d725a98c8ec0e27ccc32e598f7396bd1;hb=895b6b6202b913147e0b583523c6f174f93fdad4;hp=fca46138201aa38ca9c02621bd2df1f8a202fe39;hpb=f925961e2af03ee9f646b099c3bc4fc3e82b052b;p=grml-live.git diff --git a/grml-live b/grml-live index fca4613..fb4115a 100755 --- a/grml-live +++ b/grml-live @@ -152,6 +152,7 @@ umount_all() { # make sure we don't leave any mounts - FAI doesn't remove them always umount $CHROOT_OUTPUT/proc/sys/fs/binfmt_misc 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/proc 2>/dev/null || /bin/true + umount $CHROOT_OUTPUT/run 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/sys 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev/pts 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev 2>/dev/null || /bin/true @@ -824,6 +825,17 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then bailout 11 fi + # EFI boot files + if [ -r "${CHROOT_OUTPUT}/boot/efi.img" -a -r "${CHROOT_OUTPUT}/boot/bootx64.efi" ] ; then + einfo "Moving EFI boot files into ISO path." + log "Moving EFI boot files into ISO path." + RC=$0 + mv "${CHROOT_OUTPUT}/boot/efi.img" "${BUILD_OUTPUT}/boot/" || RC=$? + mkdir -p "${BUILD_OUTPUT}/efi/boot/" || RC=$? + mv "${CHROOT_OUTPUT}/boot/bootx64.efi" "${BUILD_OUTPUT}/efi/boot/bootx64.efi" || RC=$? + eend $? + fi + [ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' if ! [ -d "${TEMPLATE_DIRECTORY}"/boot ] ; then log "Error: ${TEMPLATE_DIRECTORY}/boot does not exist. Exiting." @@ -891,6 +903,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/*-pc/*.lst "${BUILD_OUTPUT}"/boot/grub/ cp -a "${CHROOT_OUTPUT}"/usr/share/grub/ascii.pf2 "${BUILD_OUTPUT}"/boot/grub/ cp -a "${CHROOT_OUTPUT}"/boot/grub/core.img "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/boot/grub/grub.img "${BUILD_OUTPUT}"/boot/grub/ if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then log "Error: ${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting." @@ -1204,47 +1217,28 @@ else bailout fi - case "$ARCH" in - amd64) - # using -eltorito-alt-boot is limited to xorriso for now - case "$MKISOFS" in - xorriso*) - einfo "Using xorriso for ISO generation." ; eend 0 - eindent - - if ! dpkg --compare-versions $(dpkg-query -W -f='${Version}\n' xorriso 2>/dev/null) gt-nl 1.1.6-1 ; then - log "Disabling (U)EFI boot support because xorriso version is too old." - ewarn "Disabling (U)EFI boot support because xorriso version is too old." ; eend 0 - else - if [ -r "${CHROOT_OUTPUT}/boot/efi.img" ] ; then - einfo "Found /boot/efi.img - using for ISO." - log "Found /boot/efi.img - using for ISO." - cp "${CHROOT_OUTPUT}/boot/efi.img" "${BUILD_OUTPUT}/boot/efi.img" - eend $? - fi - - if [ -r "${CHROOT_OUTPUT}/boot/bootx64.efi" ] ; then - einfo "Found /boot/bootx64.efi - using as /efi/boot/bootx64.efi for ISO." - log "Found /boot/bootx64.efi - using as /efi/boot/bootx64.efi for ISO." - mkdir -p "${BUILD_OUTPUT}/efi/boot/" - cp "${CHROOT_OUTPUT}/boot/bootx64.efi" "${BUILD_OUTPUT}/efi/boot/bootx64.efi" - eend $? - fi - - if [ -r "${BUILD_OUTPUT}"/boot/efi.img ] ; then - einfo "/boot/efi.img found and amd64 architecture present, extending boot arguments." - log "/boot/efi.img found and amd64 architecture present, extending boot arguments." - BOOT_ARGS="$BOOT_ARGS -boot-info-table -eltorito-alt-boot -e boot/efi.img -no-emul-boot" - eend $? - else - log "Disabling (U)EFI boot support because /boot/efi.img is missing." - ewarn "Disabling (U)EFI boot support because /boot/efi.img is missing." ; eend 0 - fi - fi + einfo "Using ${MKISOFS} to build ISO." ; eend 0 + case "${ARCH}-${MKISOFS}" in + # using -eltorito-alt-boot is limited to xorriso for now + amd64-xorriso*) + eindent + + if ! dpkg --compare-versions $(dpkg-query -W -f='${Version}\n' xorriso 2>/dev/null) gt-nl 1.1.6-1 ; then + log "Disabling (U)EFI boot support because xorriso version is too old." + ewarn "Disabling (U)EFI boot support because xorriso version is too old." ; eend 0 + else + if [ -r "${BUILD_OUTPUT}"/boot/efi.img ] ; then + einfo "Enabling (U)EFI boot." + log "Enabling (U)EFI boot." + BOOT_ARGS="$BOOT_ARGS -boot-info-table -eltorito-alt-boot -e boot/efi.img -no-emul-boot" + eend $? + else + log "Disabling (U)EFI boot support because /boot/efi.img is missing." + ewarn "Disabling (U)EFI boot support because /boot/efi.img is missing." ; eend 0 + fi + fi - eoutdent - ;; - esac + eoutdent ;; esac