Lion Recovery Partition Deletion Script?

Matt
Valued Contributor

Has anyone here developed a script to remove the hidden Lion Recovery Partition???

--
Matt Lee, CCA/ACMT/ACPT/ACDT
Senior IT Analyst / Desktop Architecture Team / Apple S.M.E / JAMF Casper Administrator
Fox Networks Group

4 REPLIES 4

Jak
New Contributor III

Script, no, but diskutil should do what you need.

Not applicable

You'd need to put Disk Utility into debug mode to be able to see the Lion partition to then be able to remove it.

Diskutil –list will show "Recovery HD" however.

GL.

Rhys.

ernstcs
Contributor III

I know this post is old, but I figured it was worth putting the info here anyway. This was my quick and dirty script and only applies if the OS is loaded on the main disk. Use at your own risk.

#!/bin/sh
/usr/sbin/asr adjust -target /dev/disk0s3 -settype Apple_HFS
/usr/sbin/diskutil mergePartitions HFS+ 'Macintosh HD' disk0s2 disk0s3

ernstcs
Contributor III

And as well I will link back to martin's other post as well, which is better than my script. Tidying things up here.

https://jamfnation.jamfsoftware.com/discussion.html?id=3075