Blame

0986bb admin 2026-07-24 15:20:02
pi alpine headless install
1
# Raspberry Pi
2
3
## Headless Alpine Installation
4
Flash SD card with Alpine Linux using `rpi-imager`
5
6
Mount the SD card and drop the following files on the root of the card:
7
- [headless.apkovl.tar.gz](https://raw.githubusercontent.com/macmpi/alpine-linux-headless-bootstrap/refs/heads/main/headless.apkovl.tar.gz)
8
- `wpa_supplicant.conf`
9
10
```
11
country=CA
12
13
network={
14
key_mgmt=WPA-PSK
30e54f admin 2026-07-24 21:42:24
setup alpine
15
ssid="<network-name>"
16
psk="<password>"
0986bb admin 2026-07-24 15:20:02
pi alpine headless install
17
}
18
```
19
20
Find Pi's IP:
21
```
22
nmap -sn 192.168.1.0/24
23
```
24
25
SSH will be enabled by default, you can login as `root` with no password.
30e54f admin 2026-07-24 21:42:24
setup alpine
26
27
Run the setup script to install the system:
28
```
29
setup-alpine
30
```
31
32
When you reach the "Disk & Install" phase use the following options:
33
34
```
35
Disk & Install
36
----------------
37
No disks available. Try boot media /media/mmcblk0p1? (y/n) [n] y
38
39
Available disks are:
40
mmcblk0 (32.0 GB )
41
42
Which disk(s) would you like to use? (or '?' for help or 'none') [none] mmcblk0
43
44
The following disk is selected:
45
mmcblk0 (32.0 GB )
46
47
How would you like to use it? ('sys', 'data', 'crypt', 'lvm' or '?' for help) [?] sys
48
49
WARNING: The following disk(s) will be erased:
50
mmcblk0 (32.0 GB )
51
52
WARNING: Erase the above disk(s) and continue? (y/n) [n] y
53
```
871c23 admin 2026-07-24 21:48:24
tmpfs overlay
54
55
## Read-only root filesystem with tmpfs overlay
56
Makes root filesystem read-only reducing wear on SD card. Simply add `overlaytmpfs=yes` to `/boot/cmdline.txt`:
57
```
58
sed -i 's/$/ overlaytmpfs=yes/' /boot/cmdline.txt
59
reboot
60
```
61
62
Make root writable again:
63
```
64
sed -i 's/ overlaytmpfs=yes//' /boot/cmdline.txt
65
reboot
66
```
67
68
# References
69
- https://wiki.alpinelinux.org/wiki/Raspberry_Pi
70
- https://wiki.alpinelinux.org/wiki/Installation_on_a_headless_host
71
- https://wiki.alpinelinux.org/wiki/OverlayFS#Immutable_root_with_tmpfs_overlay