2

I'm giving my old 2016 MacBook Pro to another person, so I doing a factory reset on it.

I entered Recovery Mode (Cmd+R), formatted the hard drive, and went to install macOS Sierra from scratch.

After accepting the terms, it goes into a 6-minute loading bar, and when it ends, it shows "An error occurred while preparing the installation. Try running this application again.".

I tried entering the recovery mode with Cmd+Opt+Shift+R, the same thing happens.

If I try I tried entering the recovery mode with Cmd+Opt+R, it enters the first loading bar (with the spinning globe) and it shows an -5101F error and doesn't even enter the recovery mode.

I also tried:

  • Resetting NVRAM
  • Setting up the correct date
  • Repair on all hard drive partitions (no issue was reported)

Tried searching for solutions beyond that and couldn't find any. I can only boot it on recovery mode since the hard drive was wiped.

What can I do to install the OS again?

agarza
  • 2,274
  • 2
    Curious…why install such an old version of macOS on a machine capable of running Big Sur? – Allan May 14 '23 at 13:48
  • It's the option I got from the recovery, but I intend on updating to the latest possible – Marcio Cruz May 14 '23 at 14:04
  • Try Shift-Cmd-Opt-R to install the latest version compatible with your Mac. This will be cleaner than installing a super okd version then upgrading. – Allan May 14 '23 at 14:42
  • I did, it still tried to install Sierra (with the same error), maybe I'm doing something wrong? – Marcio Cruz May 14 '23 at 16:14
  • Sorry! Remove the Shift so it’s just Opt-Cmd-R. That will install the latest. The one I gave you installs the original! Doh! – Allan May 14 '23 at 16:27
  • I also tried this one, but with this the recovery won't even start, with a -5101F error (it doesn't even get to the place where I choose to install OS). I also searched for solutions for this error but nothing fixed it – Marcio Cruz May 14 '23 at 17:14
  • 1
    Can you plug your Mac into Ethernet and not use wireless? – Allan May 14 '23 at 17:15
  • Also, see if you can manually download High Sierra - you might need a firmware update. See: https://apple.stackexchange.com/q/309399/119271 – Allan May 14 '23 at 17:21
  • It doesn't have ethernet port, and I don't have any adapters, but I was able to do this process before on this same machine without issues. I'm gonna look into making a bootable installer, but it doesn't seem a straightforward process – Marcio Cruz May 14 '23 at 18:36
  • 1
    What OS version is the Recovery? [Hold Opt at boot & you'll be able to see the version number on the Recovery volume.] If it is in fact Sierra it won't be able to find the Apple Store; Sierra is no longer referenced from the Store at all, and it won't know what do do with Big Sur. Do you have another working Mac you can use? – Tetsujin May 15 '23 at 06:50
  • I do have another mac, but I could not do what you said about showing the version number on recovery volume. If I hold opt it goes to the recovery but everything is as if I had pressed cmd + r. So if I make a bootable installer with big sur, it won't work? – Marcio Cruz May 15 '23 at 13:51
  • I couldn't find a way to create the bootable installer. I downloaded 2 different installers for Big Sur, which were .dmg files with a .pkg inside, and I could not find the createinstallmedia inside them. How do I create this installer? All articles I find teach to create the installer for the system you currently have installed (which is ventura) – Marcio Cruz May 15 '23 at 20:18
  • It's a command that is inside the downloaded OS app package, right? Like this example: sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

    I did follow Allans link, but it led me to several places, and I could not find the Big Sur download that would have the path above. I tried app store (it shows an error) and also a terminal command to download updates, but big sur was not there. Would you have a suggestion where I can download big sur as an app, rather than a pkg? I'll look again in the link Allan sent

    – Marcio Cruz May 16 '23 at 12:58
  • 1
    @Tetsujin I don't see your comment anymore but it made my try again following Allan's link and I think I got it. I downloaded Sierra pkg, extracted it correctly and then found the command in there. After a couple errors that had to be fixed, I managed to make the installation drive and it's currently installing. If it works, i'll write a response to the question – Marcio Cruz May 16 '23 at 16:57

1 Answers1

1

I finally managed to install it, I had to create a bootable installer on another Mac.

For most of this, I followed the instructions on ChrisBraucker's answer on How do I create El Capitan installer on a Catalina (or post-El Capitan) installed Mac for use on USB boot installer?

You will need a second working MacBook to create the bootable drive and an external drive with at least 15GB. I used a Intel Macbook, I tried it on a M1 and it hang on the final part, not sure why.

  • Download Sierra from Apple at How to download macOS (it might work for other versions)

  • Mount the image (double click the .dmg file)

  • Copy the .pkg file to your Downloads folder (or other folder you want to use)

  • Open the terminal

  • Go to the downloads folder cd Downloads

  • Create a new folder to extract the package mkdir sierra and cd sierra

  • Extract the package xar -xf ../InstallOS.pkg (double check the file name)

  • enter the extracted package folder cd InstallOS.pkg

  • If you do ls now you should see Payload, Scripts and InstallESD.dmg

  • Unpack Payload with tar xvzf Payload

  • copy InstallESD.dmg to its proper place cp InstallESD.dmg Install\ macOS\ Sierra.app/Contents/SharedSupport (if you get an error check if the paths are correct - if you're trying another version it will definitely be)

  • run sudo Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --applicationpath ./Install\ macOS\ Sierra.app --volume /Volumes/MyVolume. You will have to input your password, and will ask if you want to erase your mounted volume. (again, if you get any errors check the paths, also rename MyVolume to your volume name)

  • If you get an error right away that says something like [1] 90067 killed sudo Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia run the following: codesign -s - -f Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia, and the run the createinstallmedia command above again. This fix was found at You can't use an M1 Mac to create bootable pre-BigSur macOS installers (there are other interesting discussions and solutions there as well, I recommend the read)

  • If it runs for a while and it fails with an error that looks like Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't posix_spawn: error 35", run sudo plutil -replace CFBundleShortVersionString -string "12.6.03" Install\ macOS\ Sierra.app/Contents/Info.plist and then try the createinstallmedia command again (take care, this might be specific for Sierra and you might need to use another version number for other macOS versions). This solution was found on the same discussion on the link above, which led me to Unable to make bootable USB drive

Hopefully it all worked. Unmount the external drive, disconnect it, and connect it on the mac you want to install it. Turn it on and press the option key. It should show an option to connect to wifi, as well as installing the OS from the external drive. Input the wifi credentials and install it normally from there.

On How do I create El Capitan installer on a Catalina (or post-El Capitan) installed Mac for use on USB boot installer? there are other solutions that can be useful, as well the discussion on You can't use an M1 Mac to create bootable pre-BigSur macOS installers