Creating bootable installer for old OS X version with M2 laptop?
I'm running an M2 Air with Sonoma and would like to install any version of OS X, preferably Yosemite or El Capitan, on an iMac 7,1 via bootable installer (hard drive or flash drive doesn't matter). The iMac currently has an empty hard drive installed (no OS). When I download the .dmg files for any of the OS X versions from Apple, my laptop won't open the .pkg files and so I cannot get to the .app version I need in my applications folder to create a bootable installer via the usual terminal commands (see article below).
I've also tried Mavericks from another site but it was trash so I guess I know why Apple doesn't offer it anymore.
For Mountain Lion and Lion I tried restoring a hard drive with the .dmg files and that also didn't work.
So my question is: Is this even possible with my Air? And if yes, how to I get from the .dmg file to .app installer from which to run the infamous createinstallmedia script?
Thanks in advance :).
Create a bootable installer for macOS - Apple Support
MacBook Air