The above was done easily because I have a working MacBook Pro with Sonoma already installed on it.
However, I do not have a working OS X laptop with El Capitan on it.
Is it possible to create a USB installer without a working OS X system?
From the link above [ Create a bootable installer - Apple Support ] it states that
It goes on to say :
So If I am using Sonoma (which is a later version than macOS Sierra) it should work. The contradiction, however is that my Mac must also be compatible with the macOS I'm downloading.
When using Safari to download the El Capitan (10.11.6), using this link : http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg
I acquire a file called InstallMacOSX.dm at 6.2 GB
Using the command for El Capitan will not work as it is in my Downloads folder and the name of the file is called InstallMacOSX.dmg:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
So I rewrote the command as :
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/elcapitaninstaller --applicationpath /Users/alex/Downloads/InstallMacOSX.dmg
However, I think I messed up the command somehow, as that did not work out.
I was going to convert the .dmg file using dmg2img and then commit the .iso file to USB. Would that work?