Created
January 29, 2021 11:28
-
-
Save hervenivon/4cf6e9d86c054aaa042030aff804e61a to your computer and use it in GitHub Desktop.
A script to expand the APFS container on the boot volume with AWS EC2 Mac Instance
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/bash | |
PDISK=$(diskutil list physical external | head -n1 | cut -d' ' -f1) | |
APFSCONT=$(diskutil list physical external | grep Apple_APFS | tr -s ' ' | cut -d' ' -f8) | |
sudo diskutil repairDisk $PDISK | |
sudo diskutil apfs resizeContainer $APFSCONT 0 | |
# https://derflounder.wordpress.com/2020/12/19/resizing-an-aws-macos-ec2-instances-boot-drive-to-use-all-available-disk-space/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment