https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=XavM&feedformat=atomAlpine Linux - User contributions [en]2024-03-29T15:45:39ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&diff=16714Raspberry Pi2019-12-11T14:30:47Z<p>XavM: /* Long boot time when running headless */</p>
<hr />
<div>{{TOC right}}<br />
<br />
This tutorial will help you install Alpine Linux on your Raspberry Pi.<br />
<br />
== Preparation ==<br />
<br />
# [http://alpinelinux.org/downloads/ Download] the Alpine for Raspberry Pi tarball. You should be safe using the '''armhf''' build on all versions of Raspberry Pi (including Pi Zero and Compute Modules); but it may perform less optimally on recent versions of Raspberry Pi. The '''armv7''' build is compatible with Raspberry Pi 2 Model B. The '''aarch64''' build should be compatible with Raspberry Pi 2 Model v1.2, and is compatible with Raspberry Pi 3 and Compute Module 3.<br />
# Create a bootable FAT32 partition on your SD card. You can use a partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk].<br />
# Create a filesystem on the partition with <code>mkdosfs -F 32 /dev/sdX1</code> (Replace sdX1 with the correct reference to the partition you just created.)<br />
# Mount the partition and extract the tarball contents unto it.<br />
<br />
Optionally create a '''usercfg.txt''' file on the partition to configure low-level system settings. Specifications can be found [https://www.raspberrypi.org/documentation/configuration/config-txt here]. Some interesting values include:<br />
* To enable audio: <code>dtparam=audio=on</code><br />
* If you see black edges around your screen after booting the Pi, you can add <code>disable_overscan=1</code><br />
<br />
If you need WiFi to work, you have to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card. (Replace /mnt/sdcard with the correct mount point.)<br />
<br />
git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git<br />
cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm<br />
<br />
== Installation ==<br />
<br />
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots. Follow these steps to install Alpine Linux:<br />
<br />
# Insert the SD card into the Raspberry Pi and turn it on<br />
# Login into the Alpine system as root. Leave the password empty.<br />
# Type <code>setup-alpine</code><br />
# Once the installation is complete, commit the changes by typing <code>lbu commit -d</code><br />
<br />
Type <code>reboot</code> to verify that the installation was indeed successful.<br />
<br />
== Post Installation ==<br />
<br />
=== Update the System ===<br />
<br />
Upon installation, make sure that your system is up-to-date:<br />
<br />
{{cmd|apk update<br />
apk upgrade}}<br />
<br />
Don't forget to save the changes:<br />
<br />
{{cmd|lbu commit -d}}<br />
<br />
=== Clock-related error messages ===<br />
<br />
During the booting time, you might notice errors related to the hardware clock. The Raspberry Pi does not have<br />
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:<br />
<br />
{{cmd|rc-update add swclock boot # enable the software clock<br />
rc-update del hwclock boot # disable the hardware clock}}<br />
<br />
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a<br />
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon. Make sure that you a<br />
NTP daemon installed and running. If you are not sure, then you can install NTP client by running the following<br />
command:<br />
<br />
{{cmd|setup-ntp}}<br />
<br />
The Busybox NTP client might be the most lightweight solution. Save the changes and reboot, once the NTP software is<br />
installed and running:<br />
<br />
{{cmd|lbu commit -d<br />
reboot}}<br />
<br />
After reboot, make sure that the <code>date</code> command outputs the correct date and time.<br />
<br />
=== WiFi on boot ===<br />
If you have already [[Connecting_to_a_wireless_access_point|configured WiFi]] during the setup, the connection will not return on reboot.<br />
You will need to start up a service to automatically connect to the wireless access point.<br />
# Run <code>rc-update add wpa_supplicant boot</code> to connect to the wireless access point on boot.<br />
# Run it manually with <code>/etc/init.d/wpa_supplicant start</code>.<br />
<br />
=== Enable OpenGL (Raspberry Pi 3) ===<br />
<br />
Remount the boot partition writeable (ie. /media/mmcblk0p1):<br />
<br />
{{cmd|mount -o remount,rw /media/mmcblk0p1}}<br />
<br />
Add the following lines to /media/mmcblk0p1/config.txt <br />
<br />
dtoverlay=vc4-kms-v3d<br />
gpu_mem=128<br />
<br />
256MB gpu_mem is also possible<br />
<br />
Install mesa-dri-vc4:<br />
{{cmd|apk add mesa-dri-vc4}}<br />
<br />
Reboot:<br />
<br />
{{cmd|lbu_commit -d; reboot}}<br />
<br />
== Persistent storage ==<br />
<br />
=== Loopback image with overlayfs ===<br />
<br />
The install is in diskless mode and forces everything into memory, if you want additional storage we need to create loop-back storage onto the SD mounted with overlayfs.<br />
<br />
First make the SD card writable again and change fstab to always do so:<br />
{{cmd|mount /media/mmcblk0p1 -o rw,remount<br />
sed -i 's/vfat\ ro,/vfat\ rw,' /etc/fstab}}<br />
<br />
Create the loop-back file, this example is 1 GB:<br />
<br />
{{cmd|dd if&#61;/dev/zero of&#61;/media/mmcblk0p1/persist.img bs&#61;1024 count&#61;0 seek&#61;1048576}}<br />
<br />
Install the ext utilities:<br />
<br />
{{cmd|apk add e2fsprogs}}<br />
<br />
Format the loop-back file:<br />
<br />
{{cmd|mkfs.ext4 /media/mmcblk0p1/persist.img}}<br />
<br />
Mount the storage: <br />
<br />
{{cmd|echo "/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0" >> /etc/fstab<br />
mkdir /media/persist <br />
mount -a}}<br />
<br />
Make the overlay folders, we are doing /usr here, but you can do /home or anything else:<br />
<br />
{{cmd|mkdir /media/persist/usr <br />
mkdir /media/persist/.work <br />
echo "overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0" >> /etc/fstab <br />
mount -a}}<br />
<br />
Your /etc/fstab should look something like this:<br />
{{Cmd|/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0<br />
/dev/usbdisk /media/usb vfat noauto,ro 0 0<br />
/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,relatime,fmask&#61;0022,dmask&#61;0022,errors&#61;remount-ro 0 0<br />
/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0<br />
overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0}}<br />
<br />
Now commit the changes: (optionally remove the e2fsprogs, but it does contain repair tools)<br />
{{cmd|lbu_commit -d}}<br />
<br />
Remember with this setup, if you install things and you have done this overlay for /usr, you must not commit the 'apk add', otherwise while it boots it will try and install it to memory and not to the persist storage.<br />
<br />
If you do want to install something small at boot you can use `apk add` and `lbu commit -d`.<br />
<br />
If it is something a bit bigger then you can use `apk add` but then not commit it, it will be persistent (in /user), but do check everything you need is in that directory and not in folders you have not made persistent.<br />
<br />
=== Traditional disk-based (sys) installation ===<br />
<br />
{{Warning|This isn't yet supported by the Alpine setup scripts for Raspberry Pi. It requires manual intervention, and might break.}}<br />
<br />
It is also possible to switch to a fully disk-based installation: this is not yet formally supported, but can be done somewhat manually. This frees all the memory otherwise needed for the root filesystem, allowing more installed packages.<br />
<br />
Split your SD card into two partitions: the FAT32 boot partition described above (in this example it'll be <code>mmcblk0p1</code>) , and a second partition to hold the root filesystem (here it'll be <code>mmcblk0p2</code>). Boot and configure your diskless system as above, then create a root filesystem:<br />
<br />
{{cmd|apk add e2fsprogs<br />
mkfs.ext4 /dev/mmcblk0p2}}<br />
<br />
Now do a disk install via a mountpoint. The <code>setup-disk</code> script will give some errors about syslinux/extlinux, but you can ignore these: the Raspberry Pi doesn't need this to boot anyway.<br />
<br />
{{cmd|<nowiki>mkdir /stage<br />
mount /dev/mmcblk0p2 /stage<br />
setup-disk -o /media/mmcblk0p1/MYHOSTNAME.apkovl.tar.gz /stage<br />
# (ignore errors about syslinux/extlinux)</nowiki>}}<br />
<br />
Add a line to <code>/stage/etc/fstab</code> to mount the Pi's boot partition again:<br />
<br />
{{cmd|/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0}}<br />
<br />
Now add a <code>root=/dev/mmcblk0p2</code> parameter to the Pi's boot command line, either <code>cmdline-rpi2.txt</code> or <code>cmdline-rpi.txt</code> depending on model:<br />
<br />
{{cmd|<nowiki>mount -o remount,rw /media/mmcblk0p1<br />
sed -i '$ s/$/ root=\/dev\/mmcblk0p2/' /media/mmcblk0p1/cmdline-rpi2.txt</nowiki>}}<br />
<br />
You might also consider <code>overlaytmpfs=yes</code> here, which will cause the underlying SD card root filesystem to be mounted read-only, with an overlayed tmpfs for modifications which will be discarded on shutdown.<br />
<br />
Beware, though, that <b>the contents of /boot will be ignored when the Pi boots</b>: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed.<br />
<br />
{{cmd|<nowiki>echo /media/mmcblk0p1/boot /boot none defaults,bind 0 0 >> /etc/fstab</nowiki>}}<br />
<br />
=== Persistent Installation on Raspberry Pi 3 ===<br />
<br />
See this page : https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi<br />
<br />
See https://web.archive.org/web/20171125115835/https://forum.alpinelinux.org/comment/1084#comment-1084<br />
<br />
== Troubleshooting ==<br />
<br />
=== Long boot time when running headless ===<br />
<br />
If no peripherals are connected the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.<br />
<br />
If this is the case simply plugging in any USB device should work around this issue.<br />
<br />
'''Alternatively''', installing haveged, the random numbers generator, would speed up the process : <br />
<br />
apk update <br />
apk add haveged<br />
rc-update add haveged boot<br />
lbu commit -d<br />
service haveged start<br />
<br />
(Tested on a raspberry pi zero W headless mode, no USB connected, Alpine 3.10.3)<br />
<br />
=== apk indicating 'No space left on device' ===<br />
<br />
Note some models of the Raspberry Pi such as the 3A+ only have 512M of RAM, which on fresh Alpine deployment will only leave around 200M for tmpfs root. It's important to keep this limitation in mind when using these boards.<br />
<br />
== See Also ==<br />
<br />
* [[Classic install or sys mode on Raspberry Pi]] - a variant.<br />
* [[Raspberry Pi 3 - Setting Up Bluetooth]]<br />
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]<br />
* [[Linux Router with VPN on a Raspberry Pi]]<br />
* [[Create a bootable SDHC from a Mac]]<br />
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]<br />
<br />
<br />
[[Category:Installation]]<br />
[[Category: Raspberry]]</div>XavMhttps://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&diff=16713Raspberry Pi2019-12-11T14:29:57Z<p>XavM: /* Long boot time when running headless */</p>
<hr />
<div>{{TOC right}}<br />
<br />
This tutorial will help you install Alpine Linux on your Raspberry Pi.<br />
<br />
== Preparation ==<br />
<br />
# [http://alpinelinux.org/downloads/ Download] the Alpine for Raspberry Pi tarball. You should be safe using the '''armhf''' build on all versions of Raspberry Pi (including Pi Zero and Compute Modules); but it may perform less optimally on recent versions of Raspberry Pi. The '''armv7''' build is compatible with Raspberry Pi 2 Model B. The '''aarch64''' build should be compatible with Raspberry Pi 2 Model v1.2, and is compatible with Raspberry Pi 3 and Compute Module 3.<br />
# Create a bootable FAT32 partition on your SD card. You can use a partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk].<br />
# Create a filesystem on the partition with <code>mkdosfs -F 32 /dev/sdX1</code> (Replace sdX1 with the correct reference to the partition you just created.)<br />
# Mount the partition and extract the tarball contents unto it.<br />
<br />
Optionally create a '''usercfg.txt''' file on the partition to configure low-level system settings. Specifications can be found [https://www.raspberrypi.org/documentation/configuration/config-txt here]. Some interesting values include:<br />
* To enable audio: <code>dtparam=audio=on</code><br />
* If you see black edges around your screen after booting the Pi, you can add <code>disable_overscan=1</code><br />
<br />
If you need WiFi to work, you have to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card. (Replace /mnt/sdcard with the correct mount point.)<br />
<br />
git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git<br />
cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm<br />
<br />
== Installation ==<br />
<br />
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots. Follow these steps to install Alpine Linux:<br />
<br />
# Insert the SD card into the Raspberry Pi and turn it on<br />
# Login into the Alpine system as root. Leave the password empty.<br />
# Type <code>setup-alpine</code><br />
# Once the installation is complete, commit the changes by typing <code>lbu commit -d</code><br />
<br />
Type <code>reboot</code> to verify that the installation was indeed successful.<br />
<br />
== Post Installation ==<br />
<br />
=== Update the System ===<br />
<br />
Upon installation, make sure that your system is up-to-date:<br />
<br />
{{cmd|apk update<br />
apk upgrade}}<br />
<br />
Don't forget to save the changes:<br />
<br />
{{cmd|lbu commit -d}}<br />
<br />
=== Clock-related error messages ===<br />
<br />
During the booting time, you might notice errors related to the hardware clock. The Raspberry Pi does not have<br />
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:<br />
<br />
{{cmd|rc-update add swclock boot # enable the software clock<br />
rc-update del hwclock boot # disable the hardware clock}}<br />
<br />
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a<br />
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon. Make sure that you a<br />
NTP daemon installed and running. If you are not sure, then you can install NTP client by running the following<br />
command:<br />
<br />
{{cmd|setup-ntp}}<br />
<br />
The Busybox NTP client might be the most lightweight solution. Save the changes and reboot, once the NTP software is<br />
installed and running:<br />
<br />
{{cmd|lbu commit -d<br />
reboot}}<br />
<br />
After reboot, make sure that the <code>date</code> command outputs the correct date and time.<br />
<br />
=== WiFi on boot ===<br />
If you have already [[Connecting_to_a_wireless_access_point|configured WiFi]] during the setup, the connection will not return on reboot.<br />
You will need to start up a service to automatically connect to the wireless access point.<br />
# Run <code>rc-update add wpa_supplicant boot</code> to connect to the wireless access point on boot.<br />
# Run it manually with <code>/etc/init.d/wpa_supplicant start</code>.<br />
<br />
=== Enable OpenGL (Raspberry Pi 3) ===<br />
<br />
Remount the boot partition writeable (ie. /media/mmcblk0p1):<br />
<br />
{{cmd|mount -o remount,rw /media/mmcblk0p1}}<br />
<br />
Add the following lines to /media/mmcblk0p1/config.txt <br />
<br />
dtoverlay=vc4-kms-v3d<br />
gpu_mem=128<br />
<br />
256MB gpu_mem is also possible<br />
<br />
Install mesa-dri-vc4:<br />
{{cmd|apk add mesa-dri-vc4}}<br />
<br />
Reboot:<br />
<br />
{{cmd|lbu_commit -d; reboot}}<br />
<br />
== Persistent storage ==<br />
<br />
=== Loopback image with overlayfs ===<br />
<br />
The install is in diskless mode and forces everything into memory, if you want additional storage we need to create loop-back storage onto the SD mounted with overlayfs.<br />
<br />
First make the SD card writable again and change fstab to always do so:<br />
{{cmd|mount /media/mmcblk0p1 -o rw,remount<br />
sed -i 's/vfat\ ro,/vfat\ rw,' /etc/fstab}}<br />
<br />
Create the loop-back file, this example is 1 GB:<br />
<br />
{{cmd|dd if&#61;/dev/zero of&#61;/media/mmcblk0p1/persist.img bs&#61;1024 count&#61;0 seek&#61;1048576}}<br />
<br />
Install the ext utilities:<br />
<br />
{{cmd|apk add e2fsprogs}}<br />
<br />
Format the loop-back file:<br />
<br />
{{cmd|mkfs.ext4 /media/mmcblk0p1/persist.img}}<br />
<br />
Mount the storage: <br />
<br />
{{cmd|echo "/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0" >> /etc/fstab<br />
mkdir /media/persist <br />
mount -a}}<br />
<br />
Make the overlay folders, we are doing /usr here, but you can do /home or anything else:<br />
<br />
{{cmd|mkdir /media/persist/usr <br />
mkdir /media/persist/.work <br />
echo "overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0" >> /etc/fstab <br />
mount -a}}<br />
<br />
Your /etc/fstab should look something like this:<br />
{{Cmd|/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0<br />
/dev/usbdisk /media/usb vfat noauto,ro 0 0<br />
/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,relatime,fmask&#61;0022,dmask&#61;0022,errors&#61;remount-ro 0 0<br />
/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0<br />
overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0}}<br />
<br />
Now commit the changes: (optionally remove the e2fsprogs, but it does contain repair tools)<br />
{{cmd|lbu_commit -d}}<br />
<br />
Remember with this setup, if you install things and you have done this overlay for /usr, you must not commit the 'apk add', otherwise while it boots it will try and install it to memory and not to the persist storage.<br />
<br />
If you do want to install something small at boot you can use `apk add` and `lbu commit -d`.<br />
<br />
If it is something a bit bigger then you can use `apk add` but then not commit it, it will be persistent (in /user), but do check everything you need is in that directory and not in folders you have not made persistent.<br />
<br />
=== Traditional disk-based (sys) installation ===<br />
<br />
{{Warning|This isn't yet supported by the Alpine setup scripts for Raspberry Pi. It requires manual intervention, and might break.}}<br />
<br />
It is also possible to switch to a fully disk-based installation: this is not yet formally supported, but can be done somewhat manually. This frees all the memory otherwise needed for the root filesystem, allowing more installed packages.<br />
<br />
Split your SD card into two partitions: the FAT32 boot partition described above (in this example it'll be <code>mmcblk0p1</code>) , and a second partition to hold the root filesystem (here it'll be <code>mmcblk0p2</code>). Boot and configure your diskless system as above, then create a root filesystem:<br />
<br />
{{cmd|apk add e2fsprogs<br />
mkfs.ext4 /dev/mmcblk0p2}}<br />
<br />
Now do a disk install via a mountpoint. The <code>setup-disk</code> script will give some errors about syslinux/extlinux, but you can ignore these: the Raspberry Pi doesn't need this to boot anyway.<br />
<br />
{{cmd|<nowiki>mkdir /stage<br />
mount /dev/mmcblk0p2 /stage<br />
setup-disk -o /media/mmcblk0p1/MYHOSTNAME.apkovl.tar.gz /stage<br />
# (ignore errors about syslinux/extlinux)</nowiki>}}<br />
<br />
Add a line to <code>/stage/etc/fstab</code> to mount the Pi's boot partition again:<br />
<br />
{{cmd|/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0}}<br />
<br />
Now add a <code>root=/dev/mmcblk0p2</code> parameter to the Pi's boot command line, either <code>cmdline-rpi2.txt</code> or <code>cmdline-rpi.txt</code> depending on model:<br />
<br />
{{cmd|<nowiki>mount -o remount,rw /media/mmcblk0p1<br />
sed -i '$ s/$/ root=\/dev\/mmcblk0p2/' /media/mmcblk0p1/cmdline-rpi2.txt</nowiki>}}<br />
<br />
You might also consider <code>overlaytmpfs=yes</code> here, which will cause the underlying SD card root filesystem to be mounted read-only, with an overlayed tmpfs for modifications which will be discarded on shutdown.<br />
<br />
Beware, though, that <b>the contents of /boot will be ignored when the Pi boots</b>: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed.<br />
<br />
{{cmd|<nowiki>echo /media/mmcblk0p1/boot /boot none defaults,bind 0 0 >> /etc/fstab</nowiki>}}<br />
<br />
=== Persistent Installation on Raspberry Pi 3 ===<br />
<br />
See this page : https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi<br />
<br />
See https://web.archive.org/web/20171125115835/https://forum.alpinelinux.org/comment/1084#comment-1084<br />
<br />
== Troubleshooting ==<br />
<br />
=== Long boot time when running headless ===<br />
<br />
If no peripherals are connected the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.<br />
<br />
If this is the case simply plugging in any USB device should work around this issue.<br />
<br />
Alternatively, installing haveged, the random numbers generator, would speed up the process : <br />
<br />
apk update <br />
apk add haveged<br />
rc-update add haveged boot<br />
lbu commit -d<br />
service haveged start<br />
<br />
(Tested on a raspberry pi zero W headless mode, no USB connected, Alpine 3.10.3)<br />
<br />
=== apk indicating 'No space left on device' ===<br />
<br />
Note some models of the Raspberry Pi such as the 3A+ only have 512M of RAM, which on fresh Alpine deployment will only leave around 200M for tmpfs root. It's important to keep this limitation in mind when using these boards.<br />
<br />
== See Also ==<br />
<br />
* [[Classic install or sys mode on Raspberry Pi]] - a variant.<br />
* [[Raspberry Pi 3 - Setting Up Bluetooth]]<br />
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]<br />
* [[Linux Router with VPN on a Raspberry Pi]]<br />
* [[Create a bootable SDHC from a Mac]]<br />
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]<br />
<br />
<br />
[[Category:Installation]]<br />
[[Category: Raspberry]]</div>XavMhttps://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&diff=16712Raspberry Pi2019-12-11T14:29:07Z<p>XavM: /* Long boot time when running headless */</p>
<hr />
<div>{{TOC right}}<br />
<br />
This tutorial will help you install Alpine Linux on your Raspberry Pi.<br />
<br />
== Preparation ==<br />
<br />
# [http://alpinelinux.org/downloads/ Download] the Alpine for Raspberry Pi tarball. You should be safe using the '''armhf''' build on all versions of Raspberry Pi (including Pi Zero and Compute Modules); but it may perform less optimally on recent versions of Raspberry Pi. The '''armv7''' build is compatible with Raspberry Pi 2 Model B. The '''aarch64''' build should be compatible with Raspberry Pi 2 Model v1.2, and is compatible with Raspberry Pi 3 and Compute Module 3.<br />
# Create a bootable FAT32 partition on your SD card. You can use a partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk].<br />
# Create a filesystem on the partition with <code>mkdosfs -F 32 /dev/sdX1</code> (Replace sdX1 with the correct reference to the partition you just created.)<br />
# Mount the partition and extract the tarball contents unto it.<br />
<br />
Optionally create a '''usercfg.txt''' file on the partition to configure low-level system settings. Specifications can be found [https://www.raspberrypi.org/documentation/configuration/config-txt here]. Some interesting values include:<br />
* To enable audio: <code>dtparam=audio=on</code><br />
* If you see black edges around your screen after booting the Pi, you can add <code>disable_overscan=1</code><br />
<br />
If you need WiFi to work, you have to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card. (Replace /mnt/sdcard with the correct mount point.)<br />
<br />
git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git<br />
cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm<br />
<br />
== Installation ==<br />
<br />
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots. Follow these steps to install Alpine Linux:<br />
<br />
# Insert the SD card into the Raspberry Pi and turn it on<br />
# Login into the Alpine system as root. Leave the password empty.<br />
# Type <code>setup-alpine</code><br />
# Once the installation is complete, commit the changes by typing <code>lbu commit -d</code><br />
<br />
Type <code>reboot</code> to verify that the installation was indeed successful.<br />
<br />
== Post Installation ==<br />
<br />
=== Update the System ===<br />
<br />
Upon installation, make sure that your system is up-to-date:<br />
<br />
{{cmd|apk update<br />
apk upgrade}}<br />
<br />
Don't forget to save the changes:<br />
<br />
{{cmd|lbu commit -d}}<br />
<br />
=== Clock-related error messages ===<br />
<br />
During the booting time, you might notice errors related to the hardware clock. The Raspberry Pi does not have<br />
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:<br />
<br />
{{cmd|rc-update add swclock boot # enable the software clock<br />
rc-update del hwclock boot # disable the hardware clock}}<br />
<br />
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a<br />
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon. Make sure that you a<br />
NTP daemon installed and running. If you are not sure, then you can install NTP client by running the following<br />
command:<br />
<br />
{{cmd|setup-ntp}}<br />
<br />
The Busybox NTP client might be the most lightweight solution. Save the changes and reboot, once the NTP software is<br />
installed and running:<br />
<br />
{{cmd|lbu commit -d<br />
reboot}}<br />
<br />
After reboot, make sure that the <code>date</code> command outputs the correct date and time.<br />
<br />
=== WiFi on boot ===<br />
If you have already [[Connecting_to_a_wireless_access_point|configured WiFi]] during the setup, the connection will not return on reboot.<br />
You will need to start up a service to automatically connect to the wireless access point.<br />
# Run <code>rc-update add wpa_supplicant boot</code> to connect to the wireless access point on boot.<br />
# Run it manually with <code>/etc/init.d/wpa_supplicant start</code>.<br />
<br />
=== Enable OpenGL (Raspberry Pi 3) ===<br />
<br />
Remount the boot partition writeable (ie. /media/mmcblk0p1):<br />
<br />
{{cmd|mount -o remount,rw /media/mmcblk0p1}}<br />
<br />
Add the following lines to /media/mmcblk0p1/config.txt <br />
<br />
dtoverlay=vc4-kms-v3d<br />
gpu_mem=128<br />
<br />
256MB gpu_mem is also possible<br />
<br />
Install mesa-dri-vc4:<br />
{{cmd|apk add mesa-dri-vc4}}<br />
<br />
Reboot:<br />
<br />
{{cmd|lbu_commit -d; reboot}}<br />
<br />
== Persistent storage ==<br />
<br />
=== Loopback image with overlayfs ===<br />
<br />
The install is in diskless mode and forces everything into memory, if you want additional storage we need to create loop-back storage onto the SD mounted with overlayfs.<br />
<br />
First make the SD card writable again and change fstab to always do so:<br />
{{cmd|mount /media/mmcblk0p1 -o rw,remount<br />
sed -i 's/vfat\ ro,/vfat\ rw,' /etc/fstab}}<br />
<br />
Create the loop-back file, this example is 1 GB:<br />
<br />
{{cmd|dd if&#61;/dev/zero of&#61;/media/mmcblk0p1/persist.img bs&#61;1024 count&#61;0 seek&#61;1048576}}<br />
<br />
Install the ext utilities:<br />
<br />
{{cmd|apk add e2fsprogs}}<br />
<br />
Format the loop-back file:<br />
<br />
{{cmd|mkfs.ext4 /media/mmcblk0p1/persist.img}}<br />
<br />
Mount the storage: <br />
<br />
{{cmd|echo "/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0" >> /etc/fstab<br />
mkdir /media/persist <br />
mount -a}}<br />
<br />
Make the overlay folders, we are doing /usr here, but you can do /home or anything else:<br />
<br />
{{cmd|mkdir /media/persist/usr <br />
mkdir /media/persist/.work <br />
echo "overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0" >> /etc/fstab <br />
mount -a}}<br />
<br />
Your /etc/fstab should look something like this:<br />
{{Cmd|/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0<br />
/dev/usbdisk /media/usb vfat noauto,ro 0 0<br />
/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,relatime,fmask&#61;0022,dmask&#61;0022,errors&#61;remount-ro 0 0<br />
/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0<br />
overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0}}<br />
<br />
Now commit the changes: (optionally remove the e2fsprogs, but it does contain repair tools)<br />
{{cmd|lbu_commit -d}}<br />
<br />
Remember with this setup, if you install things and you have done this overlay for /usr, you must not commit the 'apk add', otherwise while it boots it will try and install it to memory and not to the persist storage.<br />
<br />
If you do want to install something small at boot you can use `apk add` and `lbu commit -d`.<br />
<br />
If it is something a bit bigger then you can use `apk add` but then not commit it, it will be persistent (in /user), but do check everything you need is in that directory and not in folders you have not made persistent.<br />
<br />
=== Traditional disk-based (sys) installation ===<br />
<br />
{{Warning|This isn't yet supported by the Alpine setup scripts for Raspberry Pi. It requires manual intervention, and might break.}}<br />
<br />
It is also possible to switch to a fully disk-based installation: this is not yet formally supported, but can be done somewhat manually. This frees all the memory otherwise needed for the root filesystem, allowing more installed packages.<br />
<br />
Split your SD card into two partitions: the FAT32 boot partition described above (in this example it'll be <code>mmcblk0p1</code>) , and a second partition to hold the root filesystem (here it'll be <code>mmcblk0p2</code>). Boot and configure your diskless system as above, then create a root filesystem:<br />
<br />
{{cmd|apk add e2fsprogs<br />
mkfs.ext4 /dev/mmcblk0p2}}<br />
<br />
Now do a disk install via a mountpoint. The <code>setup-disk</code> script will give some errors about syslinux/extlinux, but you can ignore these: the Raspberry Pi doesn't need this to boot anyway.<br />
<br />
{{cmd|<nowiki>mkdir /stage<br />
mount /dev/mmcblk0p2 /stage<br />
setup-disk -o /media/mmcblk0p1/MYHOSTNAME.apkovl.tar.gz /stage<br />
# (ignore errors about syslinux/extlinux)</nowiki>}}<br />
<br />
Add a line to <code>/stage/etc/fstab</code> to mount the Pi's boot partition again:<br />
<br />
{{cmd|/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0}}<br />
<br />
Now add a <code>root=/dev/mmcblk0p2</code> parameter to the Pi's boot command line, either <code>cmdline-rpi2.txt</code> or <code>cmdline-rpi.txt</code> depending on model:<br />
<br />
{{cmd|<nowiki>mount -o remount,rw /media/mmcblk0p1<br />
sed -i '$ s/$/ root=\/dev\/mmcblk0p2/' /media/mmcblk0p1/cmdline-rpi2.txt</nowiki>}}<br />
<br />
You might also consider <code>overlaytmpfs=yes</code> here, which will cause the underlying SD card root filesystem to be mounted read-only, with an overlayed tmpfs for modifications which will be discarded on shutdown.<br />
<br />
Beware, though, that <b>the contents of /boot will be ignored when the Pi boots</b>: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed.<br />
<br />
{{cmd|<nowiki>echo /media/mmcblk0p1/boot /boot none defaults,bind 0 0 >> /etc/fstab</nowiki>}}<br />
<br />
=== Persistent Installation on Raspberry Pi 3 ===<br />
<br />
See this page : https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi<br />
<br />
See https://web.archive.org/web/20171125115835/https://forum.alpinelinux.org/comment/1084#comment-1084<br />
<br />
== Troubleshooting ==<br />
<br />
=== Long boot time when running headless ===<br />
<br />
If no peripherals are connected the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.<br />
<br />
If this is the case simply plugging in any USB device should work around this issue.<br />
<br />
Alternatively, installing installing haveged, the random numbers generator, would speed up the process : <br />
<br />
apk update <br />
apk add haveged<br />
rc-update add haveged boot<br />
lbu commit -d<br />
service haveged start<br />
<br />
<- Tested on a raspberry pi zero W headless mode, no USB connected, Alpine 3.10.3<br />
<br />
=== apk indicating 'No space left on device' ===<br />
<br />
Note some models of the Raspberry Pi such as the 3A+ only have 512M of RAM, which on fresh Alpine deployment will only leave around 200M for tmpfs root. It's important to keep this limitation in mind when using these boards.<br />
<br />
== See Also ==<br />
<br />
* [[Classic install or sys mode on Raspberry Pi]] - a variant.<br />
* [[Raspberry Pi 3 - Setting Up Bluetooth]]<br />
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]<br />
* [[Linux Router with VPN on a Raspberry Pi]]<br />
* [[Create a bootable SDHC from a Mac]]<br />
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]<br />
<br />
<br />
[[Category:Installation]]<br />
[[Category: Raspberry]]</div>XavMhttps://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&diff=16711Raspberry Pi2019-12-11T14:27:08Z<p>XavM: /* Long boot time when running headless */</p>
<hr />
<div>{{TOC right}}<br />
<br />
This tutorial will help you install Alpine Linux on your Raspberry Pi.<br />
<br />
== Preparation ==<br />
<br />
# [http://alpinelinux.org/downloads/ Download] the Alpine for Raspberry Pi tarball. You should be safe using the '''armhf''' build on all versions of Raspberry Pi (including Pi Zero and Compute Modules); but it may perform less optimally on recent versions of Raspberry Pi. The '''armv7''' build is compatible with Raspberry Pi 2 Model B. The '''aarch64''' build should be compatible with Raspberry Pi 2 Model v1.2, and is compatible with Raspberry Pi 3 and Compute Module 3.<br />
# Create a bootable FAT32 partition on your SD card. You can use a partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk].<br />
# Create a filesystem on the partition with <code>mkdosfs -F 32 /dev/sdX1</code> (Replace sdX1 with the correct reference to the partition you just created.)<br />
# Mount the partition and extract the tarball contents unto it.<br />
<br />
Optionally create a '''usercfg.txt''' file on the partition to configure low-level system settings. Specifications can be found [https://www.raspberrypi.org/documentation/configuration/config-txt here]. Some interesting values include:<br />
* To enable audio: <code>dtparam=audio=on</code><br />
* If you see black edges around your screen after booting the Pi, you can add <code>disable_overscan=1</code><br />
<br />
If you need WiFi to work, you have to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card. (Replace /mnt/sdcard with the correct mount point.)<br />
<br />
git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git<br />
cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm<br />
<br />
== Installation ==<br />
<br />
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots. Follow these steps to install Alpine Linux:<br />
<br />
# Insert the SD card into the Raspberry Pi and turn it on<br />
# Login into the Alpine system as root. Leave the password empty.<br />
# Type <code>setup-alpine</code><br />
# Once the installation is complete, commit the changes by typing <code>lbu commit -d</code><br />
<br />
Type <code>reboot</code> to verify that the installation was indeed successful.<br />
<br />
== Post Installation ==<br />
<br />
=== Update the System ===<br />
<br />
Upon installation, make sure that your system is up-to-date:<br />
<br />
{{cmd|apk update<br />
apk upgrade}}<br />
<br />
Don't forget to save the changes:<br />
<br />
{{cmd|lbu commit -d}}<br />
<br />
=== Clock-related error messages ===<br />
<br />
During the booting time, you might notice errors related to the hardware clock. The Raspberry Pi does not have<br />
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:<br />
<br />
{{cmd|rc-update add swclock boot # enable the software clock<br />
rc-update del hwclock boot # disable the hardware clock}}<br />
<br />
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a<br />
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon. Make sure that you a<br />
NTP daemon installed and running. If you are not sure, then you can install NTP client by running the following<br />
command:<br />
<br />
{{cmd|setup-ntp}}<br />
<br />
The Busybox NTP client might be the most lightweight solution. Save the changes and reboot, once the NTP software is<br />
installed and running:<br />
<br />
{{cmd|lbu commit -d<br />
reboot}}<br />
<br />
After reboot, make sure that the <code>date</code> command outputs the correct date and time.<br />
<br />
=== WiFi on boot ===<br />
If you have already [[Connecting_to_a_wireless_access_point|configured WiFi]] during the setup, the connection will not return on reboot.<br />
You will need to start up a service to automatically connect to the wireless access point.<br />
# Run <code>rc-update add wpa_supplicant boot</code> to connect to the wireless access point on boot.<br />
# Run it manually with <code>/etc/init.d/wpa_supplicant start</code>.<br />
<br />
=== Enable OpenGL (Raspberry Pi 3) ===<br />
<br />
Remount the boot partition writeable (ie. /media/mmcblk0p1):<br />
<br />
{{cmd|mount -o remount,rw /media/mmcblk0p1}}<br />
<br />
Add the following lines to /media/mmcblk0p1/config.txt <br />
<br />
dtoverlay=vc4-kms-v3d<br />
gpu_mem=128<br />
<br />
256MB gpu_mem is also possible<br />
<br />
Install mesa-dri-vc4:<br />
{{cmd|apk add mesa-dri-vc4}}<br />
<br />
Reboot:<br />
<br />
{{cmd|lbu_commit -d; reboot}}<br />
<br />
== Persistent storage ==<br />
<br />
=== Loopback image with overlayfs ===<br />
<br />
The install is in diskless mode and forces everything into memory, if you want additional storage we need to create loop-back storage onto the SD mounted with overlayfs.<br />
<br />
First make the SD card writable again and change fstab to always do so:<br />
{{cmd|mount /media/mmcblk0p1 -o rw,remount<br />
sed -i 's/vfat\ ro,/vfat\ rw,' /etc/fstab}}<br />
<br />
Create the loop-back file, this example is 1 GB:<br />
<br />
{{cmd|dd if&#61;/dev/zero of&#61;/media/mmcblk0p1/persist.img bs&#61;1024 count&#61;0 seek&#61;1048576}}<br />
<br />
Install the ext utilities:<br />
<br />
{{cmd|apk add e2fsprogs}}<br />
<br />
Format the loop-back file:<br />
<br />
{{cmd|mkfs.ext4 /media/mmcblk0p1/persist.img}}<br />
<br />
Mount the storage: <br />
<br />
{{cmd|echo "/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0" >> /etc/fstab<br />
mkdir /media/persist <br />
mount -a}}<br />
<br />
Make the overlay folders, we are doing /usr here, but you can do /home or anything else:<br />
<br />
{{cmd|mkdir /media/persist/usr <br />
mkdir /media/persist/.work <br />
echo "overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0" >> /etc/fstab <br />
mount -a}}<br />
<br />
Your /etc/fstab should look something like this:<br />
{{Cmd|/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0<br />
/dev/usbdisk /media/usb vfat noauto,ro 0 0<br />
/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,relatime,fmask&#61;0022,dmask&#61;0022,errors&#61;remount-ro 0 0<br />
/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&#61;remount-ro 0 0<br />
overlay /usr overlay lowerdir&#61;/usr,upperdir&#61;/media/persist/usr,workdir&#61;/media/persist/.work 0 0}}<br />
<br />
Now commit the changes: (optionally remove the e2fsprogs, but it does contain repair tools)<br />
{{cmd|lbu_commit -d}}<br />
<br />
Remember with this setup, if you install things and you have done this overlay for /usr, you must not commit the 'apk add', otherwise while it boots it will try and install it to memory and not to the persist storage.<br />
<br />
If you do want to install something small at boot you can use `apk add` and `lbu commit -d`.<br />
<br />
If it is something a bit bigger then you can use `apk add` but then not commit it, it will be persistent (in /user), but do check everything you need is in that directory and not in folders you have not made persistent.<br />
<br />
=== Traditional disk-based (sys) installation ===<br />
<br />
{{Warning|This isn't yet supported by the Alpine setup scripts for Raspberry Pi. It requires manual intervention, and might break.}}<br />
<br />
It is also possible to switch to a fully disk-based installation: this is not yet formally supported, but can be done somewhat manually. This frees all the memory otherwise needed for the root filesystem, allowing more installed packages.<br />
<br />
Split your SD card into two partitions: the FAT32 boot partition described above (in this example it'll be <code>mmcblk0p1</code>) , and a second partition to hold the root filesystem (here it'll be <code>mmcblk0p2</code>). Boot and configure your diskless system as above, then create a root filesystem:<br />
<br />
{{cmd|apk add e2fsprogs<br />
mkfs.ext4 /dev/mmcblk0p2}}<br />
<br />
Now do a disk install via a mountpoint. The <code>setup-disk</code> script will give some errors about syslinux/extlinux, but you can ignore these: the Raspberry Pi doesn't need this to boot anyway.<br />
<br />
{{cmd|<nowiki>mkdir /stage<br />
mount /dev/mmcblk0p2 /stage<br />
setup-disk -o /media/mmcblk0p1/MYHOSTNAME.apkovl.tar.gz /stage<br />
# (ignore errors about syslinux/extlinux)</nowiki>}}<br />
<br />
Add a line to <code>/stage/etc/fstab</code> to mount the Pi's boot partition again:<br />
<br />
{{cmd|/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0}}<br />
<br />
Now add a <code>root=/dev/mmcblk0p2</code> parameter to the Pi's boot command line, either <code>cmdline-rpi2.txt</code> or <code>cmdline-rpi.txt</code> depending on model:<br />
<br />
{{cmd|<nowiki>mount -o remount,rw /media/mmcblk0p1<br />
sed -i '$ s/$/ root=\/dev\/mmcblk0p2/' /media/mmcblk0p1/cmdline-rpi2.txt</nowiki>}}<br />
<br />
You might also consider <code>overlaytmpfs=yes</code> here, which will cause the underlying SD card root filesystem to be mounted read-only, with an overlayed tmpfs for modifications which will be discarded on shutdown.<br />
<br />
Beware, though, that <b>the contents of /boot will be ignored when the Pi boots</b>: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed.<br />
<br />
{{cmd|<nowiki>echo /media/mmcblk0p1/boot /boot none defaults,bind 0 0 >> /etc/fstab</nowiki>}}<br />
<br />
=== Persistent Installation on Raspberry Pi 3 ===<br />
<br />
See this page : https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi<br />
<br />
See https://web.archive.org/web/20171125115835/https://forum.alpinelinux.org/comment/1084#comment-1084<br />
<br />
== Troubleshooting ==<br />
<br />
=== Long boot time when running headless ===<br />
<br />
If no peripherals are connected the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.<br />
<br />
If this is the case simply plugging in any USB device should work around this issue.<br />
<br />
Alternatively, installing installing haveged, the random numbers generator, would speed up the process : <br />
<br />
apk update <br />
apk add haveged<br />
rc-update add haveged boot<br />
lbu commit -d<br />
service haveged start<br />
<br />
<- Tested on a raspberry pi zero W headless mode, no USB connected, Alpine 3.10.3<br />
<br />
=== apk indicating 'No space left on device' ===<br />
<br />
Note some models of the Raspberry Pi such as the 3A+ only have 512M of RAM, which on fresh Alpine deployment will only leave around 200M for tmpfs root. It's important to keep this limitation in mind when using these boards.<br />
<br />
== See Also ==<br />
<br />
* [[Classic install or sys mode on Raspberry Pi]] - a variant.<br />
* [[Raspberry Pi 3 - Setting Up Bluetooth]]<br />
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]<br />
* [[Linux Router with VPN on a Raspberry Pi]]<br />
* [[Create a bootable SDHC from a Mac]]<br />
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]<br />
<br />
<br />
[[Category:Installation]]<br />
[[Category: Raspberry]]</div>XavM