Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Possible method to get full Lion installer for new MacBook Air and Pro

Possible method to get full Lion installer for new MacBook Air and Pro
Thread Tools
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 20, 2011, 07:34 PM
 
I've been playing around with the recovery partition a bit, and this seems to work on my 2008 MBP machine with the App Store version of Lion installed on it. I'm curious to know whether it works on the new MacBook Air/Pros that don't have any way to reinstall the OS other than through the recovery partition. Could be a good way to get an offline install disc for your laptop, if it works.

To avoid messing up your one and only good Lion installation, I recommend getting an external drive big enough to install Lion on. An external hard drive or separate partition is great. A large USB flash drive might work, but I haven't tried it.

Anyway: As we all know, the Recovery HD lets you reinstall Lion by downloading it from Apple's servers. Unfortunately, it deletes itself after installation, so it doesn't allow you to make a boot disk that doesn't involve network access. However, we can capture the installer and interrupt the install, so that it doesn't get a chance to delete itself.

1. Open the Terminal, and type this command to list all partitions on your hard drive or SSD:

diskutil list

2. Look for "Recovery HD" in the list, and note its identifier. It will be something of the form diskXsY, where X and Y are numeric digits. (On my machine, it's disk0s3).

3. Type the following command to mount the recovery HD:

diskutil mount readOnly /dev/<identifier>

so on my machine it was:

diskutil mount readOnly /dev/disk0s3

4. The disk image inside the recovery HD is invisible, so use the Terminal to mount that too:

hdiutil attach "/Volumes/Recovery HD/com.apple.recovery.boot/BaseSystem.dmg"

5. Now, from the newly mounted Mac OS X Base System image, double-click the "Install Mac OS X" application at the root. Surprisingly, it launches, even when booted into a standard Mac OS X user account from the hard drive!

6. Go through the license agreement. Once it asks you for a disk to install on, choose the external drive or spare partition (or the boot partition if you're feeling gutsy. As long as you don't let the installer reboot, it shouldn't be able to install anything, but I like to err on the side of caution).

7. Enter your admin password when prompted, and the installer will start downloading!

8. Open an old-style (non-autosaving) application that still uses the traditional Save, Save As..., etc. commands in the File menu (I used TextWrangler) and make a new unsaved document, and type a few things in it. This will give you a little insurance against the installer rebooting the system, since the app won't let the system reboot until you respond to its message about whether you want to save the document or not.

9. The installer will start downloading some packages into a folder called "Mac OS X Install Data" on the root of the drive you're installing onto. Of the files it puts in there, the interesting item is a package with a funky name (on my system, it was "mzm.stuhjljp.pkg"). It will be the file in the folder with the largest file size. Once the file finishes downloading, the installer will extract the InstallESD.dmg image from it and delete the package. If you just want to make a Lion install DVD or USB stick, the InstallESD.dmg is all you need, so you can skip the next two optional steps. However, if you want to make an install app like the one you would have gotten from the App Store, or if you just want a little insurance against the installer managing to reboot, install, and delete InstallESD.dmg, you can follow these steps:

9a (optional). When the download is partially finished, but not yet complete, open the Terminal and type this command to switch to the disk you're installing Lion on:

cd "/Volumes/<disk name>"

replacing <disk name> with the name of the disk. When I did this, I chose an external hard drive named "Lion", so for me it would be:

cd "/Volumes/Lion"

9b (optional): Type the following commands. The first command will create a folder named "backup" at the root of the drive you're installing onto, and the second will hard link everything in Mac OS X Install Data into that folder. What this means is that even after the installer deletes the downloaded packages, a copy will remain in the "backup" folder, and since it is a link rather than a copy, the files will contain the complete downloaded data, rather than just a copy of whatever happened to be downloaded at the time you ran the commands.

mkdir backup
ln "Mac OS X Install Data"/* backup/

If you get permission errors for either of these commands, just type "sudo" without the quotes, then a space, and then the command. Enter your admin password when prompted.

10. Wait for the download to finish. This will probably take a while, as it's a very large download.

11. Once the installer finishes download and prompts you to restart your Mac, force-quit it. Do this quickly, as it may automatically reboot for you after a timeout period (although if you've got an unsaved document open, you should be able to prevent that).

12. You should now have a file called InstallESD.dmg in the Mac OS X Install Data folder. You can burn this to a DVD, or image it to a USB flash drive to create a boot disk. Optionally, if you followed the two optional steps back in step 9, you should be able to reconstitute the Install Mac OS X Lion.app application like so:

12a (optional). Go to the "backup" folder, and find the package with the funky name. It should be around 4 GB in size or so.

12b (optional). Open the package with Pacifist. The version currently available is unable to open the Lion packages, but should work well enough for this particular usage (the Lion of Pacifist should be released before too long, if you can wait).

12c (optional). You will see the Install Mac OS X Lion.app application in the package contents for the package. Extract this to the location of your choice.

12d (optional). Unfortunately, the app is missing its InstallESD.dmg image. This can be extracted from the Resources tab in Pacifist (or you could just grab the one that should be left over in Mac OS X Install Data).

12e (optional). Open Package Contents on the extracted app, and put InstallESD.dmg into Contents/SharedSupport. I think this should cause the installer app to work, although I haven't tried it yet.

To those of you who have the brand new MacBook Airs and Pros: does this work? I'm curious to find out.

Thanks!
( Last edited by CharlesS; Aug 20, 2011 at 07:55 PM. Reason: quote marks are probably easier than backslashes)

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
jason2008c
Fresh-Faced Recruit
Join Date: Aug 2011
Status: Offline
Reply With Quote
Aug 28, 2011, 02:34 PM
 
Confirmed, this method (Step 1 to 9) works on Macbook Air mid 2011.
The app idea didn't work, yet the installer would just download another set of "Mac OS X Install Data" .
Thanks for the post.
     
CharlesS  (op)
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 28, 2011, 02:38 PM
 
Did the InstallESD.dmg obtained via this method start up the MBA after being burned/imaged to a DVD or USB stick, and did it contain the appropriate install files for that model?

Just wanting to be sure I know exactly what works before I start recommending this to other people.
( Last edited by CharlesS; Aug 28, 2011 at 02:41 PM. Reason: clarity)

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
Aug 28, 2011, 02:49 PM
 
What can you do with this backup that you can't do with a simple (selective) clone of your existing boot drive?
     
CharlesS  (op)
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 28, 2011, 02:51 PM
 
Do a clean install of Lion?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
jason2008c
Fresh-Faced Recruit
Join Date: Aug 2011
Status: Offline
Reply With Quote
Aug 28, 2011, 06:07 PM
 
Originally Posted by CharlesS View Post
Did the InstallESD.dmg obtained via this method start up the MBA after being burned/imaged to a DVD or USB stick, and did it contain the appropriate install files for that model?

Just wanting to be sure I know exactly what works before I start recommending this to other people.
I used Lion Diskmaker to create the USB disk, and yes it booted successfully via USB disk.
Within the disk, it contains "Install Mac OS X Lion" icon and "Utilities" folder. (not sure if there are any differences when using disk utility to create the boot disk)

Apparently they have a different version of Lion for macbook airs 2011, which you can obtain from apple's server using this method. (the one obtained from app store won't work with it).
     
CharlesS  (op)
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 28, 2011, 06:58 PM
 
If you insert the USB disk you made, double-click its icon on the Desktop, type ⌘-Shift-G, and type "Packages", do you get a window with all the packages in it?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
jason2008c
Fresh-Faced Recruit
Join Date: Aug 2011
Status: Offline
Reply With Quote
Sep 2, 2011, 07:43 PM
 
Originally Posted by CharlesS View Post
If you insert the USB disk you made, double-click its icon on the Desktop, type ⌘-Shift-G, and type "Packages", do you get a window with all the packages in it?
Inside the "packages" folder I got 49 pkg files. I hope I have got them all.
     
gradient
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Offline
Reply With Quote
Sep 2, 2011, 07:50 PM
 
Maybe I'm missing something here, but instead of steps 1-11, why not just download the Lion installer a second time through the app store, the pull InstallESD image out of it?
     
Person Man
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Sep 2, 2011, 08:46 PM
 
Originally Posted by gradient View Post
Maybe I'm missing something here, but instead of steps 1-11, why not just download the Lion installer a second time through the app store, the pull InstallESD image out of it?
Because the new MacBook Air and Mac mini contained a specialized version of Mac OS 10.7.0, which was developed for machines that shipped after it went GM. The retail version of 10.7.0 would not have worked for those machines. Now that 10.7.1 has been posted to the App Store, they should be able to do what you are suggesting.
     
CharlesS  (op)
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 2, 2011, 09:30 PM
 
Have they reuploaded the Lion installer on the App Store? I tried redownloading it a week or two ago, and still got the same old 11A511 installer that's been up since July.

At any rate, that's not going to help users of the new MBA or MBP, since Lion doesn't even show up in the "Purchased" tag on those machines.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Person Man
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Sep 2, 2011, 09:56 PM
 
Originally Posted by CharlesS View Post
Have they reuploaded the Lion installer on the App Store? I tried redownloading it a week or two ago, and still got the same old 11A511 installer that's been up since July.
Yeah, I downloaded it last week when I set up a new iMac for work. I got 11B26.
     
CharlesS  (op)
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 2, 2011, 10:25 PM
 
It's still not going to help on the new machines. The App Store only lets you re-download the Lion installer if you've bought it in the first place. For machines that came with Lion already installed, it won't show up in three list of purchased applications.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
gradient
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Offline
Reply With Quote
Sep 3, 2011, 03:23 PM
 
Originally Posted by Person Man View Post
Because the new MacBook Air and Mac mini contained a specialized version of Mac OS 10.7.0, which was developed for machines that shipped after it went GM. The retail version of 10.7.0 would not have worked for those machines. Now that 10.7.1 has been posted to the App Store, they should be able to do what you are suggesting.
Ah, gotcha.
     
ChrisF
Senior User
Join Date: Apr 2002
Status: Offline
Reply With Quote
Sep 3, 2011, 03:58 PM
 
Originally Posted by Person Man View Post
Now that 10.7.1 has been posted to the App Store, they should be able to do what you are suggesting.
The new models use a machine-specific build of 10.7.1, so this still won't work. 10.7.2 will probably be the first unified OS version for these.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:08 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,