Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Exit Status Code: '9', Message: on M1 #121

Closed
KenjiTakahashi opened this issue Jan 23, 2023 · 8 comments · Fixed by #133
Closed

Invalid Exit Status Code: '9', Message: on M1 #121

KenjiTakahashi opened this issue Jan 23, 2023 · 8 comments · Fixed by #133
Labels
question Further information is requested

Comments

@KenjiTakahashi
Copy link

Trying to build iso on an M1 MacBook fails with the following result:

┌─────────────────────┐
│ BOOTABLE DISK IMAGE │
└─────────────────────┘
  ├─ Creating new temporary directory '/private/tmp/com.ninxsoft.mist/061-26589/iso'...
  ├─ Creating disk image '/private/tmp/com.ninxsoft.mist/061-26589/iso/061-26589.dmg'...
  ├─ Mounting disk image at mount point '/Volumes/Install macOS Mojave'...
  ├─ Creating install media at mount point '/Volumes/Install macOS Mojave'...
  └─ Invalid Exit Status Code: '9', Message:

For what it's worth, looks like others also have the problem: BITespresso/createinstalliso#2.

@ninxsoft
Copy link
Owner

Thanks @KenjiTakahashi, this is a limitation of the createinstallmedia tool in macOS Installers 10.15 and older not running on Apple Silicon Macs.

It's a little buried, but we do highlight this in the --help output when downloading an installer (second-last line):

~ mist download installer --help 
OVERVIEW: Download a macOS Installer.
* macOS Installers for macOS Catalina 10.15 and older are for Intel based Macs only.
* macOS Installers for macOS Big Sur 11 and newer are Universal - for both Apple Silicon and Intel based Macs.

USAGE: mist download installer [<options>] <search-string> <output-type> ...

ARGUMENTS:
  <search-string>         Specify a macOS name, version or build to download:
                          * macOS Ventura
                          * macOS Monterey
                          * macOS Big Sur
                          * macOS Catalina
                          * macOS Mojave
                          * macOS High Sierra
                          * 13.x (macOS Ventura)
                          * 12.x (macOS Monterey)
                          * 11.x (macOS Big Sur)
                          * 10.15.x (macOS Catalina)
                          * 10.14.x (macOS Mojave)
                          * 10.13.x (macOS High Sierra)
                          * 22C (macOS Ventura 13.1.x)
                          * 21G (macOS Monterey 12.6.x)
                          * 20G (macOS Big Sur 11.7.x)
                          * 19H (macOS Catalina 10.15.7)
                          * 18G (macOS Mojave 10.14.6)
                          * 17G (macOS High Sierra 10.13.6)
                          Note: Specifying a macOS name will assume the latest version and build of that particular macOS.
                          Note: Specifying a macOS version will assume the latest build of that particular macOS.
  <output-type>           Specify the requested output type(s):
                          * application to generate a macOS Installer Application Bundle (.app).
                          * image to generate a macOS Disk Image (.dmg).
                          * iso to generate a Bootable macOS Disk Image (.iso), for use with virtualization software (ie. Parallels Desktop, VMware Fusion, VirtualBox).
                          Note: This option will fail when targeting macOS Catalina 10.15 and older on Apple Silicon Macs.
                          * package to generate a macOS Installer Package (.pkg).

@ninxsoft ninxsoft added the question Further information is requested label Jan 24, 2023
@ninxsoft
Copy link
Owner

ninxsoft commented Jan 24, 2023

Slightly less buried in the Mist.app app settings:

Screenshot 2023-01-24 at 7 19 58 pm

@KenjiTakahashi
Copy link
Author

Ah, I indeed missed that note, sorry!
Wonder if there is a way to fix it, though. I am kinda in a chicken and egg situation right now. My old Mac is dying and the only other MacOS machine I have is a new M1 MacBook. Cannot even install in a VM, because I would first have to have an installer 😅.

@ninxsoft
Copy link
Owner

ninxsoft commented Jan 24, 2023

Hmm good point 🤔

It might be worth bringing up your issue in the #mist or #macos channels in the Mac Admins Slack and see what the brains trust can conjure up 👍

@KenjiTakahashi
Copy link
Author

So I have looked around and did some experiments. It looks indeed to be incompatible signature problem, like some suggested in other threads. There is no need to remove it, though, it can be replaced with a new one.

I've made a dirty patch to mist like this:
codesign.patch

And was able to successfully create installer image for Mojave on Ventura on M1 MacBook.

Guess a more proper code would only apply this if necessary and maybe even have it behind some "at your own risk" flag.
If you're fine with that, I might have a try at creating a PR.

@ninxsoft
Copy link
Owner

I am hesitant to allow the ability to modify the contents of macOS Installers provided by Apple, even if it's just the removal of a code-signing certificate.

I can however look into a more explicit error message that blocks the user from proceeding when attempting to download macOS Catalina 10.15 with the iso option selected 👍

@ninxsoft
Copy link
Owner

@KenjiTakahashi I have added more descriptive output when attempting to build a macOS 10.15 or older ISO on an Apple Silicon Mac: #133

➜ sudo mist download installer "Mojave" iso
┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ User is 'root'...
  ├─ Download search string will be 'Mojave'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible installers will be 'false'...
  ├─ Cache downloads will be 'false'...
  ├─ Output directory will be '/Users/Shared/Mist'...
  ├─ Temporary directory will be '/private/tmp/com.ninxsoft.mist'...
  ├─ Force flag has not been set, existing files will not be overwritten...
  ├─ Bootable Disk Image name will be 'Install %NAME% %VERSION%-%BUILD%.iso'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS download 'Mojave'...
  ├─ Found [061-26589] macOS Mojave 10.14.6 (18G103) [2019-10-15]
  ├─ macOS Catalina 10.15 and older cannot generate Bootable Disk Images on Apple Silicon Macs...
  └─ Replace 'iso' with another output type or select a newer version of macOS, exiting...

@KenjiTakahashi
Copy link
Author

That's fine by me. I suppose if someone really needs it, they can find this conversation and do the mod like I did. And I hope that I'll never need this again ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants