createinstalliso icon indicating copy to clipboard operation
createinstalliso copied to clipboard

createInstallMedia for x86-only OSes won't run on M1

Open adespoton opened this issue 4 years ago • 4 comments

Just thought I should give you a heads-up: if I attempt to run a pre-M1 createInstallMedia on my M1 Mac running Monterey, I'm greeted with the response of: "Killed: 9".

This breaks pretty much every conversion script out there that depends on createInstallMedia, including yours. So a new requirement of createInstallMedia appears to be that you're running an x86 version of macOS.

I wonder if https://gist.github.com/julianxhokaxhiu/6ed6853f3223d0dd5fdffc4799b3a877 could be updated to work for any OS from Mountain Lion through Big Sur without a dependency on createInstallMedia?

Lion, of course, works just by copying the InstallESD.dmg.

adespoton avatar Jan 28 '22 22:01 adespoton

I dug into the crash logs and found this interesting line:

Exception Type: EXC_CRASH (SIGKILL (Code Signature Invalid))

So it looks like it's the older versions dying not because of any architecture or in-coded issues, but due to the expired certs. Can probably be fixed via a date change on the host. Maybe a cert expiry check at the beginning with an error line emitted if this is the case? Or even better... I know there's a way to set the reported date ONLY for a specific process tree. I can't recall how it's done though. The alternative would be to set the time before running createInstallMedia and then set it back immediately after starting the process, so as to minimize impact elsewhere on the system.

adespoton avatar Jan 29 '22 01:01 adespoton

Issue just seems to be on High Sierra through Catalina. Changing the date doesn't appear to fix it, neither does stripping extended attributes.

adespoton avatar Jan 29 '22 04:01 adespoton

I found a solution: from the Terminal, run: codesign --remove-signature /path/to/createInstallMedia After doing that, everything works!

adespoton avatar Jan 29 '22 04:01 adespoton

I got The bless of the installer disk image failed. Running with rosetta (arch -x86_64 /bin/zsh) helped

shlyakpavel avatar Jul 27 '22 16:07 shlyakpavel