Skip to content

Instantly share code, notes, and snippets.

@yuyoyuppe
Last active November 5, 2022 21:44
Show Gist options
  • Save yuyoyuppe/ed62d7b02b81b097fdc05b074036c19a to your computer and use it in GitHub Desktop.
Save yuyoyuppe/ed62d7b02b81b097fdc05b074036c19a to your computer and use it in GitHub Desktop.
Raspberri Pi Void Linux

How to install Void linux on Raspberry Pi from Windows

# Extract .img file somwhere, e.g.: 
cd /mnt/d/Downloads/temp/void-rpi-aarch64-20221001.img/

# expand it by 28GB, so it occupies full 32GB SD card
dd if=/dev/zero bs=10MiB of=void-rpi-aarch64-20221001.img conv=notrunc oflag=append status=progress count=2800

# Mount increased .img as a partitioned loop device to fix partition table
losetup --find --partscan void-rpi-aarch64-20221001.img
# Increase partition to 30GB
gparted /dev/loop0
# Shutdown loop deice
losetup -D
  • Flash .img with balena etcher
  • Once the partition is mounted, open config.txt and uncomment:
hdmi_safe=1
hdmi_force_hotplug=1
hdmi_drive=2
  • Finally, it's very important to safely remove USB card reader

Now, boot the device and do the following in its shell:

passwd
echo berrycore > /etc/hostname
# WIFI
ln -s /etc/sv/dhcpcd /var/service

cd /etc/wpa_supplicant
# ip link shows 'wlan0'
cp wpa_supplicant.conf wpa_supplicant-wlan0.conf
wpa_passphrase WIFI_SSID WIFI_PASS >> wpa_supplicant-wlan0.conf
wpa_supplicant -B -iwlan0 -cwpa_supplicant-wlan0.conf
ln -s /etc/sv/wpa_supplicant /var/service

# Time
ln -s /etc/sv/ntpd /var/service
xbps-reconfigure -f chrony

# update all packages
xbps-install -Su # 2 times
vkpurge rm all

xbps-install -S nano git 

# Enable ssh 
ln -s /etc/sv/sshd /var/service
ip a show dev wlan0 | grep inet # show my local ip

# default shell
chsh -s /bin/bash root

# Don't breakout into emergency shell in case of a power loss
nano /etc/runit/core-services/03-filesystems.sh
# Add e2fsck -py /dev/mmcblk0 before "Checking filesystems:"

reboot now

That's it, now you can ssh into it.

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