The best of both worlds: Raspberry Pi OS kernel and firmware for perfect hardware compatibility, combined with Alpine Linux userland for minimal footprint and efficiency.
| Feature | Description |
|---|---|
| π§ Maximum Compatibility | Uses official Raspberry Pi OS kernel and firmware for perfect hardware support |
| πͺΆ Minimal Footprint | Alpine Linux userland with musl libc - fits on a 2GB SD card |
| π Secure by Default | SSH enabled with Dropbear, minimal attack surface |
| π¦ Modern Package Management | Alpine's apk package manager with vast repository access |
| π Network Ready | DHCP on ethernet, WiFi support with wpa_supplicant |
| πΎ SD Card Friendly | /var/log on tmpfs to reduce wear on your SD card |
| βοΈ Zero-Touch Configuration | Configure WiFi, SSH, and system settings before first boot |
| π Weekly Updates | Automated builds with latest Raspberry Pi OS kernels |
Alternative downloads: All Releases | Direct Download | SHA256 Checksum
Use an imaging tool that writes the compressed image as it is:
- Raspberry Pi Imager: Choose OS β Use custom, and pick the
.img.xz - balenaEtcher: Flash from file, and pick the
.img.xz
Do not use Win32DiskImager: it cannot read .xz, and writing the compressed file leaves a card with no boot partition (Windows then offers to format it). If your tool only takes a plain .img, decompress it first (7-Zip on Windows, xz -d on Linux or macOS).
On Linux, without an imaging tool:
# Write to SD card (replace /dev/sdX with your SD card device)
xz -dc RasPINE-YYYY-MM-DD.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsyncRasPINE supports zero-touch configuration! Mount the boot partition after writing the image and create a configuration file:
# Mount the boot partition (adjust device as needed)
mkdir -p /mnt/boot
mount /dev/sdX1 /mnt/boot
# Copy and edit the configuration template
cp /mnt/boot/raspine-config.txt.sample /mnt/boot/raspine-config.txt
nano /mnt/boot/raspine-config.txt
# Unmount when done
umount /mnt/bootSee the Boot Configuration section for details on available options.
Insert the SD card and power on your Raspberry Pi. Connect via SSH or console:
- Username:
raspine - Password:
raspberry(or your configured password)
β οΈ Security Note: Change the password immediately after first login usingpasswd
RasPINE includes a powerful boot configuration system that allows you to set up your system before the first boot. This is perfect for headless deployments or when you need to configure multiple devices.
- On the boot partition, you'll find
raspine-config.txt.sample - Copy this to
raspine-config.txtand edit with your settings - On first boot, RasPINE processes this file and applies your configuration
- The config file is automatically deleted after processing for security
Configure multiple WiFi networks with priority ordering:
# Primary network (highest priority if not numbered)
wifi_ssid=HomeNetwork
wifi_password=HomePassword
# Additional networks with priority (higher numbers = higher priority)
wifi_ssid_2=WorkNetwork
wifi_password_2=WorkPassword
wifi_ssid_3=MobileHotspot
wifi_password_3=HotspotPassword
# WiFi country code (affects available channels)
wifi_country=GB
# Allow connection to open networks
enable_open_networks=false# Set password for raspine user
user_password=MySecurePassword
# Enable SSH password authentication (default is key-only)
enable_ssh_password=true
# Add SSH public key for secure access
ssh_key=ssh-rsa AAAAB3NzaC1yc2EAAAA... user@example.com# Set hostname
hostname=my-raspine
# Set timezone
timezone=Europe/London
# Set locale
locale=en_GB.UTF-8# RasPINE Boot Configuration
# WARNING: This file will be DELETED after processing for security!
# === WIFI CONFIGURATION ===
wifi_ssid=MyHomeNetwork
wifi_password=MyHomePassword
wifi_ssid_2=WorkNetwork
wifi_password_2=WorkPassword
wifi_country=GB
enable_open_networks=false
# === USER SECURITY ===
user_password=MySecurePassword123!
enable_ssh_password=false
ssh_key=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEx... user@example.com
# === SYSTEM CONFIGURATION ===
hostname=raspine-zero
timezone=Europe/London
locale=en_GB.UTF-8- The configuration file is automatically deleted after processing to protect your passwords
- WiFi passwords and user passwords are never stored in plain text after configuration
- SSH key-only authentication is recommended for production use
- Always keep a backup of your configuration in a secure location
RasPINE is available in two image variants:
The standard image supports every Raspberry Pi ever made, from the original Pi 1 through to the Pi 5. It uses a 32-bit (armhf) userland with a 64-bit (aarch64) kernel on Pi 3 and later models.
| Series | Models |
|---|---|
| Classic | Pi 1 Model A/B/B+ |
| Zero | Pi Zero, Zero W, Zero 2 W |
| Standard | Pi 2B, 3A+/B/B+, 4B, 5 |
| Compute | CM1, CM3, CM3+, CM4, CM4S, CM5 |
| Special | Pi 400, Pi 500 |
The aarch64 image is a fully native 64-bit build for newer Pi models. It includes the v8 kernel for Pi 3/4 and the dedicated Pi 5 (2712) kernel.
| Series | Models |
|---|---|
| Zero | Pi Zero 2 W |
| Standard | Pi 3A+/B/B+, 4B, 5 |
| Compute | CM3, CM3+, CM4, CM4S, CM5 |
| Special | Pi 400, Pi 500 |
DHCP is enabled by default on eth0. No configuration needed. A USB Ethernet adapter works the same way: its driver loads when it is plugged in and it comes up as eth0 (or eth1 beside a built-in port).
With more than one interface up (wired and WiFi, or a USB Ethernet adapter), the raspine-netroute package's dhcpcd hook gives each interface a routing table of its own, and each of its addresses (IPv4 and IPv6) a rule using it: a reply always leaves by the interface its address belongs to, so the hotspot answers on both. New connections still go out by the preferred interface (wired first). The tables and rules follow dhcpcd as interfaces come and go; with one interface they change nothing.
Use the boot configuration system described above to set up WiFi before first boot.
Edit /etc/wpa_supplicant/wpa_supplicant.conf:
network={
ssid="YourNetworkSSID"
psk="YourNetworkPassword"
}Then enable the wireless interface:
sudo ifup wlan0RasPINE uses Alpine's apk package manager:
# Update package index
apk update
# Install packages
apk add nano htop git
# Search for packages
apk search nginx
# Remove packages
apk del package-nameRasPINE includes the custom RasPINE repository with Raspberry Pi OS kernels and firmware:
# Already configured in the image
https://raspine.pistar.uk/v3.23/community# List all services
rc-status
# Start/stop/restart services
rc-service dropbear start
rc-service networking restart
# Enable/disable at boot
rc-update add dropbear default
rc-update del dropbear defaultRasPINE keeps a Raspberry Pi from staying hung, without rebooting into a loop: the raspine-watchdog package (packages/raspine-watchdog, built and published whenever its files change, installed in every image; apk add raspine-watchdog on an older system):
- Hardware watchdog (
raspine-watchdog): BusyBox'swatchdogfeeds/dev/watchdogevery 5 seconds with a 120 second timeout (WATCHDOG_TIMEOUTin/etc/conf.d/raspine-watchdog). A system frozen that long is reset by the hardware. Stopping the service disarms it. - Shutdowns that hang: inittab's first shutdown action (
raspine-watchdog-mark stopping) kills the feeder without disarming it, so a shutdown or reboot that has not finished in 120 seconds is reset rather than left hung. - Service checks (
raspine-watchdog-health): each/etc/raspine-watchdog.d/*.confnames a check, how to restart it, and how long to wait (see the README there); packages drop their own there. A check that fails is restarted; after its restarts, the system is rebooted. Recovery reboots are limited to 3 in 6 hours (MAX_REBOOTS), and stop altogether after two in a row whose boots never became healthy: the system then stays up and the check is retried every 15 minutes. - Boot record: each boot records how the last one ended, clean, a shutdown that never finished, or none at all (power lost, or a hang), in
/var/lib/raspine-watchdog/eventswith the restarts and reboots. A shutdown's start is marked by inittab's first shutdown action, its end byraspine-watchdog-healthas it stops, while the filesystem the record is on is still mounted.
Only on a Raspberry Pi.
# Check Alpine version
cat /etc/alpine-release
# Check kernel version
uname -r
# Check disk usage
df -h
# Check memory usage
free -h| Partition | Size | Format | Mount Point | Purpose |
|---|---|---|---|---|
| 1 | 256MB | FAT32 | /boot/firmware |
Boot files, kernel, firmware, config |
| 2 | ~1.7GB | ext4 | / |
Root filesystem |
- All kernel images (kernel*.img)
- Device tree blobs and overlays
- Kernel modules (
/usr/lib/modules/*) - Firmware blobs (
/usr/lib/firmware/*) - Boot configuration files
- Complete userland (musl libc)
- OpenRC init system
- BusyBox utilities
- APK package manager
- Dropbear SSH server
- Network management tools
- Boot configuration processor (
raspine-config) - Hybrid integration scripts
- Custom APK repository configuration
| Issue | Solution |
|---|---|
| No network | Check cable/WiFi config, verify with ip addr show |
| WiFi not connecting | Check country code, verify password, check wpa_supplicant logs |
| SSH refused | Ensure dropbear is running: rc-status |
| Config not applied | Config file must be named exactly raspine-config.txt |
| Module errors | Run depmod -a to regenerate module dependencies |
| Boot issues | Check /boot/firmware/config.txt and cmdline.txt |
| Package not found | Run apk update first |
Check the Issues page or create a new issue if you encounter problems.
Contributions are welcome! Open an issue or submit a pull request.
git clone https://github.com/MW0MWZ/RasPINE.git
cd RasPINEThis project combines components from:
- Raspberry Pi OS - Raspberry Pi OS License
- Alpine Linux - Alpine License
- Raspberry Pi Foundation for kernel and firmware
- Alpine Linux Team for the minimal userland
- Pi-Star Team for inspiration and collaboration
- The Amateur Radio community for continuous support