Skip to content

Instantly share code, notes, and snippets.

@loeschzwerg
Last active March 16, 2020 14:40
Show Gist options
  • Save loeschzwerg/8693c886ac811667dc3568b80abf3e68 to your computer and use it in GitHub Desktop.
Save loeschzwerg/8693c886ac811667dc3568b80abf3e68 to your computer and use it in GitHub Desktop.
Setup Raspberry Pi with Alpine Linux [Windows]

Install Alpine Linux

Download

Go to Alpine Linux Downloads and download your desired distro. I'll go with aarch64 for my Raspberry Pi 3B

Extract

Use 7Zip to extract this 'weird' *.tar.gz tarball (looking at you Win 10!). You can do it in Downloads.

Rename usercgf.txt to usercfg.txt and make it look like this

enable_uart=1
gpu_mem=32

Copy to SD Card

You probably have one on hand. I hope. Put it in your reader slot and open the partition manager: [Win] + R > diskmgmt.msc > [Enter]

Now delete the contents of your identified SD card (don't delete stuff you need!): Rightclick partition > Format

Rightclick partition > Delete Volume...

Create new Volume Rightclick partition > New simple Volume... > Create FAT with 256 MB of space

Now copy the stuff from your Downloads folder onto your freshly formatted SD card. !!! Eject the device !!!

Insert SD card and power on your Pi

Login as root. No password needed.

setup-alpine

Follow the steps presented to setup your Alpine distro.

add root access via ssh

Open /etc/ssh/sshd_config with your favourite editor. Change PermitRootLogin Yes and uncomment if necessary.

service sshd restart

Now ssh into the host:

ssh root@pi0

WTF is sys mode?

Pretty awesome: With security in mind, everything you put on your file system without saving will be deleted after a reboot. This ensures that malicious software will have a tough time on your freshly installed distro. So you would want to get familiar with lbu (It's a little like git but on a file system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment