Interactive bash script for creating a bootable SD card with an operating system for Raspberry Pi directly from macOS.
The script automates the entire OS installation process on an SD card:
- Raspberry Pi model selection
- Operating system and architecture selection
- Image download
- Bootable media creation
- Headless access configuration (SSH, WiFi)
| Category | Models |
|---|---|
| 32-bit only | Pi 2 Model B v1.1 |
| 32-bit / 64-bit | Pi 3B, 3B+, 3A+, Pi 4B, Pi 400, CM3, CM3+, CM4, CM4S, Zero 2 W |
| 64-bit only | Pi 5, Pi 500, Pi 500+, CM5 |
- Official: Raspberry Pi OS (Lite, Desktop, Full)
- Ubuntu: Server 22.04/24.04, Desktop 24.04
- Minimal: DietPi, Alpine Linux
- Media Center: LibreELEC, OSMC
- Retro Gaming: RetroPie, Batocera, Lakka, Recalbox
- Smart Home: Home Assistant OS
- Audio: Volumio, moOde Audio
- Security: Kali Linux, OpenWrt
- Desktop: Manjaro ARM, Twister OS
- Advanced: Arch Linux ARM, RISC OS
- macOS with Bash 3.2+
- Installed tools:
curl,xz,gzip,unzip - SD card (min. 8 GB recommended)
# Install dependencies via Homebrew
brew install xzchmod +x rpbios_install.sh
./rpbios_install.sh- Model selection β script displays list of compatible Pi models
- OS category selection β 10 categories by purpose
- OS selection β only compatible systems for chosen model
- Architecture selection β 32-bit/64-bit (if available)
- Confirmation β selection summary before download
- Download β with option to enter custom URL on failure
- SD card selection β waits for insertion if not found
- Image write β using
ddto raw disk - Headless configuration β optional SSH and WiFi setup
- Completion β safe card ejection
- Displays only external disks (cannot accidentally erase system disk)
- Requires
YESconfirmation before writing - Verifies downloaded file integrity
- Offers manual URL entry on download failure
Script offers options:
- Enter custom URL
- Retry download
- Use existing image
- Quit
Script waits for card insertion β press Enter to refresh.
File may be corrupted. Try downloading again or enter an alternative URL.
MIT