From 864930baf17782129b43dad6f28648cbb73853c6 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 25 Jun 2020 19:14:50 +0200 Subject: iso2usb.sh: really wipe the drive first When a Live ISO is first copied to a USB drive using 'cp' or 'dd' and next you use iso2usb.sh to remake the USB drive into a persistent Live OS, traces of the old ISO9660 filesystem will remain and this confuses grub when you boot on a UEFI computer. So we will additionally use 'wipefs' to erase traces of filesystems. In the help text, make it clear that '-c' and '-C' accept only integer numbers for sizes and percentages. This is caused by a bash limitation in arithmetics. --- iso2usb.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/iso2usb.sh b/iso2usb.sh index 23ecd32..cd485ee 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -80,7 +80,7 @@ DOLUKS=0 REFRESH=0 # These tools are required by the script, we will check for their existence: -REQTOOLS="blkid cpio extlinux fdisk gdisk isoinfo lsblk mkdosfs sgdisk syslinux" +REQTOOLS="blkid cpio extlinux fdisk gdisk isoinfo lsblk mkdosfs sgdisk syslinux wipefs" # Path to syslinux files: if [ -d /usr/share/syslinux ]; then @@ -156,8 +156,9 @@ cat <