From 8f6d1ec3f4e5fb5ef2ada0c4068136fd8076301b Mon Sep 17 00:00:00 2001 From: smu Date: Fri, 8 Sep 2023 21:31:14 +0200 Subject: [PATCH] use 'p' a partition table suffix if $DEV is NVME --- installstick/dlg_platte_bespielen_btrfs.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/installstick/dlg_platte_bespielen_btrfs.sh b/installstick/dlg_platte_bespielen_btrfs.sh index 6e7887d..9a3720f 100755 --- a/installstick/dlg_platte_bespielen_btrfs.sh +++ b/installstick/dlg_platte_bespielen_btrfs.sh @@ -61,6 +61,12 @@ echo "Warte 2 Sekunden vor dem löschen, abbrechen mit strg + c..." sleep 2 echo "Achtung - vorbei, ich mache jetzt alles platt auf" "${DEV}" +NVME_PARTITION_SUFFIX='' +if [[ "$DEV" == *"nvme"* ]]; then + echo "$DEV is NVME device" + NVME_PARTITION_SUFFIX='p' +fi + case "$IMG" in *.bz2) sudo dd if="$IMG" bs=1M status=progress | bzip2 -d > "$DEV" @@ -71,7 +77,7 @@ case "$IMG" in esac sync sudo growpart $DEV 3 -sudo mount ${DEV}3 /mnt +sudo mount ${DEV}${NVME_PARTITION_SUFFIX}3 /mnt sudo btrfs filesystem resize max /mnt sudo umount /mnt sync