pkgs/grow-last-partition-and-filesystem: Automatically move GPT backup header to end of device
This commit is contained in:
@@ -11,6 +11,9 @@ fi
|
||||
|
||||
DEVICE="$1"
|
||||
|
||||
echo "Move GTP backup header to end of disk"
|
||||
sgdisk "${DEVICE}" --move-second-header
|
||||
|
||||
PARTITIONDATA="$(parted --script --json --fix "${DEVICE}" print)"
|
||||
PARTNUMBER="$(echo "${PARTITIONDATA}" | jq -r '.disk.partitions | last | .number')"
|
||||
PARTNAME="$(echo "${PARTITIONDATA}" | jq -r '.disk.partitions | last | .name')"
|
||||
|
Reference in New Issue
Block a user