Merge pull request #2957 from chewitt/fs-resize

busybox: don't fix GPT tables when partition scheme is MBR
This commit is contained in:
CvH 2018-09-10 15:08:31 +02:00 committed by GitHub
commit 6ecbcd284a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,8 +48,11 @@ if [ -e /storage/.please_resize_me ] ; then
echo "Please do not reboot or turn off your @DISTRONAME@ device!"
echo ""
# fix any minor issues, such as gpt header not at end of disk
# identify the partition scheme, and if gpt fix minor issues such as gpt header not at end of disk
SCHEME=$(blkid -s PTTYPE -o value $DISK)
if [ "$SCHEME" = "gpt" ]; then
StartProgress spinner "Checking layout... " "sgdisk -e $DISK &>/dev/null"
fi
StartProgress spinner "Deleting /storage... " "parted -s -m $DISK rm 2 &>/dev/null"
StartProgress spinner "Creating /storage... " "parted -s -m $DISK unit b mkpart primary $PART_START 100% &>/dev/null"