From b41ebd860764321c1013e31aa1fd448c8b6cc7bd Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Tue, 10 May 2016 01:26:05 +0100 Subject: [PATCH] Add workaround for dosfstools issue (#823881) --- debian/changelog | 1 + tools/boot/stretch/boot-arm64 | 7 ++++--- tools/boot/stretch/boot-x86 | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 11b79973..ed37fce4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ debian-cd (3.1.19) UNRELEASED; urgency=medium [ Steve McIntyre ] * Also fix size calculation for EFI image for arm64 + * Add workaround for dosfstools issue (#823881) -- Steve McIntyre <93sam@debian.org> Fri, 06 May 2016 22:59:32 +0100 diff --git a/tools/boot/stretch/boot-arm64 b/tools/boot/stretch/boot-arm64 index ac36c8b0..ea4a46e8 100755 --- a/tools/boot/stretch/boot-arm64 +++ b/tools/boot/stretch/boot-arm64 @@ -127,12 +127,13 @@ if [ -d boot$N/grub ] ; then block_bytes=1024 blocks=$(($tracks * $track_bytes / $block_bytes)) - rm -f $CDDIR/boot/grub/efi.img - mkfs.msdos -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null + # Workaround for #823881: + export MTOOLS_SKIP_CHECK=1 mmd -i "$CDDIR/boot/grub/efi.img" ::efi mmd -i "$CDDIR/boot/grub/efi.img" ::efi/boot - mcopy -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \ + mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \ "::efi/boot" + unset MTOOLS_SKIP_CHECK # Ugh - different code here depending on the version of xorriso we've got if [ $XORRISO_VER -le 10202 ] ; then diff --git a/tools/boot/stretch/boot-x86 b/tools/boot/stretch/boot-x86 index 9e29fd31..957944e7 100644 --- a/tools/boot/stretch/boot-x86 +++ b/tools/boot/stretch/boot-x86 @@ -515,11 +515,14 @@ if [ -d boot$N/isolinux/grub ] && [ $BOOT_EFI -ne 0 ] ; then blocks=$(($tracks * $track_bytes / $block_bytes)) rm -f $CDDIR/boot/grub/efi.img - mkfs.msdos -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null + mkfs.msdos -v -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null + # Workaround for #823881: + export MTOOLS_SKIP_CHECK=1 mmd -i "$CDDIR/boot/grub/efi.img" ::efi mmd -i "$CDDIR/boot/grub/efi.img" ::efi/boot mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \ "::efi/boot" + unset MTOOLS_SKIP_CHECK if [ $BOOT_EFI = 2 ] ; then # We're being added alongside (after) a BIOS boot record. Tell