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

VirtuallyInsane

macrumors 6502
Original poster
Nov 16, 2018
333
435
I've watched about 3 videos on how to patch Mountain Lion on my Macbook 2008 4,1, which can **definitely** go past Snow Leopard.

I have downloaded the Mountain Lion app (10.8.4) from the software Archive, but it refuses to make a copy of the installer in my Applications folder, so I can't patch it. I can't even open Lion to upgrade it.

Is my disk corrupt?

Am I doing something wrong?

Should I delete the current drive?

The whole system runs fine. I have it backed up onto an external SSD enclosure.

Has anyone here done the upgrade from 10.6.8 to 10.8 and can they please help me out? Thank you.
 
I have downloaded the Mountain Lion app (10.8.4) from the software Archive, but it refuses to make a copy of the installer in my Applications folder, so I can't patch it. I can't even open Lion to upgrade it.
Software Archive? Can't you download from here?

EDIT: Oh, sorry, I see now. Assuming the ML installer dmg is in ~/Downloads, open a terminal and do the following:
Code:
hdiutil attach ~/Downloads/InstallMacOSX.dmg -noverify -nobrowse
sudo pkgutil --expand-full /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/tmp
hdiutil unmount /Volumes/Install\ Mac\ OS\ X
sudo cp -pr ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app /Applications
sudo rm -rf ~/tmp
You should now have the installer app in /Applications. The ~/tmp directory should not exist prior to running the commands, or the pkg expansion will fail.
 
Last edited:
  • Like
Reactions: VirtuallyInsane
There's a problem with what I posted. There should be an InstallESD.dmg in the apps SharedSupport folder, but there is not. Sorry. Looking into it now.
 
I have to apologize. Moving InstallESD.dmg into the SharedSupport folder results in an app which fails to verify when you try to install it. Furthermore, the ML installer downloaded from the Apple link I gave above fails to install in a Snowleopard VM with an "unknown error." I'm stumped, sorry to waste your time.
 
From: "App Store links and mas-cli Id's for macOS Installers from Lion to Ventura" https://forums.macrumors.com/thread...acos-installers-from-lion-to-ventura.2378889/
For Mountain Lion:
Code:
open ~/Downloads/InstallMacOSX.dmg
pkgutil --expand /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/Mountain\ Lion
cd ~/Mountain\ Lion/InstallMacOSX.pkg
tar -xvf Payload
mv ~/Mountain\ Lion/InstallMacOSX.pkg/InstallESD.dmg ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport
mv ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app /Applications
 
From: "App Store links and mas-cli Id's for macOS Installers from Lion to Ventura" https://forums.macrumors.com/thread...acos-installers-from-lion-to-ventura.2378889/
Thanks @bogdanw. Last night I added an "mv" top put the dmg into SharedSupport:
Code:
hdiutil attach ~/Downloads/InstallMacOSX.dmg -noverify -nobrowse
sudo pkgutil --expand-full /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/tmp
hdiutil unmount /Volumes/Install\ Mac\ OS\ X
sudo mv ~/tmp/InstallMacOSX.pkg/InstallESD.dmg ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/
sudo cp -pr ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app /Applications
sudo rm -rf ~/tmp
The resulting installer app fails with this message:

"This copy of the Install OS X Mountain Lion application can't be verified. It may have been corrupted or tampered with during downloading."

An app created using the commands given by @startergo fails in exactly the same way. BTW those commands must either be typed in one-at-a-time, or you have to insert a sleep after the open to give the mount time to complete. Otherwise the pkgutil command will fail (or at least it did consistently for me).

I suspected an expired certificate, but changing the year to 2010 doesn't help. I've been using the installer downloaded from this link and testing in an OS X 10.6.8 VM. Now I've discovered that running the pkg "as intended" by double-clicking it results in a ML installer which fails with an "Unknown error occurred."
 
Using the installer downloaded from here I was able to get the Install OS X Mountain Lion app into /Applications and subsequently update Snowleopard to Mountain Lion. The certificate for the installer is only good roughly between Feb 23, 2012 and Oct 24, 2019. So the first thing I had to do was temporarily change the time and date. I used:
Code:
sudo date 032213002013
to change the date to 22 Mar 2013 (see "man date"). That alone wasn't sufficient though - I also had to disconnect from the internet. I could guess that's because the installer is SHA-1 signed and Apple has deprecated SHA-1, so Apple's servers may be flagging the installer as invalid. I just don't know. In any event, changing the date and disconnecting from the internet allowed the pkg inside the installer dmg to run, putting the ML installer app in /Applications. After that, the upgrade to ML went just fine.
 
Thanks @bogdanw. Last night I added an "mv" top put the dmg into SharedSupport:
Code:
hdiutil attach ~/Downloads/InstallMacOSX.dmg -noverify -nobrowse
sudo pkgutil --expand-full /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/tmp
hdiutil unmount /Volumes/Install\ Mac\ OS\ X
sudo mv ~/tmp/InstallMacOSX.pkg/InstallESD.dmg ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/
sudo cp -pr ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app /Applications
sudo rm -rf ~/tmp
The resulting installer app fails with this message:

"This copy of the Install OS X Mountain Lion application can't be verified. It may have been corrupted or tampered with during downloading."

An app created using the commands given by @startergo fails in exactly the same way. BTW those commands must either be typed in one-at-a-time, or you have to insert a sleep after the open to give the mount time to complete. Otherwise the pkgutil command will fail (or at least it did consistently for me).

I suspected an expired certificate, but changing the year to 2010 doesn't help. I've been using the installer downloaded from this link and testing in an OS X 10.6.8 VM. Now I've discovered that running the pkg "as intended" by double-clicking it results in a ML installer which fails with an "Unknown error occurred."
There is a difference in the commands you are using. Spend some time to reading the thread. The bellow command removes the need for certificates:
Code:
open ~/Downloads/InstallMacOSX.dmg
pkgutil --expand /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/Mountain\ Lion
cd ~/Mountain\ Lion/InstallMacOSX.pkg
tar -xvf Payload
mv ~/Mountain\ Lion/InstallMacOSX.pkg/InstallESD.dmg ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport
mv ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app /Applications

There is also a script mentioned in the same thread:
 
There is a difference in the commands you are using. Spend some time to reading the thread. The bellow command removes the need for certificates:
Code:
open ~/Downloads/InstallMacOSX.dmg
pkgutil --expand /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/Mountain\ Lion
cd ~/Mountain\ Lion/InstallMacOSX.pkg
tar -xvf Payload
mv ~/Mountain\ Lion/InstallMacOSX.pkg/InstallESD.dmg ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport
mv ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app /Applications

There is also a script mentioned in the same thread:
I cut-and-pasted those commands, running them unchanged except for adding a "sleep 2" after the open, using the installer dmg that I linked to above. The result is the same, the app is reported as "damaged" when you try to run it. This is irrespective of whether or not the date is changed and the network stopped.
 
I cut-and-pasted those commands, running them unchanged except for adding a "sleep 2" after the open, using the installer dmg that I linked to above. The result is the same, the app is reported as "damaged" when you try to run it. This is irrespective of whether or not the date is changed and the network stopped.
You linked these commands in your post:
Code:
hdiutil attach ~/Downloads/InstallMacOSX.dmg -noverify -nobrowse
sudo pkgutil --expand-full /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/tmp
hdiutil unmount /Volumes/Install\ Mac\ OS\ X
sudo mv ~/tmp/InstallMacOSX.pkg/InstallESD.dmg ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/
sudo cp -pr ~/tmp/InstallMacOSX.pkg/Payload/Install\ OS\ X\ Mountain\ Lion.app /Applications
sudo rm -rf ~/tmp
These are different commands from the one posted in the thread for making the installer:
Today at 10:42 AM

You are definitely doing something wrong:
1679544396673.png
 
Last edited:
These are different commands from the one posted in the thread for making the installer:
Today at 10:42 AM
I ran both sets of commands, yours and mine. Both sets produce the same result, i.e. a ML installer app that doesn't work.

Because 'pkgutil --expand-full' doesn't work on Snowleopard, I ran the commands that I originally posted under Monterey and then copied the resulting installer app to an SL VM to test. That app failed to run, with the OS reporting that it was "damaged."

I ran your commands, with the single addition of a sleep after the open, directly on the SL VM. The resulting ML installer app failed to run, with the OS reporting that it was "damaged."

Mounting the dmg by double-clicking it and then double-clicking the pkg contained therein did produce a working ML installer app, but that app worked only after I changed the date and disconnected the network.

None of this is a statement about you personally, and I have no reason to doubt that your commands have worked for you in the past. They did not work for me using this installer dmg.
 
I ran both sets of commands, yours and mine. Both sets produce the same result, i.e. a ML installer app that doesn't work.

Because 'pkgutil --expand-full' doesn't work on Snowleopard, I ran the commands that I originally posted under Monterey and then copied the resulting installer app to an SL VM to test. That app failed to run, with the OS reporting that it was "damaged."

I ran your commands, with the single addition of a sleep after the open, directly on the SL VM. The resulting ML installer app failed to run, with the OS reporting that it was "damaged."

Mounting the dmg by double-clicking it and then double-clicking the pkg contained therein did produce a working ML installer app, but that app worked only after I changed the date and disconnected the network.

None of this is a statement about you personally, and I have no reason to doubt that your commands have worked for you in the past. They did not work for me using this installer dmg.
I ran the bellow commands to produce working installer of ML and I provided a screenshot of the installation in a VM in my previous post. There is no pkgutil --expand-full in the commands. I am not sure where you got that one from?
Code:
open ~/Downloads/InstallMacOSX.dmg
pkgutil --expand /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/Mountain\ Lion
cd ~/Mountain\ Lion/InstallMacOSX.pkg
tar -xvf Payload
mv ~/Mountain\ Lion/InstallMacOSX.pkg/InstallESD.dmg ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport
mv ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app /Applications

The biggest difference is tar -xvf Payload. As I said I retested the commands again yesterday and provided a screenshot of successful installation.
Run the commands one at a time. If you want automatic script one is provided above.
 
Last edited:
@startergo, I'm not infallible, so yes, perhaps I'm doing something wrong. Hopefully you'll take a few minutes to look at the following screenshots and show me the error of my ways.

First, I installed OS X 10.6.3 from a Snowleopard DVD and applied all available updates to bring it up to 10.6.8:

SL-1.png


I cut-and-pasted your exact commands and put them in a file called startergo.sh. I added a single line after the open, marked #ADDED, to pause long enough for the dmg to get verfied and mounted by the open:

SL-2.png


I ran 'ls -l Downloads' and 'shasum -a 1 Downloads/InstallMacOSX.dmg' so that you can compare the SHA-1 signature against that of whatever dmg you've been using. The signature is shown in full (ending in ccdb) even though it looks like it might be partially obscured.

I then ran your commands by typing 'bash -x startergo.sh'

SL-3.png


After the verification is complete, I type Enter and the remainder of the commands are executed:

SL-4.png


Now an ML installer app is in /Applications:

SL-5.png


After I double-click the installer and enter my password, it churns for a few seconds and produces this:

SL-6.png


So, where did I go wrong?
 
Maybe it is because you try to run it from within the OS? For that purpose Apple created a dedicated page with installers. If they don’t work from there you may contact Apple. Running that installer from SL should be as easy as double clicking on the DMG and installing the pkg. I also remember there was an update to allow running ML and Lion installer from within SL.
 
Running that installer from SL should be as easy as double clicking on the DMG and installing the pkg.
Yup, it is that easy (as I've said) and the resulting '/Applications/Install OS X Mountain Lion.app' will install ML, but only if you change the date and disconnect the network. The installer app created with your commands, or with mine for that matter, will produce the same result as in the last screenshot above, no matter if the date is changed and the network disconnected.

A ML installer dmg downloaded from How to download macOS is identical to the one downloaded from Mac OS X Mountain Lion Installer and is, in fact, the very one I've been using.

I have absolutely no need or desire for ML, this all started out with me trying to help @VirtuallyInsane, realizing I'd made a mistake, and then wondering why things still failed to work even after correcting that mistake. Then @bogdanw wandered by and pointed out your approach, which I tried with the same result. I'm sure that the OP now regrets having ever asked.

PS: you should run 'shasum -a 1 InstallMacOSX.dmg' on the dmg you've been using, and compare it to the signature shown in the screenshot upthread. Using a different dmg could explain different results.
 
Yup, it is that easy (as I've said) and the resulting '/Applications/Install OS X Mountain Lion.app' will install ML, but only if you change the date and disconnect the network. The installer app created with your commands, or with mine for that matter, will produce the same result as in the last screenshot above, no matter if the date is changed and the network disconnected.

A ML installer dmg downloaded from How to download macOS is identical to the one downloaded from Mac OS X Mountain Lion Installer and is, in fact, the very one I've been using.

I have absolutely no need or desire for ML, this all started out with me trying to help @VirtuallyInsane, realizing I'd made a mistake, and then wondering why things still failed to work even after correcting that mistake. Then @bogdanw wandered by and pointed out your approach, which I tried with the same result. I'm sure that the OP now regrets having ever asked.

PS: you should run 'shasum -a 1 InstallMacOSX.dmg' on the dmg you've been using, and compare it to the signature shown in the screenshot upthread. Using a different dmg could explain different results.
Try this one first with the installers and see if it will help:
 
Will this work if I have a patcher for my Macbook 4,1?
It looks like this update is only for transferring personal data. I am afraid that the installer from this link
is the only option and changing the time back temporarily. Or you can use the installer created by
Code:
open ~/Downloads/InstallMacOSX.dmg
pkgutil --expand /Volumes/Install\ Mac\ OS\ X/InstallMacOSX.pkg ~/Mountain\ Lion
cd ~/Mountain\ Lion/InstallMacOSX.pkg
tar -xvf Payload
mv ~/Mountain\ Lion/InstallMacOSX.pkg/InstallESD.dmg ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport
mv ~/Mountain\ Lion/InstallMacOSX.pkg/Install\ OS\ X\ Mountain\ Lion.app /Applications
And restoring the installer to a USB (you would need to create a DMG Image first) and booting from the USB.
 
  • Like
Reactions: VirtuallyInsane
@startergo, I can confirm that using Disk Utility to restore '/Applications/Install OS X Mountain Lion.app/Contents/SharedSupport/InstallESD.dmg' onto a USB stick produces a working installation USB. I had to use an old version of Disk Utility though. Snowleopard's Disk Utility worked, Montery's Disk Utility did not.

EDIT: I should add, the USB installer works fine to install ML on supported hardware, but I doubt that this will solve @VirtuallyInsane's problem of installing ML on his unsupported MacBook 4,1.
 
Last edited:
  • Like
Reactions: startergo
@startergo, I'm not infallible, so yes, perhaps I'm doing something wrong. Hopefully you'll take a few minutes to look at the following screenshots and show me the error of my ways.

First, I installed OS X 10.6.3 from a Snowleopard DVD and applied all available updates to bring it up to 10.6.8:

View attachment 2177602

I cut-and-pasted your exact commands and put them in a file called startergo.sh. I added a single line after the open, marked #ADDED, to pause long enough for the dmg to get verfied and mounted by the open:

View attachment 2177612

I ran 'ls -l Downloads' and 'shasum -a 1 Downloads/InstallMacOSX.dmg' so that you can compare the SHA-1 signature against that of whatever dmg you've been using. The signature is shown in full (ending in ccdb) even though it looks like it might be partially obscured.

I then ran your commands by typing 'bash -x startergo.sh'

View attachment 2177614

After the verification is complete, I type Enter and the remainder of the commands are executed:

View attachment 2177615

Now an ML installer app is in /Applications:

View attachment 2177616

After I double-click the installer and enter my password, it churns for a few seconds and produces this:

View attachment 2177622

So, where did I go wrong?
I just installed Snow leopard and updated to 10.6.8 in Parallels and tried to install ML created by the commands I posted earlier. I get this message:
 

Attachments

  • image.jpg
    image.jpg
    380.7 KB · Views: 147
After that I copied the installer from the host to the guest’s desktop and restarted the installer. It works as designed.
 

Attachments

  • image.jpg
    image.jpg
    341.4 KB · Views: 136
I installed 10.6.3 on a late 2008 MacBook 5,1 and updated it to 10.6.8. Then I ran your script to put the ML installer into /Applications and ran that. This is the result:
Screen shot 2023-03-24 at 3.31.02 PM.png
 
A ML installer dmg downloaded from How to download macOS is identical to the one downloaded from Mac OS X Mountain Lion Installer
I am not quite sure. Can you install the latter in the applications folder without extra commands? I believe that one is packed differently. The install.DMG for that is just a package and not a real DMG. That is why you have to untar the package called DMG. That installer should not give an error after the manipulation with the extra commands.
 
Well, I said they're identical because the SHA-1 signatures of the two downloads are identical. The odds against them being different are quite literally astronomical. Still, I could've made a mistake so I'll try again, but it might be a while - I'm actually packing to move and most of the computers have to be boxed up. But I'll do my best to get to it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.