Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
With the new 10.9 beta installer, a recovery partition is not created if you use a DIY USB installer. The reason for that is because the BaseSystem.dmg needs to be copied onto the Recovery partition, but it does not exist as a dmg file on the USB Installer. This presents a problem for some, as functions like "Find My Mac" and FileVault won't work without it. Here are the instructions to fix that. I am not responsible for your system... Blah blah blah normal disclaimer. It will not break Boot Camp so no worries there.

Standard Recovery Partition(UPDATED EASIER!!!)

1. Download the Lion Recovery Update. Make sure it is in your downloads folder. Then right click on the OS X Installer.app file and click Show Package Contents. Go to Contents/SharedSupport/. Copy the InstallESD.dmg file into your Downloads folder.

###Alternate Lion Recovery HD Update Link

2. Copy the following code into a text document and save it as "recovery.sh" in your Downloads folder.
Code:
read -p "Ensure "RecoveryHDUpdate.dmg" and "InstallESD.dmg" are in your Downloads folder and press [Enter]"

#access dmtest from RecoveryHDUpdate.pkg
rm -rf /private/tmp/RecoveryHDUpdate
echo "Expanding RecoveryHDUpdate.pkg"
hdiutil attach -nobrowse ~/Downloads/RecoveryHDUpdate.dmg
pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/RecoveryHDUpdate

#access BaseSystem.dmg and BaseSystem.chunklist
echo "Expanding InstallESD.dmg"
hdiutil attach -nobrowse ~/Downloads/InstallESD.dmg

#build Recovery partition
echo "Building Recovery Partition. Please Wait"
/tmp/RecoveryHDUpdate/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition / /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg 0 0 /Volumes/OS\ X\ Install\ ESD/BaseSystem.chunklist

#cleanup
echo "Cleaning up"
hdiutil eject /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update
hdiutil eject /Volumes/OS\ X\ Install\ ESD/
sudo touch /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
sudo kextcache -f -u /
exit 0

3. Open Terminal and type the following commands:
Code:
chmod +x ~/Downloads/recovery.sh
sudo ~/Downloads/recovery.sh

4. Wait a few minutes for it to finish and return back to a prompt. Reboot to test your new recovery partition.
 
Last edited:

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
Instructions significantly simplified. I took down the instructions for the full offline installer. Some kind of signature check is performed, so modifying the Recovery partition breaks it. I can get it to boot to a working offline installer, but it stops being recognized as a proper recovery partition.
 

Macman45

macrumors G5
Jul 29, 2011
13,197
135
Somewhere Back In The Long Ago
For the first time in years, I don't have a "Spare" Mac but I wish I did....with just my Imac and my rMBP, both of which are essential to me, I can't play with 10.9 yet, but it looks a lot more interesting than previous incarnations since SL.
 

richard6r

macrumors regular
Jun 11, 2013
136
33
Great post! Wish I would've seen it earlier... took the easy way out and ran the installer from inside os x and it created the recovery partition that way. :apple:
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
Great post! Wish I would've seen it earlier... took the easy way out and ran the installer from inside os x and it created the recovery partition that way. :apple:

Didn't even know that was an option. Still, there are certain instances where the installer refuses to make a recovery partition. Usually because of odd hard drive or partition setups. This gets around that.
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
The standard Apple textedit app. I set it to plain text in preferences and it works fine now :) Thanks for your help.

Glad it worked! I kind of figured it was something like that. Some text editors edit line breaks in a way that screws up shell scripts.
 

tywebb13

macrumors 68030
Apr 21, 2012
2,944
1,632
Great stuff! Worked for me too (on a 2011 mba dual booting lion and mavericks).

I just want know though as other developer previews and public versions of mavericks are released and we continue to use bootable usbs to install these, would we have to redo the process to update the recovery partition as well?
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
Great stuff! Worked for me too (on a 2011 mba dual booting lion and mavericks).

I just want know though as other developer previews and public versions of mavericks are released and we continue to use bootable usbs to install these, would we have to redo the process to update the recovery partition as well?

I am pretty sure you would. But on the bright side you don't have to do anything special when that happens. If you don't have a recovery partition, this script builds one, but if you do already have a Recovery partition, the script will just update the Recovery partition with the new files.

I thought about adding a few lines to the script to handle getting the LionRecoveryHD.dmg, and deleting that file after it's done.

Pros: You wouldn't have to redownload or keep up with that file, or mess with it at all. You would literally just drop the InstallESD.dmg into your Downloads folder, and run this script.

Cons: It would add on up to about 5 minutes to the amount of time it takes the script to run. Because of this, I am going to see what people think before I change it.
 
Last edited:

tywebb13

macrumors 68030
Apr 21, 2012
2,944
1,632
But you know what's going to happen? I reckon a lot of people will make the recovery partition once, happily update their system with usbs without taking care to update the recovery partition at all. I think that's fraught with danger and I'm not suggesting that I'm in that category.......

But!!!!.......

You know what I mean. I really don't like what apple have done with the installesd file! It has essentially separated the installation of the system and recovery partition. Before it used to be done together from bootable usbs (the old way) so there was no possibility of having an updated system without an updated recovery partition. So it never was an issue before. But now it may become a big issue for those who choose to update with usbs!

I'm happy that you made the script file and it will be good for those who need it. But my point is that we shouldn't need it at all!

Apple should go back to the old way so that systems and recovery partitions are updated together from bootable usbs restored directly from the installesd file.
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
But you know what's going to happen? I reckon a lot of people will make the recovery partition once, happily update their system with usbs without taking care to update the recovery partition at all. I think that's fraught with danger and I'm not suggesting that I'm in that category.......

But!!!!.......

You know what I mean. I really don't like what apple have done with the installesd file! It has essentially separated the installation of the system and recovery partition. Before it used to be done together from bootable usbs (the old way) so there was no possibility of having an updated system without an updated recovery partition. So it never was an issue before. But now it may become a big issue for those who choose to update with usbs!

I'm happy that you made the script file and it will be good for those who need it. But my point is that we shouldn't need it at all!

Apple should go back to the old way so that systems and recovery partitions are updated together from bootable usbs restored directly from the installesd file.

I agree completely. Honestly I will NEVER use my Recovery partition to reinstall. The only reason I made this script to build one is because it is required for "Find My Mac" and Filevault to work at all. And I'm willing to bet most feel the same. It's a nice idea, but having to download all the installation files from apples servers is hugely time consuming, especially when I can just keep a flash drive installer in a drawer that will do the same thing in 20 minutes.

Also, if I'm needing to jump into the Recovery partition to use Time Machine, disk utility or terminal to fix something, those tools won't be broken, even if it is outdated.
 

Beasty34

macrumors member
Mar 8, 2012
42
0
Nottingham, UK.
I am unable to install mavericks as it claims a recovery partition would not be created, the installer just plain refuses to continue and boots back into ML, would this sort that issue?
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
I am unable to install mavericks as it claims a recovery partition would not be created, the installer just plain refuses to continue and boots back into ML, would this sort that issue?

Possibly. If there is a recovery partition before you try to install Mavericks it may go ahead and use it. BUT! Use the InstallESD for Mountain Lion, since that is what is currently installed. I can't predict what it will do if you install a Mavericks recovery partition to a Mountain Lion install.

After the recovery partition is built, then try installing Mavericks again and let me know what happens.
 

mmomega

macrumors demi-god
Dec 30, 2009
3,879
2,089
DFW, TX
Didn't even know that was an option. Still, there are certain instances where the installer refuses to make a recovery partition. Usually because of odd hard drive or partition setups. This gets around that.

When I initially just upgraded to Mavericks from Mountain Lion, it also upgraded my Recovery partition from 10.8 to 10.9.

However I wanted a fresh install so Restart - Option - Boot to 10.9 Recovery Installer and no matter what I did, 10.9 would not complete a fresh install from recovery.
I ran DiskUtility from recovery and formatted the SSD, the installer would just sit on trying to connect to my iTunes/AppStore account to verify my 10.9 was legit. It sat there for 45 minutes before I gave up and created the(your) USB Install.
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
When I initially just upgraded to Mavericks from Mountain Lion, it also upgraded my Recovery partition from 10.8 to 10.9.

However I wanted a fresh install so Restart - Option - Boot to 10.9 Recovery Installer and no matter what I did, 10.9 would not complete a fresh install from recovery.
I ran DiskUtility from recovery and formatted the SSD, the installer would just sit on trying to connect to my iTunes/AppStore account to verify my 10.9 was legit. It sat there for 45 minutes before I gave up and created the(your) USB Install.

Yea the regular recovery partition is kind of a PITA, and especially useless since they don't even have anything set up for the beta to actually do a store. That's why I went ahead and did THIS
 

chell

macrumors member
Jun 18, 2007
46
0
When I try to download the Lion Recovery Update from Apple I get a 404. Does anyone have the file?
 

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
When I try to download the Lion Recovery Update from Apple I get a 404. Does anyone have the file?

I did notice that the download for that file seems to be sporadic... Sometimes it works and sometimes it drops a 404. Give me a bit to upload it to my Skydrive. It's a 452Mb download.

EDIT: Added a dropbox link since the main link for Lion Recovery HD Update is wonky.
 
Last edited:

Dalton63841

macrumors 65816
Original poster
Nov 27, 2010
1,449
8
SEMO, USA
A more stable link is http://support.apple.com/kb/dl1464

where the dl is lower case

Thanks for that...

In other news, I built an ApplescriptObjC application that can:

1. Check whether or not you have a recovery partition.
2. Destroy the recovery partition and add that space back into the root volume.
3. Create a standard recovery partition.
4. Create an offline recovery partition.

You choose which one you want to do, and if it is option 3 or 4 you choose your InstallESD.dmg and it handles the rest. Works on Lion, ML, and Mavericks.

If anyone is interested in it just let me know.
 
Last edited:

tywebb13

macrumors 68030
Apr 21, 2012
2,944
1,632
Yeah. I'm interested. Why don't you just attach it here somewhere so we can download it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.