usbinstall.sh: clear data between 512B and 1MiB to fix grub-install error when old GPT table was present

This commit is contained in:
Silvan Calarco 2016-10-24 17:51:06 +02:00
parent e7df8646af
commit ad5481aa1e

View File

@ -209,6 +209,8 @@ fi
set_status $"Partitioning $SELECT_USB..." set_status $"Partitioning $SELECT_USB..."
echo $"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 # Start from a new partition table
sudo parted -s $SELECT_USB mktable msdos &>>$LOGFILE sudo parted -s $SELECT_USB mktable msdos &>>$LOGFILE
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then