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

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Yeah, multiple ways to skin the cat.

I just used my Install_USB_Maker script to install everything from Lion to Sierra:
Well, excluding Mavericks which needs other approaches.

So basically everything in the Apple download page here:

Process is at the top of the script file but is summarised as:
  • Download Lion to Monterey from the page or by running a script such as gibMacOS
  • Create and connect a blank, HFS+ format 16 GB (min) USB stick labelled as Install_USB_Maker
  • Mount the DMG (Lion to Sierra) or place the Installer App (Yosemite to Monterey) so that both this and the Install_USB_Maker volume can be accessed by the script
    • Best to close Finder window for the DMG if one is loaded on mounting it
  • Run the script to create a USB installer labelled as {{MAC_OS_NAME}} Installer
  • Use this USB installer to install Mac OS.

Working my way through the High Sierra and newer versions that do not have direct downloads as they need a different approach. Once done, will update the script to handle those as well. Likely will bump the min USB size to 16 GB but outcome will be the same. A {{MAC_OS_NAME}} Installer USB ready for use after running the script.
DONE



Edit 04 Feb 23:
Now handles Lion to Monterey excluding Mavericks.
Now also creates bootable USB from Installer Apps for Yosemite to Monterey
Installer Apps optional for Yosemite to Sierra as probably easier to just mount DMG for these.
Put Installer App under Applications or the folder with the script
Requires 16GB when using Installer Apps (8GB will work otherwise)
 
Last edited:
  • Like
Reactions: startergo

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
A USB creator script likely uses createinstallmedia, which is in the installer from OS X 10.9 and later. However, this is 10.7 Lion, and scripts that use createinstallmedia can't make an installer. Takes other methods.
Missed this when it was posted. No use of CreateInstallMedia involved.

It involves deconstructing the installer and putting it back together into a standard format using first principle bash commands. Basically makes something similar to older installers from before Apple made them more and more complicated. Side benefit is that it bypasses certificate expiry issues and the need to change dates to install.
 

nndei

macrumors newbie
Jul 10, 2017
22
3
Yeah, multiple ways to skin the cat.

I just used my Install_USB_Maker script to install everything from Lion to Sierra:
Well, excluding Mavericks which needs other approaches.

So basically everything in the Apple download page here:

Process is at the top of the script file but is summarised as:
  • Download Lion to Monterey from the page or by running a script such as gibMacOS
  • Create and connect a blank, HFS+ format 16 GB (min) USB stick labelled as Install_USB_Maker
  • Mount the DMG (Lion to Sierra) or place the Installer App (Yosemite to Monterey) so that both this and the Install_USB_Maker volume can be accessed by the script
    • Best to close Finder window for the DMG if one is loaded on mounting it
  • Run the script to create a USB installer labelled as {{MAC_OS_NAME}} Installer
  • Use this USB installer to install Mac OS.

Working my way through the High Sierra and newer versions that do not have direct downloads as they need a different approach. Once done, will update the script to handle those as well. Likely will bump the min USB size to 16 GB but outcome will be the same. A {{MAC_OS_NAME}} Installer USB ready for use after running the script.
DONE



Edit 04 Feb 23:
Now handles Lion to Monterey excluding Mavericks.
Now also creates bootable USB from Installer Apps for Yosemite to Monterey
Installer Apps optional for Yosemite to Sierra as probably easier to just mount DMG for these.
Put Installer App under Applications or the folder with the script
Requires 16GB when using Installer Apps (8GB will work otherwise)
Hello Dayo,

I am trying to use your .sh file to create a bootable USB for Mac OS X El Capitan because I couldn't create a bootable stick from the Application installed following startergo's guide.

Indeed, after running the .pkg to install the El Capitan installer in the Applications folder, I followed' Apple's guide.
However, the process didn't go as planned and outputted this:

Code:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Password:
Ready to start.
To continue we need to erase the disk at /Volumes/MyVolume.
If you wish to continue type (Y) then press return: y
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Couldn't mount dmg /Volumes/Install OS X El Capitan/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg (error code 110)Mount of outer dmg failed.
Done.

Therefore, I am trying to create the USB bootable drive through your .sh file since I have understood that it doesn't require to run the .pkg, but just the initial .dmg.
I don't understand this step:
  • Run the script to create a USB installer labelled as {{MAC_OS_NAME}} Installer
May I ask you how to do this?
I cd'd to the script's directory and ran:
Code:
./Install_USB_Maker.sh
But that didn't create the USB installer. Rather, it outputted the directory of the .sh script.

PS: I am using a 14", 2021 MBP on macOS Ventura 13.3.
I am trying to get a bootable USB to install Mac OS X on a late 2009 Macbook (white, unibody) and late 2009 iMac 27".

Best regards
 

nndei

macrumors newbie
Jul 10, 2017
22
3
In the script's directory, run:
sh Install_USB_Maker.sh
Thank you.

I tried running that, but this is the output. No installation media seems to be created.

Code:
neri@MBP-di-Neri ~ % cd /Users/neri/Downloads/script
neri@MBP-di-Neri script % chmod +x /Users/neri/Downloads/script/Install_USB_Maker.sh
neri@MBP-di-Neri script % sh Install_USB_Maker.sh
/Users/neri/Downloads/script
neri@MBP-di-Neri script %

Best regards
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
My fault. I left ad hoc debug/test stuff in the script.

Open the script in a text editor and search for:
echo $SCRIPT_DIR

Delete this and the line immediately below that reads:
exit 0

Will fix later on GitHub.
 

nndei

macrumors newbie
Jul 10, 2017
22
3
Worked perfectly for Mac OS X Lion. Unfortunately, I couldn't make it work for El Capitan. When ran for El Capitan, it unmounted the dmg file.

I don't know if my feedback is helpful.

Thank you very much for the help, I really appreciate it. You saved me hours and lots of trials.

Best regards
 

nndei

macrumors newbie
Jul 10, 2017
22
3
Feedback is always helpful.

Fixed the earlier issue and made some small tweaks.
You can try with the updated version.
Hello,

I tried downloading the new script.
However, upon running the sh file, the output is:
Code:
neri@MBP-di-Neri ~ % cd /Users/neri/Downloads/script
neri@MBP-di-Neri script % chmod +x /Users/neri/Downloads/script/Install_USB_Maker.sh
neri@MBP-di-Neri script % sh Install_USB_Maker.sh       
Password:
sh-3.2#
And nothing proceeds as previously.

Thank you
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.