aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-17 15:15:14 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-17 15:15:14 +0100
commita68d373406f5f851af92de1cf8088ec2d15e65aa (patch)
tree143c50fd42b4e0e22ae60c9e87a7fbc0338fe1f1
parentTrying wipefs (diff)
downloadarch-installer-a68d373406f5f851af92de1cf8088ec2d15e65aa.tar.gz
arch-installer-a68d373406f5f851af92de1cf8088ec2d15e65aa.tar.bz2
arch-installer-a68d373406f5f851af92de1cf8088ec2d15e65aa.tar.xz
arch-installer-a68d373406f5f851af92de1cf8088ec2d15e65aa.tar.zst
arch-installer-a68d373406f5f851af92de1cf8088ec2d15e65aa.zip
changes, should whipe out partitions as well
-rwxr-xr-xjoes-arch-install-UEFI.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/joes-arch-install-UEFI.sh b/joes-arch-install-UEFI.sh
index 8ced21c..d932b38 100755
--- a/joes-arch-install-UEFI.sh
+++ b/joes-arch-install-UEFI.sh
@@ -365,7 +365,15 @@ echo "\
# #
#=================================#"
echo && echo
-dd if=/dev/zero of="$drv" bs=512 count=1 > /dev/null
+basepartc=$(lsblk "$drv" | grep -c part)
+i=1
+while [[ $i -le $basepartc ]]; do
+ towhipe=$(lsblk "$drv" | grep part | awk '{print $1}' | rev | cut -c -1 | rev | awk "NR==$i")
+ dd if=/dev/zero of="$drv$towhipe" bs=1M status=progress
+ ((i++))
+done
+echo "Whiping disk. This step may take a while."
+dd if=/dev/zero of="$drv" bs=1M status=progress
wipefs --all --force "$drv"
fdisk "$drv" << FDISK_INPUT
o