Use "startosinstall" to install macOS Catalina on External Drive I want to use &quot;startosinstall&quot; so that I can install macOS Catalina onto an external hard drive in order to preload MacOS onto multiple SSD's quickly.
I've researched into this and have found websites such as https://grahamrpugh.com/2018/03/26/reinstall-macos-from-system-volume.html which suggest using:
/Applications/Install\ macOS\ Catalina.app/Contents/Resources/startosinstall \

--applicationpath /Applications/Install\ macOS\ Catalina.app \

  --agreetolicense --nointeraction --volume /Volumes/External\ Macintosh\ HD

I've tried running the above but have had no success and always find that I get this returned:
Usage: startosinstall

Arguments
--applicationpath, a path to copy of the OS installer application to start the install with.
--license, prints the user license agreement only.
--agreetolicense, agree to license the license you printed with --license.
--rebootdelay, how long to delay the reboot at the end of preparing. This delay is in seconds and has a maximum of 300 (5 minutes).
--pidtosignal, Specify a PID to which to send SIGUSR1 upon completion of the prepare phase. To bypass &quot;rebootdelay&quot; send SIGUSR1 back to startosinstall.
--converttoapfs, specify either YES or NO on if you wish to convert to APFS.
--installpackage, the path of a package (built with productbuild(1)) to install after the OS installation is complete; this option can be specified multiple times.
--eraseinstall, Erase all volumes and install to a new one. Optionally specify the name of the new volume with --newvolumename.
--newvolumename, the name of the volume to be created with --eraseinstall.
--usage, prints this message.

Example: startosinstall --converttoapfs YES


but can't seem to actually get anything to run.
If anyone could provide me with some working code or show me how to solve this problem, I would be eternally grateful.
Thanks for your help
The Apple tool targets the current booted OS as far as I've been able to accomplish. Using asr is still valid, but can take some time to get the arguments correct. I think the tool you want for scripting installers is Mac Deploy Stick. You can use it without the hardware, but the hardware is quite amazing and a real time saver based on how many operations you need to handle.

https://twocanoes.com/products/mac/mac-deploy-stick/

This Sabrent gear also has served us well with push button cloning. There are many like it but this brand works for me. You can go bigger as well, based on how much time you save.

https://www.amazon.com/Sabrent-External-Duplicator-Function-EC-HD2B/dp/

You might experiment with running the installer once and then when the system boots to the external drive, instead of running the assistant, shut down the system and try cloning the drive.