From bc1f503efa3e83339bf26a82a7e2d70c71d6a695 Mon Sep 17 00:00:00 2001 From: kneutron <50146127+kneutron@users.noreply.github.com> Date: Sun, 2 Jun 2024 12:25:01 -0600 Subject: [PATCH] Update mkgpt.sh --- ZFS/mkgpt.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ZFS/mkgpt.sh b/ZFS/mkgpt.sh index 252f99e..68838d7 100644 --- a/ZFS/mkgpt.sh +++ b/ZFS/mkgpt.sh @@ -2,8 +2,13 @@ # DEPENDS: smartctl, parted, fdisk +echo "Parameter: Supply short device name [sdb], etc" +echo "MAKE SURE you supply the right disk device - author takes NO RESPONSIBILITY for data loss!" +echo "Use at your own risk!" argg=$1 +[ $(which parted |wc -l) -gt 0 ] || apt-get install -y parted + #source ~/bin/failexit.mrg # failexit.mrg function failexit () { @@ -17,9 +22,11 @@ fdisk -l /dev/$argg ls -l /dev/disk/by-id |grep $argg -echo "THIS WILL DESTRUCTIVELY APPLY A GPT LABEL - ARE YOU SURE - PK OR ^C" +echo "THIS WILL DESTRUCTIVELY APPLY A GPT LABEL to /dev/$argg - ARE YOU SURE - Enter to proceed OR ^C" read parted -s /dev/$argg mklabel gpt || failexit 99 "! Failed to apply GPT label to /dev/$argg" fdisk -l /dev/$argg + +exit;