This web site is not a blog, even though it's a collection of random pieces of text on different subjects. However, I prefer more structure to the pages than the continuous flow common to the blog.

I recently started to experiment with Alpine Linux, a very compelling lightweight Linux based on BusyBox. My target was to run Alpine an a Raspberry Pi. There are several good pages describing the procedure for install with headless bootstrap. When setting up the SD card from a Mac, diskutil is the tool to use. The procedure as per the Alpine Wiki should be:

  • Format the SD card as FAT32
  • Untar the Alpine Raspberry PI tarball
  • Add in the headless apkvol mentioned above
  • Boot and log in to run setup-alpine

My idea was to do this without access any screen connected to the Pi. The procedure appeared to work fine, albeit that the system never came up reachable on the network after rebooting. Trying various configurations to no avail.

Mac Metadata Breaks the Boot

After leaving my initial idea and connecting a screen, the cause to the failure became obvious. The boot procedure failed, complaining on a broken apkvol-file named ._headless.apkvol.tar.gz The solution was easy:

$ find /Volumes/ALPINE -type f -name '._*' | xargs rm

In other words, once the SD card is ready, remove all Mac ._ metadata files. After this the initial instructions can be followed, and works fine.

Summary

The final procedure to prepare an Alpine SD card for a Raspberry Pi is to format the SD card:

$ diskutil partitiondisk -noEFI /dev/disk8 2 MBRFormat FAT32 ALPINE 10G FREE free R

Then download the Raspberry Pi tarball, as well as the headless bootstrap file. Finally, remove all ._ files before unmounting the SD card.


Copyright © 2024 Mikael Durling. Published Oct. 27, 2024, updated Nov. 25, 2024.