From a295930fe5f9986e0d63f3ba78ee64970f913680 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Sat, 31 Aug 2024 22:08:46 -0700 Subject: [PATCH] print out disk model and partition size in expand_rootfs script --- rootfs/usr/local/bin/expand_rootfs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rootfs/usr/local/bin/expand_rootfs b/rootfs/usr/local/bin/expand_rootfs index 19d3ee0..4569e8d 100755 --- a/rootfs/usr/local/bin/expand_rootfs +++ b/rootfs/usr/local/bin/expand_rootfs @@ -15,8 +15,10 @@ part_name="$(echo "$part_dev" | rev | cut -d'/' -f1 | rev)" part_num="$(cat /proc/partitions | grep "$part_name" | awk '{print $2}')" echo "Automatically detected root filesystem:" -echo "Disk: $disk_dev" -echo "Partition: $part_dev" +fdisk -l "$disk_dev" | grep "${disk_dev}:" -A 1 +echo +echo "Automatically detected root partition:" +fdisk -l "$disk_dev" | grep "${part_dev}" echo read -p "Press enter to continue, or ctr+c to cancel. "