Source: https://mayphus.org/starflash/ Title: Starflash Metadata: {"category":"tool","id":"starflash","kind":"tool","language":"en","route":"/starflash/","tags":["macos","usb","ubuntu"],"type":"project"} Flash a bootable drive without guessing Starflash 0.4.0 is a Racket command-line guide for turning an image into a bootable USB drive or SD card on macOS. Install Racket before running it. The interactive guide checks the target, shows a dry run, and asks you to type WRITE before a write. [Download Starflash](https://mayphus.org/downloads/starflash/starflash-cli.txt). Save the downloaded `starflash-cli.txt` as `starflash`. Run the guide Use your own Ubuntu Server ISO or device image. After installing Racket and saving the script as `starflash`, make it executable and start the guide: ```sh chmod +x starflash ./starflash ``` It asks for the image, the external whole disk, and optional Ubuntu cloud-init settings. Review before writing A dry run checks that the image exists and has a supported filename extension, and that the target is an externally attached, writable, non-virtual whole disk with a known size. For uncompressed images, it also checks that the image fits. The dry run does not unmount, erase, write to, or eject the disk. **An external hard disk can pass these checks too. The removable-media flag is displayed, not enforced; choosing the destructive write step can erase that disk’s existing data.** Verify the target disk’s identity and contents before authorizing a write. In the interactive guide, nothing is erased unless you choose the write step and type `WRITE`. ```sh ./starflash --image ubuntu.iso --disk /dev/disk4 --dry-run ``` Ubuntu autoinstall, when you need it Starflash can generate NoCloud seed files and prepare an Ubuntu installation tree with embedded installer answers. A separate ISO remastering tool is required to turn that tree into a bootable ISO or USB image before flashing it. Local installer answers can remove the need to serve those answers from a MacBook or over Ethernet; they do not guarantee a fully offline installation. Advanced scripted write The `--write --yes` flags explicitly authorize a destructive disk write without the interactive `WRITE` prompt. The command below is illustrative; replace its image and disk only after inspecting a dry run. ```sh sudo ./starflash --image ubuntu.iso --disk /dev/disk4 --write --yes ``` To render Ubuntu autoinstall seed files without writing a disk: ```sh ./starflash --ubuntu-autoinstall --seed-dir cidata --render-seed ```