Last active
February 3, 2018 20:09
-
-
Save rakor/3aec8c23a61f36734bbe20bdd637351f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DEVICE=mmcblk0 | |
PARTITIONNUMBER=2 | |
ROOTPART="$DEVICE"p"$PARTITIONNUMBER" | |
DEVMAXSIZE=$(cat "/sys/block/$DEVICE/size") | |
ROOTEND=$((DEVMAXSIZE -1)) | |
parted -m "/dev/$DEVICE" u s resizepart $PARTITIONNUMBER yes "$ROOTEND" | |
partprobe "/dev/$DEVICE" | |
resize2fs "/dev/$ROOTPART" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment