Skip to content

Instantly share code, notes, and snippets.

@vimagick
Created July 15, 2026 08:39
Show Gist options
  • Select an option

  • Save vimagick/b077eb6e4c683b8d17ee1039e5d5d831 to your computer and use it in GitHub Desktop.

Select an option

Save vimagick/b077eb6e4c683b8d17ee1039e5d5d831 to your computer and use it in GitHub Desktop.
Make Raspberry Pi OS on macOS without Imager
$ diskutil list
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *30.8 GB    disk2
   1:             Windows_FAT_32 bootfs                  536.9 MB   disk2s1
   2:                      Linux                         30.2 GB    disk2s2

$ diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful

$ which dd
/usr/local/opt/coreutils/libexec/gnubin/dd

$ xz -l 2026-06-18-raspios-trixie-arm64-lite.img.xz
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1      15    500.6 MiB  2,840.0 MiB  0.176  CRC64   2026-06-18-raspios-trixie-arm64-lite.img.xz

$ xz -dc 2026-06-18-raspios-trixie-arm64-lite.img.xz | sudo dd of=/dev/disk2 bs=4M status=progress
0+45548 records in
0+45548 records out
2977955840 bytes (3.0 GB, 2.8 GiB) copied, 676.829 s, 4.4 MB/s

$ vim /Volumes/bootfs/user-data

$ diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful

$ diskutil eject disk2
Disk disk2 ejected
#cloud-config
enable_ssh: true
users:
- name: pi
groups: users,adm,dialout,audio,netdev,video,plugdev,cdrom,games,input,gpio,spi,i2c,render,sudo
shell: /bin/bash
lock_passwd: false
plain_text_password: 'raspberrypi'
ssh_authorized_keys:
- 'ssh-ed25519 AAAAC3... kev@mac'
- 'ssh-ed25519 AAAAC3... kev@win'
sudo: ALL=(ALL) NOPASSWD:ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment