From ad5481aa1eacbb8d488eb88882171bdb2f794c89 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 24 Oct 2016 17:51:06 +0200 Subject: [PATCH] usbinstall.sh: clear data between 512B and 1MiB to fix grub-install error when old GPT table was present --- src/usbinstall.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usbinstall.sh b/src/usbinstall.sh index 2dd1378..0e86df8 100644 --- a/src/usbinstall.sh +++ b/src/usbinstall.sh @@ -209,6 +209,8 @@ fi set_status $"Partitioning $SELECT_USB..." echo $"Partitioning $SELECT_USB..." +# Wipe any old GPT table or grub-install may fail due to mmultiple partition labels +sudo dd if=/dev/zero of=$SELECT_USB bs=512 count=2047 skip=1 # Start from a new partition table sudo parted -s $SELECT_USB mktable msdos &>>$LOGFILE if [ "$?" != "0" ]; then