<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SkAzZ</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SkAzZ"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/SkAzZ"/>
	<updated>2026-05-01T12:43:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11583</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11583"/>
		<updated>2016-01-25T13:22:47Z</updated>

		<summary type="html">&lt;p&gt;SkAzZ: Added guides for Persistent Storage and X11 -Expecting criticisms and edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition type is called &#039;&#039;W95 FAT32 (LBA)&#039;&#039; and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system as root.  Leave the password empty.&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt; to verify that the installation was indeed successful.&lt;br /&gt;
&lt;br /&gt;
== Post Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Update the System ===&lt;br /&gt;
&lt;br /&gt;
Upon installation, make sure that your system is up-to-date:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk upgrade}}&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to save the changes:&lt;br /&gt;
&lt;br /&gt;
{{cmd|lbu commit}}&lt;br /&gt;
&lt;br /&gt;
=== Clock-related error messages ===&lt;br /&gt;
&lt;br /&gt;
During the booting time, you might notice errors related to the hardware clock.  The Raspberry Pi does not have&lt;br /&gt;
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:&lt;br /&gt;
&lt;br /&gt;
{{cmd|rc-update add swclock boot    # enable the software clock&lt;br /&gt;
rc-update del hwclock boot    # disable the hardware clock}}&lt;br /&gt;
&lt;br /&gt;
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a&lt;br /&gt;
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon.  Make sure that you a&lt;br /&gt;
NTP daemon installed and running.  If you are not sure, then you can install NTP client by running the following&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
{{cmd|setup-ntp}}&lt;br /&gt;
&lt;br /&gt;
Busybox NTP client might be the most lightweight solution.  Save the changes and reboot, once the NTP software is&lt;br /&gt;
installed and running:&lt;br /&gt;
&lt;br /&gt;
{{cmd|lbu commit&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
After reboot, make sure that the &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; command outputs the correct date and time.&lt;br /&gt;
&lt;br /&gt;
=== Persistent Storage ===&lt;br /&gt;
The install is in disk-less mode and forces everything into memory, if you want additional storage we need to create loop-back storage onto the SD mounted with overlayfs.&lt;br /&gt;
&lt;br /&gt;
First make the sd-card writable again and change fstab to always do so:&lt;br /&gt;
{{cmd|mount /media/mmcblk0p1 -o rw,remount&lt;br /&gt;
sed -i &#039;s/vfat\ ro,/vfat\ rw,&#039; /etc/fstab}}&lt;br /&gt;
&lt;br /&gt;
Create the loop-back file, this example is 1 GB:&lt;br /&gt;
&lt;br /&gt;
{{cmd|dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/media/mmcblk0p1/persist.img bs&amp;amp;#61;1024 count&amp;amp;#61;0 seek&amp;amp;#61;1048576}}&lt;br /&gt;
&lt;br /&gt;
Install the ext utilities:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add e2fsprogs}}&lt;br /&gt;
&lt;br /&gt;
Format the loop-back file:&lt;br /&gt;
&lt;br /&gt;
{{cmd|mkfs.ext4 /media/mmcblk0p1/persist.img}}&lt;br /&gt;
&lt;br /&gt;
Mount the storage: &lt;br /&gt;
&lt;br /&gt;
{{cmd|echo &amp;quot;/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&amp;amp;#61;remount-ro 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
mkdir /media/persist &lt;br /&gt;
mount -a}}&lt;br /&gt;
&lt;br /&gt;
Make the overlay folders, we are doing /usr here, but you can do /home or anything else:&lt;br /&gt;
&lt;br /&gt;
{{cmd|mkdir /media/persist/usr &lt;br /&gt;
mkdir /media/persist/.work &lt;br /&gt;
echo &amp;quot;overlay /usr overlay lowerdir&amp;amp;#61;/usr,upperdir&amp;amp;#61;/media/persist/usr,workdir&amp;amp;#61;/media/persist/.work 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab &lt;br /&gt;
mount -a}}&lt;br /&gt;
&lt;br /&gt;
Your /etc/fstab should look something like this:&lt;br /&gt;
{{Cmd|/dev/cdrom      /media/cdrom    iso9660 noauto,ro 0 0&lt;br /&gt;
/dev/usbdisk    /media/usb      vfat    noauto,ro 0 0&lt;br /&gt;
/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,relatime,fmask&amp;amp;#61;0022,dmask&amp;amp;#61;0022,errors&amp;amp;#61;remount-ro 0 0&lt;br /&gt;
/media/mmcblk0p1/persist.img /media/persist ext4 rw,relatime,errors&amp;amp;#61;remount-ro 0 0&lt;br /&gt;
overlay /usr overlay lowerdir&amp;amp;#61;/usr,upperdir&amp;amp;#61;/media/persist/usr,workdir&amp;amp;#61;/media/persist/.work 0 0}}&lt;br /&gt;
&lt;br /&gt;
Now commit the changes: (optionally remove the e2fsprogs, but it does contain repair tools)&lt;br /&gt;
{{cmd|lbu_commit}}&lt;br /&gt;
&lt;br /&gt;
Remember with this setup, if you install things and you have done this overlay for /usr, you must not commit the &#039;apk add&#039;, otherwise while it boots it will try and install it to memory and not to the persist storage.&lt;br /&gt;
&lt;br /&gt;
If you do want to install something small at boot you can use `apk add` and `lbu commit`.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== X11 Setup ===&lt;br /&gt;
Here are what you need if you want to try and run a single X11 application like a browser kiosk or maybe even a desktop: ​{{cmd|setup-xorg-base &lt;br /&gt;
​apk add xf86-video-fbdev xf86-input-mouse xf86-input-keyboard dbus ​set​xkbmap&lt;br /&gt;
rc-update ​​add dbus}}&lt;br /&gt;
&lt;br /&gt;
Also edit the default X11 module config: /etc/X11/xorg.conf.d/20-modules.conf&lt;br /&gt;
{{cmd|Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load &amp;quot;fbdevhw&amp;quot;&lt;br /&gt;
    Load &amp;quot;fb&amp;quot;&lt;br /&gt;
    Load &amp;quot;shadow&amp;quot;&lt;br /&gt;
    Load &amp;quot;shadowfb&amp;quot;&lt;br /&gt;
    Load &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Disable &amp;quot;glx&amp;quot;&lt;br /&gt;
    Disable &amp;quot;dri&amp;quot;&lt;br /&gt;
EndSection}}&lt;br /&gt;
&lt;br /&gt;
Commit your changes:&lt;br /&gt;
{{cmd|lbu_commit}}&lt;br /&gt;
&lt;br /&gt;
Now you should be able to run a browser or desktop. (Guides may follow)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;/div&gt;</summary>
		<author><name>SkAzZ</name></author>
	</entry>
</feed>