Skip to content

arturkraina/raspberrypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Raspberry Pi OS Installer for macOS

Interactive bash script for creating a bootable SD card with an operating system for Raspberry Pi directly from macOS.

Purpose

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)

Supported Models

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

Supported Operating Systems

  • 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

Requirements

  • macOS with Bash 3.2+
  • Installed tools: curl, xz, gzip, unzip
  • SD card (min. 8 GB recommended)
# Install dependencies via Homebrew
brew install xz

Usage

chmod +x rpbios_install.sh
./rpbios_install.sh

Installation Flow

  1. Model selection – script displays list of compatible Pi models
  2. OS category selection – 10 categories by purpose
  3. OS selection – only compatible systems for chosen model
  4. Architecture selection – 32-bit/64-bit (if available)
  5. Confirmation – selection summary before download
  6. Download – with option to enter custom URL on failure
  7. SD card selection – waits for insertion if not found
  8. Image write – using dd to raw disk
  9. Headless configuration – optional SSH and WiFi setup
  10. Completion – safe card ejection

Safety Features

  • Displays only external disks (cannot accidentally erase system disk)
  • Requires YES confirmation before writing
  • Verifies downloaded file integrity
  • Offers manual URL entry on download failure

Troubleshooting

Download failed

Script offers options:

  1. Enter custom URL
  2. Retry download
  3. Use existing image
  4. Quit

SD card not found

Script waits for card insertion – press Enter to refresh.

Extraction error

File may be corrupted. Try downloading again or enter an alternative URL.

License

MIT

About

raspi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages