@@ -931,7 +931,7 @@ generate_build_info() {
931931# }}}
932932
933933# ISO_OUTPUT - iso build {{{
934- [ -n " $ISO_NAME " ] || ISO_NAME=" ${GRML_NAME} _${VERSION} .iso "
934+ [ -n " $ISO_NAME " ] || ISO_NAME=" ${GRML_NAME} _${VERSION} .img "
935935
936936BOOT_ARGS=" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -isohybrid-mbr ${CHROOT_OUTPUT} /usr/lib/ISOLINUX/isohdpfx.bin"
937937EFI_ARGS=" -eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat"
@@ -954,14 +954,20 @@ else
954954
955955 cap_timestamps " $BUILD_OUTPUT "
956956
957- log " $XORRISO_BINARY -as mkisofs -V '${GRML_NAME} ${VERSION} ' -publisher 'grml-live | grml.org' -l -r -J $BOOT_ARGS $EFI_ARGS -o ${ISO_OUTPUT} /${ISO_NAME} ."
958- einfo " Generating ISO file..."
959- touch -d @" $SOURCE_DATE_EPOCH " " $BUILD_OUTPUT " /
960- # shellcheck disable=SC2086 # BOOT_ARGS and EFI_ARGS need splitting
961- " $XORRISO_BINARY " -as mkisofs -V " ${GRML_NAME} ${VERSION} " -publisher ' grml-live | grml.org' \
962- -l -r -J $BOOT_ARGS $EFI_ARGS \
963- -o " ${ISO_OUTPUT} /${ISO_NAME} " " $BUILD_OUTPUT " / ; RC=$?
964- eend $RC
957+ einfo " Generating ext4 disk image..."
958+ /sbin/mke2fs -q -F -o Linux -E offset=16777216 -T ext4 -b 4096 -d " $BUILD_OUTPUT " / " ${ISO_OUTPUT} /${ISO_NAME} " 260000
959+ eend $?
960+ einfo " Resizing disk image to make space for MBR..."
961+ truncate --size=+512 " ${ISO_OUTPUT} /${ISO_NAME} "
962+ eend $?
963+ einfo " Making MBR ..."
964+ MBRTMP=$( mktemp)
965+ echo ' label: dos
966+ start=32768, size=2080000, type=83' > " $MBRTMP "
967+ cat " $MBRTMP "
968+ /sbin/sfdisk " ${ISO_OUTPUT} /${ISO_NAME} " < " $MBRTMP "
969+ eend $?
970+ rm -f " $MBRTMP "
965971
966972 # do not continue on errors, otherwise we might generate/overwrite the ISO with dd if=... stuff
967973 if [ " $RC " != 0 ] ; then
0 commit comments