Hi Nation,
I took the script from @mvught from here and changed it a bit, see below. The idea is to delete the recovery partition and merge it with the main partition.
When I run it 'after', it doesn't work, when I run it on 'reboot', it works perfectly.
any ideas?
#Find the boot partition and recovery partition
main=$(diskutil list internal | grep Apple_HFS | grep -v Data | grep -v iMac2 | awk '{print ($6)}');
recovery=$(diskutil list | grep "Recovery HD" |awk '{print ($7)}');
#This will merge the two partitions, with Apple_HFS absorbing the space from Recovery HD and expanding, it causes no data loss on the Apple_HFS disk.
sudo diskutil eraseVolume JHFS+ Blank $recovery ;
sudo diskutil mergePartitions JHFS+ iMac $main $recovery ;
thanks