Hi all - saw some similar posts to this but nothing that does exactly what I need. I have two partitions, Restore (disk0s3/10GB) and MacHD (disk0s2/the rest of the free space). I need a script that will resize the Restore Partition to 25GB without touching the MacHD. Problem is, when I use resizeVolume it messes up the GPT, and throws up an error "MediaKit reports partition map too small". Trying to use gpt to fix/recreate it but it doesn't work. Here is what my script say right now:
diskutil umount /dev/disk0s3
gpt -r show /dev/disk0
gpt remove -i 3 /dev/disk0 #errors are thrown up around here...
gpt create -f /dev/disk0s3
gpt add -i 3 -s 52428800 /dev/disk0s3
diskutil resizeVolume /dev/disk0s3 25G
What am I missing? Sorry, I am more or less a script n00b