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?

  • 2
    Curious…why install such an old version of macOS on a machine capable of running Big Sur?
    – Allan
    Commented May 14, 2023 at 13:48
  • It's the option I got from the recovery, but I intend on updating to the latest possible Commented May 14, 2023 at 14:04
  • 1
    Can you plug your Mac into Ethernet and not use wireless?
    – Allan
    Commented May 14, 2023 at 17:15
  • 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
    Commented May 15, 2023 at 6:50
  • 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 Commented May 16, 2023 at 16:57

1 Answer 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .