Skip to content

Instantly share code, notes, and snippets.

@KAMEDAkyosuke
Created March 4, 2020 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KAMEDAkyosuke/86c5c46d408af7cd7a97d72549b0ae01 to your computer and use it in GitHub Desktop.
Save KAMEDAkyosuke/86c5c46d408af7cd7a97d72549b0ae01 to your computer and use it in GitHub Desktop.
target_end=$(($(cat "/sys/block/mmcblk0/size") - 1))
sudo parted -m /dev/mmcblk0 u s resizepart 2 $target_end
sudo resize2fs /dev/mmcblk0p2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment