X-Git-Url: http://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=151e464d19b5d7a9fabc8784a02eb40723c6ab0c;hp=498a535ca2253d9d94a54a5187bc1f02f22b6d38;hb=7ed30144c35faf480529030343bd200ae44301a1;hpb=09667d4a67057707f959e2b667ad4d7da36fd2b3 diff --git a/grml-live b/grml-live index 498a535..151e464 100755 --- a/grml-live +++ b/grml-live @@ -1088,19 +1088,28 @@ else fi # by default use our manifold boot method: else + # isoinfo is part of both mkisofs and genisoimage so we're good + bootoff=$(isoinfo -l -i "${ISO_OUTPUT}/${ISO_NAME}" | \ + sed -n '/^.*\[ *\([0-9]*\)[] ].* ISOLINUX.BIN;1 *$/s//\1/p') if ! [ -r boot/grub/core.img ] ; then ewarn "boot/grub/core.img not found, not creating manifold boot ISO file" + elif [ $bootoff -lt 1 ] ; then + ewarn "isolinux.bin not found on the ISO file, disabling manifold boot" else log "Creating hybrid ISO file with manifold method" einfo "Creating hybrid ISO file with manifold method" - ( + if [ "$HYBRID_METHOD" = "grub2" ] ; then # 512 bytes: MBR, partition table, load GRUB 2 echo 4 63 | mksh /usr/share/grml-live/scripts/bootgrub.mksh -A -M 4:0x96 -g $cyls:16:32 # pad to a whole of 2048 bytes (one CD sector) dd if=/dev/zero bs=512 count=3 2>/dev/null # append GRUB 2 (must be <=30720 bytes) cat boot/grub/core.img - ) | dd of="${ISO_OUTPUT}/${ISO_NAME}" conv=notrunc 2>/dev/null + else + # read only one but 2048-byte sized (scale: << 2) sector + echo $bootoff $bootoff | \ + mksh /usr/share/grml-live/scripts/bootilnx.mksh -A -M 4:0x96 -g $cyls:16:32 -S 2 + fi | dd of="${ISO_OUTPUT}/${ISO_NAME}" conv=notrunc 2>/dev/null eend $? fi fi