munki / macadmin-scripts

Scripts of possible interest to macOS admins
Other
2.33k stars 523 forks source link

BigSur image Issue #94

Closed rehannali closed 3 years ago

rehannali commented 3 years ago

Hi, i used your script to download Mac OS BigSur for my MacBook Pro 2015 but got this error while making it bootable USB to install it on another Machine as well.

/Application/Install macOS Big Sur.app does not appear to be valid OS installer application.

gregneagle commented 3 years ago

There’s really not enough detail here for anyone else to attempt to investigate or replicate, especially since this scrip doesn’t make bootable USB drives. Post a transcript of what you actually did.

rehannali commented 3 years ago

@gregneagle I simply tried to make Bootable USB from app which is available in Sparse image. I simple tried to run this command when I got error.

sudo /Application/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/bigsur

bigsur is formatted USB. I tried Big Sur 11.4.

gregneagle commented 3 years ago

My script creates a disk image containing the macOS installer. The path you show for your command would not be using the macOS installer that was downloaded by my script.

rehannali commented 3 years ago

@gregneagle Yes, you are right. Because when I got message from that image, I tried to copy it in application folder and try to run it again but got same error.

gregneagle commented 3 years ago

In fact it would also fail if there was a Big Sur installer in the startup volume’s /Applications folder since your path references /Application

gregneagle commented 3 years ago

So I asked you to tell us exactly what you did and you keep leaving out important details.

rehannali commented 3 years ago

In fact it would also fail if there was a Big Sur installer in the startup volume’s /Applications folder since your path references /Application

It was a typo, sorry about that. I first run directly from image and drop path to terminal so I thought may be it can't run from image then I copy Installer file to /Applications folder and tried to run it again got exact same error.

gregneagle commented 3 years ago

So instead of describing what you did, please show what you are doing. Copy and paste an entire terminal session, showing what commands you run and what options you choose.

rehannali commented 3 years ago

There is one more thing, when I tried to open up installer file directly it opens installer wizard to update it but won't create bootable usb.

gregneagle commented 3 years ago

In my first reply I asked “Post a transcript of what you actually did.”

gregneagle commented 3 years ago

“There is one more thing, when I tried to open up installer file directly it opens installer wizard to update it”. That’s the expected behavior of a macOS installer application.

rehannali commented 3 years ago

@gregneagle This is what i run and got message.

apple@apples-mbp bigsur % sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/bigsur
Password:
/Applications/Install macOS Big Sur.app does not appear to be a valid OS installer application.
apple@apples-mbp bigsur % 
gregneagle commented 3 years ago

Again: my script does not put the macOS installer app in that location. I keep asking for step by step what you did.

rehannali commented 3 years ago

This is transcript when i download with installinstallmacos.py

apple@apples-mbp bigsur % sudo ./installinstallmacos.py 
Downloading https://swscan.apple.com/content/catalogs/others/index-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog...
Downloading http://swcdn.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/001-51042.English.dist...
Downloading http://swcdn.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/001-15219.English.dist...
Downloading http://swcdn.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/041-88800.English.dist...
Downloading http://swcdn.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/061-26578.English.dist...
Downloading http://swcdn.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/001-57224.English.dist...
Downloading http://swcdn.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/001-36735.English.dist...
Downloading http://swcdn.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/041-90855.English.dist...
Downloading http://swcdn.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/041-91758.English.dist...
Downloading http://swcdn.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/061-86291.English.dist...
No server metadata for 071-29172
Downloading https://swdist.apple.com/content/downloads/40/42/071-29172-A_50FL5BT4I6/5w0xm8c31yigcf2iov4n4mlsvnw1upzo2q/071-29172.English.dist...
No server metadata for 071-00696
Downloading https://swdist.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/071-00696.English.dist...
Downloading http://swcdn.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/001-68446.English.dist...
No server metadata for 071-32414
Downloading https://swdist.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/071-32414.English.dist...
Downloading http://swcdn.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/001-36801.English.dist...
Downloading http://swcdn.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/061-26589.English.dist...
Downloading http://swcdn.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/001-04366.English.dist...
No server metadata for 071-14766
Downloading https://swdist.apple.com/content/downloads/12/32/071-14766-A_Q2H6ELXGVG/zx8saim8tei7fezrmvu4vuab80m0e8a5ll/071-14766.English.dist...
 #      ProductID    Version    Build   Post Date  Title
 1      001-15219    10.15.5  19F2200  2020-06-15  macOS Catalina
 2      001-68446    10.15.7    19H15  2020-11-11  macOS Catalina
 3      071-00696       11.4    20F71  2021-06-02  macOS Big Sur
 4      071-32414     11.3.1   20E241  2021-05-03  macOS Big Sur
 5      001-04366    10.15.4  19E2269  2020-05-04  macOS Catalina
 6      001-36801    10.15.6  19G2021  2020-08-12  macOS Catalina
 7      061-86291    10.15.3  19D2064  2020-03-23  macOS Catalina
 8      041-91758    10.13.6    17G66  2019-10-19  macOS High Sierra
 9      001-57224    10.15.7     19H4  2020-10-27  macOS Catalina
10      071-14766     11.2.3    20D91  2021-03-08  macOS Big Sur
11      061-26589    10.14.6   18G103  2019-10-14  macOS Mojave
12      001-51042    10.15.7     19H2  2020-09-24  macOS Catalina
13      001-36735    10.15.6  19G2006  2020-08-06  macOS Catalina
14      041-88800    10.14.4  18E2034  2019-10-23  macOS Mojave
15      041-90855    10.13.5   17F66a  2019-10-23  Install macOS High Sierra Beta
16      061-26578    10.14.5  18F2059  2019-10-14  macOS Mojave
17      071-29172       11.3   20E232  2021-04-26  macOS Big Sur

Choose a product to download (1-17): 3
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/InstallInfo.plist...
** Resuming transfer from byte position 188
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   188    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/UpdateBrain.zip...
** Resuming transfer from byte position 1996517
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 1949k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/MajorOSInfo.pkg...
** Resuming transfer from byte position 2633194
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 416
Downloading https://swdist.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/MajorOSInfo.pkm...
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/InstallAssistant.pkg...
** Resuming transfer from byte position 12395342506
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 416
Downloading https://swdist.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/InstallAssistant.pkm...
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/Info.plist...
** Resuming transfer from byte position 5773
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  5773    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Downloading http://swcdn.apple.com/content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/BuildManifest.plist...
** Resuming transfer from byte position 1649393
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 1610k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Making empty sparseimage...
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.pRRCoH
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “InstallAssistant.pkg”.)
Command '[u'/usr/sbin/installer', u'-pkg', u'./content/downloads/55/59/071-00696-A_4T69TQR1VO/9psvjmwyjlucyg708cqjeaiylrvb0xph94/071-00696.English.dist', u'-target', '/private/tmp/dmg.pRRCoH']' returned non-zero exit status 1
Product installation failed.
apple@apples-mbp bigsur % 

After that i tried to install from image file like this.

apple@apples-mbp bigsur % /Volumes/Install_macOS_11.4-20F71/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/bigsur 
This tool must be run as root.
apple@apples-mbp bigsur % sudo /Volumes/Install_macOS_11.4-20F71/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/bigsur
Password:
/Volumes/Install_macOS_11.4-20F71/Applications/Install macOS Big Sur.app does not appear to be a valid OS installer application.
apple@apples-mbp bigsur %
gregneagle commented 3 years ago

Gotta address this problem first:

Making empty sparseimage...
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.pRRCoH
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “InstallAssistant.pkg”.)

Betting the solution is in the READ ME and is related to Catalina+ privacy protections.

gregneagle commented 3 years ago

https://github.com/munki/macadmin-scripts#important-note-for-catalina

rehannali commented 3 years ago

https://github.com/munki/macadmin-scripts#important-note-for-catalina

I tried with shared location but still having same problem.

grahampugh commented 3 years ago

@rehannali for your specific needs, you may not need to use this tool. The built in softwareupdate command has functionality you could try.

sudo softwareupdate --list-full-installers lists available installers. sudo softwareupdate --fetch-full-installer --full-installer-version X.Y downloads a specific version if available in the list. The installer app is installed to /Applications.

Example:

% sudo softwareupdate --list-full-installers
Password:
Finding available software
Software Update found the following full installers:
* Title: macOS Big Sur, Version: 11.4, Size: 12395342506K, Build: 20F71
* Title: macOS Big Sur, Version: 11.3.1, Size: 12411305377K, Build: 20E241
* Title: macOS Big Sur, Version: 11.3, Size: 12425084347K, Build: 20E232
* Title: macOS Big Sur, Version: 11.2.3, Size: 12211077798K, Build: 20D91

% sudo softwareupdate --fetch-full-installer --full-installer-version 11.4
Scanning for 11.4 installer
MBDisplay: creating data for display 0x1 (main) with bounds o=[0.000000, 0.000000], s=[1440.000000, 900.000000]
Installing: 1.0%
...
rehannali commented 3 years ago

@grahampugh Thanks for your help. My issue is resolved. I'm able to download through softwareupdate and successfully make bootable USB with 11.4 version.