From 0ad2c2dbdb9c32b7c58392b7fe28447636685a61 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Thu, 16 Apr 2015 15:24:01 +0100 Subject: [PATCH] Fix up the partitioning for arm64 images so USB will work again This code was using "-efi-boot-part", which works fine for booting but creates images that d-i can't use: only the full disk or the ESP partition would contain working filesystems, and d-i doesn't like that. Instead, switch to appending the ESP as an extra partition on the end of the image. This will take a small amount of extra space, but will at least work reliably! --- tools/boot/jessie/boot-arm64 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/boot/jessie/boot-arm64 b/tools/boot/jessie/boot-arm64 index 30f929c3..5cd35da8 100755 --- a/tools/boot/jessie/boot-arm64 +++ b/tools/boot/jessie/boot-arm64 @@ -113,11 +113,15 @@ if [ -d boot$N/grub ] ; then exit 1; elif [ $XORRISO_VER -gt 10202 ] ; then echo "Using newer EFI support in xorriso $XORRISO_VER" - # marks the first EFI El Torito boot image as a partition in GPT - add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-efi-boot-part --efi-boot-image" # Location of the EFI boot image, and don't emulate a floppy or HD add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot" + + # Add an *extra* partition on the end for the EFI bits + add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0xef $CDDIR/boot/grub/efi.img" + + # And force alignment + add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_cyl_align all" fi # Finally, belt and braces - fix up the %install% entries in grub