<?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=Jwatt</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=Jwatt"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Jwatt"/>
	<updated>2026-05-02T09:02:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ACF&amp;diff=21589</id>
		<title>ACF</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ACF&amp;diff=21589"/>
		<updated>2022-02-09T09:31:46Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Propose deletion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alpine_Configuration_Framework_Design]]&lt;br /&gt;
&lt;br /&gt;
([https://wiki.alpinelinux.org/w/index.php?title=Special%3AWhatLinksHere&amp;amp;target=ACF&amp;amp;namespace= Nothing links to this page])&lt;br /&gt;
&lt;br /&gt;
{{Delete|Nothing links to this page}}&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Stream_a_DV-camera_using_vlc&amp;diff=21588</id>
		<title>Stream a DV-camera using vlc</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Stream_a_DV-camera_using_vlc&amp;diff=21588"/>
		<updated>2022-02-09T09:30:18Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Link directly to target page rather than going through redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
In this howto we are going to stream the video coming from a DV-camera connected through ie1394 (firewire).&amp;lt;BR&amp;gt;&lt;br /&gt;
vlc is used to stream the content.&amp;lt;BR&amp;gt;&lt;br /&gt;
We will be using h264 and AAC to transcode the stream &#039;&#039;(should be fairly easy to change to whatever suits your needs)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Setup Alpine =&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
Follow [[Installing_Alpine]] to setup Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Install programs ==&lt;br /&gt;
{{Cmd| apk add vlc-daemon vlc-dev }}&lt;br /&gt;
{{note|If you intend to use a desktop environment with vlc you will need to install {{pkg|vlc-qt}} in order to get that working.&amp;lt;BR&amp;gt;{{pkg|vlc-dev}} or {{pkg|vlc}} package does not contain the graphical part of vlc &#039;&#039;(menus etc.)&#039;&#039;.}}&lt;br /&gt;
{{todo| I haven&#039;t figured out why vlc-dev is needed. Manually adding all vlc-dev dependencies does not work.&amp;lt;BR&amp;gt;&lt;br /&gt;
The &#039;require vlc-dev&#039; thing is reported at http://bugs.alpinelinux.org/issues/1051 and might be solved soon &#039;&#039;(or &#039;vlc-dev&#039; really is needed as a dependency)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
== Using ACF to control vlc ==&lt;br /&gt;
{{tip|A easy way to control vlc-daemon would be through [[Alpine Configuration Framework Design|ACF]]. Consider following these simple steps.&amp;lt;BR&amp;gt;&lt;br /&gt;
But as it is &#039;&#039;optional&#039;&#039; you could just skip this [[Alpine Configuration Framework Design|ACF]] section.}}&lt;br /&gt;
Setup/install acf &#039;&#039;(unless it&#039;s not already done)&#039;&#039;.&lt;br /&gt;
{{cmd| setup-acf}}&lt;br /&gt;
Install acf-package for vlc&lt;br /&gt;
{{cmd| apk add acf-vlc-daemon}}&lt;br /&gt;
We won&#039;t describe in this tutorial how you would use [[Alpine Configuration Framework Design|ACF]] to control vlc-daemon &#039;&#039;(basically because it&#039;s so simple it does not need any describing)&#039;&#039;.&amp;lt;BR&amp;gt;&lt;br /&gt;
If you installed [[Alpine Configuration Framework Design|ACF]], just browse &amp;lt;nowiki&amp;gt;https://ip.of.your.box&amp;lt;/nowiki&amp;gt; and you would from this tutorial understand what to do.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure vlc =&lt;br /&gt;
Configuration is done by modifying &#039;/etc/conf.d/vlc&#039;.&amp;lt;BR&amp;gt;&lt;br /&gt;
Here comes the actual configuration that makes vlc stream the DV-camera.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###############&lt;br /&gt;
BITRATE=500&lt;br /&gt;
XRES=720&lt;br /&gt;
YRES=576&lt;br /&gt;
&lt;br /&gt;
###############&lt;br /&gt;
# Chose one of the following &#039;preset&#039; values depending on how fast your CPU is:&lt;br /&gt;
#   ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow,placebo&lt;br /&gt;
TVIDEO=&amp;quot;venc=x264{preset=ultrafast,vbv-maxrate=${BITRATE},vbv-bufsize=256,keyint=250,min-keyint=25},vcodec=h264,vb=${BITRATE},scale=1,width=${XRES},height=${YRES}&amp;quot;&lt;br /&gt;
TAUDIO=&amp;quot;acodec=mp4a,ab=96,channels=2,samplerate=44100&amp;quot;&lt;br /&gt;
TMISC=&amp;quot;deinterlace,audio-sync&amp;quot;&lt;br /&gt;
&lt;br /&gt;
###############&lt;br /&gt;
TRANSPORT=&amp;quot;std{access=http,mux=ts,dst=:8080}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
VLC_OPTS=&amp;quot;--daemon -I dummy dv:///dev/fw0 --rawdv-hurry-up --sout-keep --sout-transcode-audio-sync \&lt;br /&gt;
--file-logging --logfile /var/log/vlc/vlc.log \&lt;br /&gt;
--sout #transcode{$TVIDEO,$TAUDIO,$TMISC}:$TRANSPORT&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Start it up =&lt;br /&gt;
== Prepare the hardware ==&lt;br /&gt;
Here comes the hardest part in this tutorial... Attach the DV-camera to your ie1394/firewire port.&amp;lt;BR&amp;gt;&lt;br /&gt;
Well... that wasn&#039;t too hard! :-)&lt;br /&gt;
&lt;br /&gt;
== Manual start ==&lt;br /&gt;
Start vlc-daemon either from terminal:&lt;br /&gt;
{{cmd|/etc/init.d/vlc start}}&lt;br /&gt;
or using ACF and just klick [Start].&lt;br /&gt;
&lt;br /&gt;
== Make it start at next reboot ==&lt;br /&gt;
You might want to make it automatically start at next reboot&lt;br /&gt;
{{cmd|rc-update add vlc-daemon default}}&lt;br /&gt;
&lt;br /&gt;
== Debug ==&lt;br /&gt;
In case something goes wrong, consider looking at the logfiles.&lt;br /&gt;
{{cmd|less -I /var/log/vlc/vlc.log}}&lt;br /&gt;
If you don&#039;t find any useful information you could add verbosity by adding &#039;-v&#039; or &#039;-vv&#039; to /etc/conf.d/vlc and restart vlc &#039;&#039;(you would need to restart vlc-daemon to see more information in the logs)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=APKBUILD_examples:ACF&amp;diff=21587</id>
		<title>APKBUILD examples:ACF</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=APKBUILD_examples:ACF&amp;diff=21587"/>
		<updated>2022-02-09T09:28:32Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Link directly to target page rather than going through redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Alpine Configuration Framework Design|ACF]] packages only needs a package() section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package() {&lt;br /&gt;
	cd &amp;quot;$srcdir/$pkgname-$pkgver&amp;quot;&lt;br /&gt;
	make DESTDIR=&amp;quot;$pkgdir&amp;quot; install&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:ACF]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Configuration_Framework_Design&amp;diff=21586</id>
		<title>Alpine Configuration Framework Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Configuration_Framework_Design&amp;diff=21586"/>
		<updated>2022-02-09T09:26:21Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Remove self references (&amp;#039;ACF&amp;#039; is a redirect back to this page)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Configuration Framework  =&lt;br /&gt;
&lt;br /&gt;
The Alpine Configuration Framework (ACF) is a mvc-style application for configuring an Alpine Linux device. The primary focus is for a web interface - ACF&#039;s main goal is to be a light-weight MVC &amp;quot;webmin&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== Why Haserl + Lua  ==&lt;br /&gt;
&lt;br /&gt;
Other competitors in the arena were Webmin, Ruby on Rails, PHP with templates. &lt;br /&gt;
&lt;br /&gt;
A full webmin (Perl), RoR or PHP implementation each require several MB of installed code, and can have very slow startup times, especially when used in &amp;quot;cgi&amp;quot; mode. After evaluating many options, we found that [http://www.lua.org Lua] has the following advantages: &lt;br /&gt;
&lt;br /&gt;
*It is small (typically ~200KB of compiled code) &lt;br /&gt;
*It compiles and runs much faster than [http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;amp;lang=lua&amp;amp;lang2=php PHP], [http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;amp;lang=lua&amp;amp;lang2=perl Perl] or [http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;amp;lang=lua&amp;amp;lang2=ruby Ruby] &lt;br /&gt;
*It provides a &amp;quot;normal&amp;quot; scripting language with [http://en.wikipedia.org/wiki/Lua_(programming_language)#Features features] similar to PHP, perl, java, [[awk]], etc.&lt;br /&gt;
&lt;br /&gt;
Haserl + Lua provides a &#039;good enough&#039; toolset to build a full-featured web application.&lt;br /&gt;
&lt;br /&gt;
== Why ACF is MVC  ==&lt;br /&gt;
&lt;br /&gt;
The MVC design pattern is used to separate presentation information from control logic. By MVC we mean: &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Model&#039;&#039;&#039; - code that reads / writes a config file, starts / stops daemons, or does other work modifying the router. &lt;br /&gt;
*&#039;&#039;&#039;View&#039;&#039;&#039; - code that formats data for output &lt;br /&gt;
*&#039;&#039;&#039;Controller&#039;&#039;&#039; - code that glues the two together&lt;br /&gt;
&lt;br /&gt;
Note the lack of words like: HTML, XML, OO, AJAX, etc. The purpose of ACF&#039;s MVC is simply to separate the configuration logic from the presentation of the output. &lt;br /&gt;
&lt;br /&gt;
The flow of a single transaction is: &lt;br /&gt;
&lt;br /&gt;
start -&amp;amp;gt; execute requested function in &#039;&#039;&#039;controller&#039;&#039;&#039;, optionally reading/writing a file using functions in the &#039;&#039;&#039;model&#039;&#039;&#039; -&amp;amp;gt; execute the &#039;&#039;&#039;view&#039;&#039;&#039; to format the output -&amp;amp;gt; end &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Every&#039;&#039; transaction follows this pattern. For ACF developers, the focus should be on getting a model that does a proper job of abstracting the config file into useable entities and then building a controller that presents useable &amp;quot;actions&amp;quot; based on the model. The presentation layer should be last on the priority list. &lt;br /&gt;
&lt;br /&gt;
Of course, as with all MVC designs, the ACF MVC design is not quite &#039;pure&#039; MVC and has evolved over time. Most of the &#039;&#039;&#039;controller&#039;&#039;&#039; functionality is handled by the framework code. The framework code will also automatically generate views for HTML, JSON, and a few other viewtypes if no &#039;&#039;&#039;view&#039;&#039;&#039; is defined. Also, many &#039;&#039;&#039;model&#039;&#039;&#039; functions are implemented in helper libraries. We have attempted to make it as easy as possible to develop new ACF modules.&lt;br /&gt;
&lt;br /&gt;
For good background information on what ACF attempts to do, please see Terence Parr&#039;s paper &amp;quot;Enforcing Strict Model-View Separation in Template Engines&amp;quot; at [http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf http://www.cs.usfcs.edu] or the [[Media:Mvc.templates.pdf|local copy]] of the pdf. &lt;br /&gt;
&lt;br /&gt;
= Starting ACF  =&lt;br /&gt;
Installing ACF is really simple. Just type this in your terminal and follow the instructions to setup ACF:&lt;br /&gt;
{{cmd|setup-acf}}&lt;br /&gt;
&#039;&#039;(This script will install mini-httpd, create a certificate, starts mini-httpd in HTTPS mode and installs some basic acf-packages.)&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view ACF, simply browse to your machine https://&amp;amp;lt;hostname&amp;amp;gt;/&lt;br /&gt;
&lt;br /&gt;
See also [[Managing ACF|Managing Your ACF Installation]]&lt;br /&gt;
&lt;br /&gt;
{{tip|Alternately, you can manually install ACF and your web server. The two critical ACF packages are acf-core and acf-alpine-baselayout. The ACF packages will install to /usr/share/acf. You can configure your web server to give access to /usr/share/acf/www and run cgi scripts from /usr/share/acf/www/cgi-bin, and you should be able to view ACF.}}&lt;br /&gt;
&lt;br /&gt;
{{Warning| In Alpine Linux 1.8, the system includes two default users: &#039;&#039;alpine&#039;&#039; and &#039;&#039;foo&#039;&#039;. &#039;alpine&#039; is given ADMIN rights and &#039;foo&#039; is given USER rights. The default password for both users is &#039;&#039;test123&#039;&#039;. &#039;&#039;&#039;Replace the default users as soon as possible.&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
As of 1.9 you will get prompted for a password for the &#039;root&#039; account so this is no issue for newer Alpine Linux versions.}}&lt;br /&gt;
&lt;br /&gt;
= ACF Developer&#039;s Guides  =&lt;br /&gt;
&lt;br /&gt;
#[[ACF mvc.lua reference|mvc.lua reference]] - mvc.lua is the core of ACF &lt;br /&gt;
#[[ACF mvc.lua example|mvc.lua example]] - build a simple (command-line) application &lt;br /&gt;
#[[ACF acf www-controller.lua reference|acf www-controller reference]] - ACF www application functions &lt;br /&gt;
#[[ACF acf www example|acf www-controller example]] - webify the above examples &lt;br /&gt;
#[[ACF how to write]] - Step by step howto for writing ACF modules &lt;br /&gt;
#[[ACF core principles]] - Things that are standard across the application &lt;br /&gt;
#[[LPOSIX]] - Documentation for the Lua Posix functions &lt;br /&gt;
#[[ACF Libraries]] - Document the libraries and common functions &lt;br /&gt;
#[[Writing ACF Views]] - Guide for writing a view &lt;br /&gt;
#[[Writing ACF Controllers]] - Guide for writing a controller &lt;br /&gt;
#[[Writing ACF Models]] - Guide for writing a model&lt;br /&gt;
&lt;br /&gt;
== Other useful links  ==&lt;br /&gt;
&lt;br /&gt;
#[http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual] &lt;br /&gt;
#[http://www.lua.org/pil/ Programming in Lua (first edition)]&lt;br /&gt;
#[[Managing ACF]]&lt;br /&gt;
&lt;br /&gt;
= ACF Layout  =&lt;br /&gt;
&lt;br /&gt;
ACF has support for multiple skins.&amp;lt;br&amp;gt;Only a few skins are available. Feel free to contribute in programming css-stylesheets for ACF. &lt;br /&gt;
&lt;br /&gt;
== How to contribute  ==&lt;br /&gt;
&lt;br /&gt;
First, download ACF using git or installing available ACF modules using &#039;apk add&#039;.&amp;lt;br&amp;gt;Easiest is if you download the latest Alpine Linux ISO, boot a box from the ISO and then run &#039;setup-alpine&#039; and &#039;setup-acf&#039;. That way you get a running environment fast and easy!&amp;lt;br&amp;gt;Some example skins are available: &lt;br /&gt;
&lt;br /&gt;
*/usr/share/acf/www/skins/alps/ &lt;br /&gt;
*/usr/share/acf/www/skins/cloud/ &lt;br /&gt;
*/usr/share/acf/www/skins/ice/ &lt;br /&gt;
*/usr/share/acf/www/skins/snow/&lt;br /&gt;
*/usr/share/acf/www/skins/wik/ &lt;br /&gt;
&lt;br /&gt;
Make a new skin folder. &lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/acf/skins/myskin&lt;br /&gt;
&lt;br /&gt;
Create a css file called as the folder. &lt;br /&gt;
&lt;br /&gt;
 touch /etc/acf/skins/myskin/myskin.css&lt;br /&gt;
&lt;br /&gt;
Now you can start editing your myskin.css.&amp;lt;br&amp;gt;If you have ACF running on the computer, you can browse to https://&amp;amp;lt;hostname&amp;amp;gt;/cgi-bin/acf/acf-util/skins/read and switch to your new skin (called myskin) and see the results of your changes. &lt;br /&gt;
&lt;br /&gt;
Pack your myskin folder, containing your css file (and images, if there are any).&amp;lt;br&amp;gt;Send this patch to acf@lists.alpinelinux.org &#039;&#039;(&#039;&#039;&#039;Note:&#039;&#039;&#039; Don&#039;t forget to [http://wiki.alpinelinux.org/w/index.php?title=Mailing_lists subscribe] before sending your patch)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= ACF Packages  =&lt;br /&gt;
&lt;br /&gt;
Look at [http://wiki.alpinelinux.org/w/index.php?title=ACF_packages ACF packages] to see available ACF modules and their status.&lt;br /&gt;
&lt;br /&gt;
[[Category:ACF]] [[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux_On_The_Command_Line&amp;diff=21585</id>
		<title>Alpine Linux On The Command Line</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux_On_The_Command_Line&amp;diff=21585"/>
		<updated>2022-02-09T09:23:35Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Propose deletion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alpine Linux package management]]&lt;br /&gt;
&lt;br /&gt;
([https://wiki.alpinelinux.org/w/index.php?title=Special%3AWhatLinksHere&amp;amp;target=Alpine%20Linux%20On%20The%20Command%20Line&amp;amp;namespace= Nothing links to this page])&lt;br /&gt;
&lt;br /&gt;
{{Delete|Nothing links to this page}}&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Install_to_disk&amp;diff=21584</id>
		<title>Install to disk</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Install_to_disk&amp;diff=21584"/>
		<updated>2022-02-09T09:14:16Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= If using Alpine Linux 2.2.3 or later =&lt;br /&gt;
&lt;br /&gt;
{{Warning|This will erase &#039;&#039;&#039;everything&#039;&#039;&#039; on your machine&#039;s harddisk. Don&#039;t blame me if someone sues you for this, your cat dies etc. You are warned.}}&lt;br /&gt;
&lt;br /&gt;
The following is meant to be an absolute newbie guide&lt;br /&gt;
&lt;br /&gt;
* [[Burning ISOs|Burn the Alpine ISO image to a CD]]&lt;br /&gt;
* Put the CD into the new computer and turn on the power. Make sure the computer is capable to boot from a CD. Your manual for the computer or the BIOS can help.&lt;br /&gt;
* Wait for the text &#039;&#039;&#039;login:&#039;&#039;&#039; to appear, type &#039;&#039;&#039;root&#039;&#039;&#039; and press enter.&lt;br /&gt;
* Run the &#039;&#039;&#039;setup-alpine&#039;&#039;&#039; script&lt;br /&gt;
** Choose your keyboard layout. If you don&#039;t know your keyboard layout choose &#039;&#039;&#039;us&#039;&#039;&#039;. Here &#039;&#039;&#039;us&#039;&#039;&#039; was chosen.&lt;br /&gt;
*** Then I chose the &#039;&#039;&#039;us&#039;&#039;&#039; variant.&lt;br /&gt;
** Host name, which will be the name of your computer, you can just press enter if you want to use the default name&lt;br /&gt;
** Choose your network card, most people can just go with the default (press enter)&lt;br /&gt;
*** Most people will use DHCP, so press enter again, or you can enter in your static IP address&lt;br /&gt;
*** You will be asked if you want to do any manual network configuration, press enter for no&lt;br /&gt;
** Type in your root password twice.&lt;br /&gt;
** Choose a time zone, you can get a list by pressing &#039;&#039;&#039;?&#039;&#039;&#039;. If you want a sub zone, e.g. Africa, type in Africa and press enter, &#039;&#039;&#039;?&#039;&#039;&#039; will give you a list of sub zones in Africa.&lt;br /&gt;
** Press &#039;&#039;&#039;f&#039;&#039;&#039; to choose the fastest mirror.&lt;br /&gt;
** Choose an SSH server, this allows you to remotely manage your machine. OpenSSH is what the big distro&#039;s use, Dropbear is a tiny SSH replacement. Choose &#039;&#039;&#039;none&#039;&#039;&#039; for best security.&lt;br /&gt;
** Choose an NTP client, this keeps your machine&#039;s time accurate using an Internet time server. Openntpd is what the big distro&#039;s use, while Chrony is a tiny replacement.&lt;br /&gt;
** Choose a disk you want to install Alpine onto, as an example, &#039;&#039;&#039;sda&#039;&#039;&#039; is the first disk in your computer.&lt;br /&gt;
*** Now choose how you would like to use it, for this guide, choose &#039;&#039;&#039;sys&#039;&#039;&#039;, this will install the entire OS onto your hard drive&lt;br /&gt;
*** You are given a final chance to back out, type in &#039;&#039;&#039;Y&#039;&#039;&#039; to continue&lt;br /&gt;
* The installation is now complete and you will be asked to reboot. Type in &#039;&#039;&#039;reboot&#039;&#039;&#039; and press enter&lt;br /&gt;
Take out the CD, and your computer should boot into Alpine using your hard drive.&lt;br /&gt;
&lt;br /&gt;
=== Continue Setting up your Computer ===&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Linux package management]] &#039;&#039;(How to add/remove packages on your Alpine)&#039;&#039;&lt;br /&gt;
* [[OpenRC]] &#039;&#039;(Configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
* [[Tutorials and Howtos]] &#039;&#039;(Various tutorials, including how to setup a [[XFCE Setup|XFCE desktop]])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
= If using Alpine Linux 2.2.2 or earlier =&lt;br /&gt;
&lt;br /&gt;
A number of steps are nowadays included in the setup-disk and setup-lbu scripts, which are invoked by setup-alpine. But in these older systems, these steps have to be performed manually.&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; to configure the keyboard, hostname and networking.&lt;br /&gt;
{{Cmd|setup-alpine}}&lt;br /&gt;
&lt;br /&gt;
Now for the manual steps. Install needed programs for the setup:&lt;br /&gt;
{{Cmd|apk add e2fsprogs syslinux mkinitfs}}&lt;br /&gt;
&lt;br /&gt;
Create partitions with &amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt;. &lt;br /&gt;
{{Cmd|fdisk /dev/sda}}&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say you have 2 partitions: {{Path|/dev/sda1}} as &amp;quot;Linux&amp;quot; (type 83) and {{Path|/dev/sda2}} as &amp;quot;linux swap&amp;quot; (type 82). The partition containing {{Path|/boot}}---here, {{Path|/dev/sda1}}---must be marked bootable (command &amp;quot;a&amp;quot; within &amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Next, create your filesystem(s) and swap:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mkfs.ext4 /dev/sda1&lt;br /&gt;
mkswap /dev/sda2}}&lt;br /&gt;
&lt;br /&gt;
Mount the filesystem:&lt;br /&gt;
{{Cmd|mount -t ext4 /dev/sda1 /mnt}}&lt;br /&gt;
&lt;br /&gt;
Clone the current running config created by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; (hostname, networking root password):&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;lbu package - | tar -C /mnt -zxf -&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Install base packages on the mounted disk:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;apk add --root=/mnt --initdb $(cat /etc/apk/world)&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Append the / and swap to {{Path|/etc/fstab}}:&lt;br /&gt;
{{Cmd|echo -e &amp;quot;/dev/sda1 /    ext4  defaults 1 1&amp;quot; &amp;amp;gt;&amp;amp;gt; /mnt/etc/fstab&lt;br /&gt;
echo -e &amp;quot;/dev/sda2 none swap  sw       0 0&amp;quot; &amp;amp;gt;&amp;amp;gt; /mnt/etc/fstab}}&lt;br /&gt;
&lt;br /&gt;
Configure the boot loader, &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;. We use the provided {{Path|syslinux.cfg}} as base.&lt;br /&gt;
{{Cmd|cp /media/cdrom/syslinux.cfg /mnt/boot/extlinux.conf&lt;br /&gt;
vi /mnt/boot/extlinux.conf}}&lt;br /&gt;
&lt;br /&gt;
It should contain something like:&lt;br /&gt;
 timeout 20&lt;br /&gt;
 prompt 1&lt;br /&gt;
 default grsec&lt;br /&gt;
 label grsec&lt;br /&gt;
     kernel /boot/grsec&lt;br /&gt;
     append initrd=/boot/grsec.gz root=/dev/sda1 modules=ext4 quiet&lt;br /&gt;
&lt;br /&gt;
Install the [[Bootloaders|bootloader]] on your {{Path|/boot}} partition:&lt;br /&gt;
{{Cmd|extlinux -i /mnt/boot}}&lt;br /&gt;
&lt;br /&gt;
Install the early-stage bootloader in the disk&#039;s MBR (note that it&#039;s {{Path|/dev/sda}} not {{Path|/dev/sda1}}!)&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;dd if=/usr/share/syslinux/mbr.bin of=/dev/sda&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This also works:&lt;br /&gt;
{{Cmd|cat /usr/share/syslinux/mbr.bin &amp;gt; /dev/sda}}&lt;br /&gt;
&lt;br /&gt;
Unmount, remove cdrom, and reboot. (If you can&#039;t eject, just remove it manually as the machine reboots) &lt;br /&gt;
{{Cmd|umount /mnt&lt;br /&gt;
umount /.modloop&lt;br /&gt;
eject &lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
In recent versions of Alpine, the second line can be accomplished by &amp;lt;code&amp;gt;rc-service modloop stop&amp;lt;/code&amp;gt;. (See [[FAQ#How_do_I_remove_the_CDROM.3F|this FAQ entry]]).&lt;br /&gt;
&lt;br /&gt;
After reboot, you should be able to log in as root with the password you created in &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=XFCE_Setup&amp;diff=21581</id>
		<title>XFCE Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=XFCE_Setup&amp;diff=21581"/>
		<updated>2022-02-09T09:09:01Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Avoid double redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Xfce]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Desktop-notes&amp;diff=21580</id>
		<title>Desktop-notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Desktop-notes&amp;diff=21580"/>
		<updated>2022-02-09T09:08:29Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Avoid double redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Xfce]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=SLiM&amp;diff=21579</id>
		<title>SLiM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=SLiM&amp;diff=21579"/>
		<updated>2022-02-09T09:08:03Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Delete|The project hasnt had any commits since 2013 and its likely not working anymore}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|The SLiM project appears to have been abandoned since 2013, although the [http://slim.berlios.de/ project homepage] is online. Also: https://github.com/iwamatsu/slim}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://slim.berlios.de/index.php SLiM] is a Simple Login Manager (also known as a display manager) which is lightweight and simple to configure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
Simply add the {{Pkg|slim}} package with:&lt;br /&gt;
{{Cmd|apk add slim}}&lt;br /&gt;
I should imagine you&#039;d also want some kind of desktop installed too, like [[Gnome Setup|Gnome]] or [[XFCE Setup|XFCE]]&lt;br /&gt;
&lt;br /&gt;
== Configure &amp;amp; Test ==&lt;br /&gt;
&lt;br /&gt;
The SLiM configuration file is at &amp;lt;code&amp;gt;/etc/slim.conf&amp;lt;/code&amp;gt; and it is heavily commented, so I&#039;ll not add any info about it here unless asked to (in the discussion function for instance).  Before making any changes it is recommended to backup the default configuration file with:&lt;br /&gt;
{{Cmd|cp /etc/slim.conf /etc/slim.conf.original}}&lt;br /&gt;
&lt;br /&gt;
Then you can modify &amp;lt;code&amp;gt;/etc/slim.conf&amp;lt;/code&amp;gt; and easily copy the default configuration back if you run into trouble:&lt;br /&gt;
{{Cmd|cp /etc/slim.conf.original /etc/slim.conf}}&lt;br /&gt;
&lt;br /&gt;
To immediately test slim, do {{Cmd|rc-service slim start}} and you should be presented with a login screen, branded for Alpine linux!&lt;br /&gt;
&lt;br /&gt;
Login with your normal user credentials (avoid using a desktop as root) and you should reach your desktop.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve tested it works, start SLiM at the default runlevel:&lt;br /&gt;
{{Cmd|rc-update add slim}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note: You should disable any other display manager you have running&amp;lt;/b&amp;gt; to prevent them both launching.  For example, to prevent lxdm from starting at boot use:&lt;br /&gt;
{{Cmd|rc-update del lxdm}}&lt;br /&gt;
&lt;br /&gt;
== Extra Login Commands ==&lt;br /&gt;
When on the SLiM login screen, you can use:&lt;br /&gt;
* &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; as a username to return to a shell prompt&lt;br /&gt;
* &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt; as a username and the root password to reboot the machine&lt;br /&gt;
* &amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt; as a username and the root password to power down the machine&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you are using a .xinitrc file (usually located at &amp;lt;code&amp;gt;~/.xinitrc&amp;lt;/code&amp;gt;, slim will read from this and you will need to ensure you have a line to execute your desktop environment.  This is usually the last line of the file.  For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;....&lt;br /&gt;
exec startxfce4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if you are using an [[Xfce]], or:&lt;br /&gt;
&amp;lt;pre&amp;gt;....&lt;br /&gt;
exec gnome-session&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if using [[Gnome]].&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t do this, or you make a mistake with your typing, you&#039;ll probably get an error like &amp;lt;code&amp;gt;failed to execute login command&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Themes ==&lt;br /&gt;
&lt;br /&gt;
Simply add the {{Pkg|slim-theme}} package with:&lt;br /&gt;
{{Cmd|apk add slim-themes}}&lt;br /&gt;
&lt;br /&gt;
All theme which are available on your system are located at &amp;lt;code&amp;gt;/usr/share/slim/themes&amp;lt;/code&amp;gt;&lt;br /&gt;
{{Cmd|ls /usr/share/slim/themes}}&lt;br /&gt;
&lt;br /&gt;
You need to modify &amp;lt;code&amp;gt;/etc/slim.conf&amp;lt;/code&amp;gt; to change the theme:&lt;br /&gt;
{{Cmd|sudo vi /etc/slim.conf}}&lt;br /&gt;
&lt;br /&gt;
Search for &amp;lt;code&amp;gt;current_theme&amp;lt;/code&amp;gt; and choose one of the available themes.&lt;br /&gt;
&lt;br /&gt;
== Further Information ==&lt;br /&gt;
&lt;br /&gt;
* [http://slim.berlios.de/index.php SLiM Homepage]&lt;br /&gt;
* [http://slim.berlios.de/manual.php SLiM Manual]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/SLiM Arch Linux wiki entry]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=21578</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=21578"/>
		<updated>2022-02-09T09:07:43Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Todo|This material needs to be re-organized .. as &#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; and &#039;&#039;&#039;tutorials are more detailed document&#039;&#039;&#039; both need to be reordered as independent sections }}&lt;br /&gt;
&lt;br /&gt;
[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The tutorials are hands-on&#039;&#039;&#039; and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; explaining how to perform a particular task with Alpine Linux, that expects a minimal knowledge from reader to perform actions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; contributions on those pages must be complete articles as well as requesting topics to be covered, don&#039;t override already made contributions. If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== Postinstall ===&lt;br /&gt;
&lt;br /&gt;
* [[Post installation|Post installation notes]]&lt;br /&gt;
&lt;br /&gt;
==== Postinstall: desktops and applications ====&lt;br /&gt;
&lt;br /&gt;
* [[Desktop environments and Window managers]] (overall information only)&lt;br /&gt;
** [[Xfce]]&lt;br /&gt;
** [[LXQt]]&lt;br /&gt;
** [[Openbox]]&lt;br /&gt;
** [[MATE]]&lt;br /&gt;
* [[Alpine and UEFI|Alpine and UEFI Support Status and related topics]]&lt;br /&gt;
&lt;br /&gt;
==== Developers: compilers, IDEs and tools ====&lt;br /&gt;
&lt;br /&gt;
* [[Alpine newbie developer]]&lt;br /&gt;
** [[Alpine newbie developer: gitea|Alpine newbie developer: Git management web frontend gitea]]&lt;br /&gt;
** [[Alpine newbie developer: full stack web]]&lt;br /&gt;
&lt;br /&gt;
==== Servers: deploy in production ====&lt;br /&gt;
&lt;br /&gt;
* [[Alpine production deploy]]&lt;br /&gt;
** [[Production Web server: Lighttpd|Production web server: Lighttpd‎‎]]&lt;br /&gt;
** [[Production DataBases : mysql|Production database: MySql]]&lt;br /&gt;
** [[Production LAMP system: Lighttpd + PHP + MySQL‎‎]]&lt;br /&gt;
* Alpine production monitoring&lt;br /&gt;
** [[Cacti: traffic analysis and monitoring network]]&lt;br /&gt;
** [[Zabbix|Zabbix - the professional complete manager]]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039; &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
* [[Setting up a software RAID array]]&lt;br /&gt;
&amp;lt;!-- ** [[Setting up a /var partition on software IDE raid1]]  Obsolete, Installation and Storage --&amp;gt; &lt;br /&gt;
* [[Raid Administration]]&lt;br /&gt;
* [[Setting up encrypted volumes with LUKS]]&lt;br /&gt;
* [[Setting up LVM on LUKS]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM]]&lt;br /&gt;
* [[Filesystems|Formatting HD/Floppy/Other]] &amp;lt;!-- just a stub --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up iSCSI]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
* [[Setting up NBD]]&lt;br /&gt;
* [[Setting up ZFS on LUKS]]&lt;br /&gt;
* [[Setting up ZFS with native encryption]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]] &#039;&#039;(deprecated)&#039;&#039; &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[Disk Replication with DRBD]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Burning ISOs]] &amp;lt;!-- just some links now --&amp;gt;&lt;br /&gt;
* [[Partitioning and Bootmanagers]]&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;br /&gt;
* [[Alpine on ARM]]&lt;br /&gt;
&lt;br /&gt;
== Networking ==&lt;br /&gt;
&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[Connecting to a wireless access point]]&lt;br /&gt;
* [[Bonding]]&lt;br /&gt;
* [[Vlan]]&lt;br /&gt;
* [[Bridge]]&lt;br /&gt;
* [[Bridge wlan0 to eth0]]&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
* [[Configure a Wireguard interface (wg)]]&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Wall]] - [[How-To Alpine Wall]] - [[Alpine Wall User&#039;s Guide]] &#039;&#039;(a new firewall management framework)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
&lt;br /&gt;
* [[Using serial modem]]&lt;br /&gt;
* [[Using HSDPA modem]]&lt;br /&gt;
* [[Setting up Satellite Internet Connection]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a SSH server]] &#039;&#039;(Using SSH is the preferred way to administer your box remotely)&#039;&#039; &amp;lt;!-- Server and Networking --&amp;gt;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* [[How to set up Alpine as a wireless router]] &#039;&#039;(Setting up a firewalled, Wireless AP with wired network on a Pi Zero W)&#039;&#039;&lt;br /&gt;
* [[Setting up a OpenVPN server with Alpine]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
&amp;lt;!-- [[Using Racoon for Remote Sites]] is a different VPN tunnelling method, but that article is just a stub --&amp;gt;&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]  &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
* [[Setting up unbound DNS server]]&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]] &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[Multi_ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[OwnCloud]] &#039;&#039;(Installing OwnCloud)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Seafile: setting up your own private cloud]]&lt;br /&gt;
&lt;br /&gt;
* [[GNUnet]]&lt;br /&gt;
&lt;br /&gt;
== Post-Install ==&lt;br /&gt;
&amp;lt;!-- If you edit this, please coordinate with Installation and Developer_Documentation#Package_management.  Note that these three sections are not exact duplicates. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]]&lt;br /&gt;
* [[Enable Community Repository]] &#039;&#039;(Providing additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine Linux package management|Package Management (apk)]] &#039;&#039;(How to add/remove packages on your Alpine)&#039;&#039;&lt;br /&gt;
   &amp;lt;!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] --&amp;gt;&lt;br /&gt;
** [[Comparison with other distros]]&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- new --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
* [[Alpine Linux Init System|Init System (OpenRC)]] &#039;&#039;(Configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
   &amp;lt;!-- [[Writing Init Scripts]] --&amp;gt;&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|Setting up Xorg]]&lt;br /&gt;
* [[Upgrading Alpine]]&lt;br /&gt;
&amp;lt;!-- Obsolete&lt;br /&gt;
 [[Upgrading Alpine - v1.9.x]]&lt;br /&gt;
 [[Upgrading Alpine - CD v1.8.x]]&lt;br /&gt;
 [[Upgrading Alpine - HD v1.8.x]]&lt;br /&gt;
 [[Upgrade to repository main|Upgrading to signed repositories]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[setup-acf]] &#039;&#039;(Configures ACF (webconfiguration) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Changing passwords for ACF|Changing passwords]]&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
&amp;lt;!-- Obsolete?&lt;br /&gt;
* [[Error message on boot: Address space collision: host bridge window conflicts with Adaptor ROM]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;some notes on need-to-know topics&#039;&#039;&lt;br /&gt;
* [[Installing Oracle Java]]&lt;br /&gt;
* [[Rsnapshot|Setting up periodic backups with &amp;lt;samp&amp;gt;rsnapshot&amp;lt;/samp&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
== Virtualization==&lt;br /&gt;
&lt;br /&gt;
* [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
* [[Xen Dom0 on USB or SD]]&lt;br /&gt;
* [[Create Alpine Linux PV DomU]]&lt;br /&gt;
* [[Xen PCI Passthrough]]&lt;br /&gt;
* [[Xen LiveCD]]&lt;br /&gt;
* [[QEMU]]&lt;br /&gt;
* [[KVM]] &#039;&#039;(Setting up Alpine as a KVM hypervisor)&#039;&#039;&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
* [[Install Alpine on VirtualBox]]&lt;br /&gt;
* [[Install Alpine on VMWare]]&lt;br /&gt;
&lt;br /&gt;
== Desktop Environment ==&lt;br /&gt;
&lt;br /&gt;
* [[AwesomeWM]]&lt;br /&gt;
* [[dwm]]&lt;br /&gt;
* [[EyeOS]] &#039;&#039;(Cloud Computing Desktop)&#039;&#039;&lt;br /&gt;
* [[Gnome]]&lt;br /&gt;
* [[KDE]]&lt;br /&gt;
* [[MATE]]&lt;br /&gt;
* [[Oneye]] &#039;&#039;(Cloud Computing Desktop - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Nextcloud]] &#039;&#039;(Self hostable cloud suite - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[River]]&lt;br /&gt;
* [[Suspend on LID close]]&lt;br /&gt;
* [[Sway]]&lt;br /&gt;
* [[Xfce]]&lt;br /&gt;
* [[Sound Setup]]&lt;br /&gt;
* [[PipeWire]]&lt;br /&gt;
* [[Printer Setup]]&lt;br /&gt;
* [[Default applications]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi (Installation)]]&lt;br /&gt;
* [[Raspberry Pi - Headless Installation]]&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi]]&lt;br /&gt;
* [[RPI Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi (IPv6)]]&lt;br /&gt;
* [[Raspberry Pi 4 - Persistent system acting as a NAS and Time Machine]]&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - kiosk or digital sign&lt;br /&gt;
* [[Raspberry Pi Zero W - Installation]]&lt;br /&gt;
* [[Raspberry Pi Bluetooth Speaker]]&lt;br /&gt;
&lt;br /&gt;
== PowerPC ==&lt;br /&gt;
&lt;br /&gt;
* [[Ppc64le|Powerpc64le (Installation)]]&lt;br /&gt;
&lt;br /&gt;
== IBM Z (IBM z Systems) ==&lt;br /&gt;
&lt;br /&gt;
* [[s390x|s390x (Installation)]]&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
** [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Freepbx on Alpine Linux]]&lt;br /&gt;
* [[FreePBX_V3]] &#039;&#039;(FreeSWITCH, Asterisk GUI web acces tool)&#039;&#039;&lt;br /&gt;
* [[2600hz]] &#039;&#039;(FreeSWITCH, Asterisk GUI web access tool)&#039;&#039;&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
** [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* [[ISP Mail Server HowTo]] &amp;lt;!-- solution, Mail --&amp;gt;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
** [[ISP Mail Server 3.x HowTo]]&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* [[Protecting your email server with Alpine]]&lt;br /&gt;
* [[Setting up clamsmtp]]&lt;br /&gt;
* [[Setting up dovecot with imap and ssl]]&lt;br /&gt;
* [[relay email to gmail (msmtp, mailx, sendmail]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP ===&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Https access]]&lt;br /&gt;
** [[Setting Up Lighttpd with PHP]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
* [[Cherokee]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
** [[Nginx_with_PHP#Nginx_with_PHP|Nginx with PHP]]&lt;br /&gt;
** [[Nginx as reverse proxy with acme (letsencrypt)]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Apache with php-fpm]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039; &amp;lt;!-- solution, Server --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[DokuWiki]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
* [[Tomcat]]&lt;br /&gt;
* [[Kopano]] &#039;&#039;(Microsoft Outlook compatible Groupware)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a nfs-server]]&lt;br /&gt;
* [[Setting up a samba-server]] &#039;&#039;(standard file sharing)&#039;&#039;&lt;br /&gt;
* [[Setting up a samba-ad-dc]] &#039;&#039;(Active Directory compatible domain controller)&#039;&#039;&lt;br /&gt;
* [[Phpizabi]] &#039;&#039;(Social Networking Platform)&#039;&#039;&lt;br /&gt;
* [[Statusnet]] &#039;&#039;(Microblogging Platform)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system)&#039;&#039;&lt;br /&gt;
* [[Request-Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_newbie_developer: gitea|Setting up Git management web frontend gitea]]&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
** [[Setting up a git repository server with gitolite and cgit]] &amp;lt;!-- doesn&#039;t exist yet --&amp;gt;&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[Cups]]&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
* [[How To Setup Your Own IRC Network]] &#039;&#039;(Using {{Pkg|charybdis}} and {{Pkg|atheme-iris}})&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Using chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Sending SMS using gnokii]]&lt;br /&gt;
* [[IPTV How To|Internet Protocol television (IPTV)]]&lt;br /&gt;
* [[UniFi_Controller]]&lt;br /&gt;
* [[DNSCrypt-Proxy]] &#039;&#039;Encrypt and authenticate DNS calls from your system&#039;&#039;&lt;br /&gt;
* [[Odoo]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
* Setting up [[collectd]]&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
* [[Cacti: traffic analysis and monitoring network]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[LTTng]] &#039;&#039;(Kernel and userspace tracing)&#039;&#039;&lt;br /&gt;
* [[Zabbix|Zabbix - the professional complete manager]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up Smokeping|Smokeping]] &#039;&#039;(Network latency monitoring)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up MRTG and Smokeping to Monitor Bandwidth Usage and Network Latency]]&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[IP Accounting]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Piwik]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]]&lt;br /&gt;
** [[Intrusion Detection using Snort, Sguil, Barnyard and more]]&lt;br /&gt;
* [[Dglog]] &#039;&#039;(Log analyzer for the web content filter DansGuardian)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Shell]]&lt;br /&gt;
* [[:Category:Programming]]&lt;br /&gt;
* [[Running glibc programs]]&lt;br /&gt;
* [[:Category:Drivers]]&lt;br /&gt;
* [[:Category:Multimedia]]&lt;br /&gt;
* [[Kernel Modesetting]]&lt;br /&gt;
* [[CPU frequency scaling]]&lt;br /&gt;
&lt;br /&gt;
== Complete Solutions ==&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [https://codeberg.org/AVG7/alpine-sway-x86_64 DIY Live-USB-Stick with Sway] &lt;br /&gt;
* [[Alpine on the Aopen Chromebase or Chromebox Mini with Mainline Kernel]]&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]&lt;br /&gt;
* [[Building a cloud with Alpine Linux]]&lt;br /&gt;
&lt;br /&gt;
* [[ISP Mail Server HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-serivce ISP mail server)&#039;&#039;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small_Office_Services]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
This does not attempt to be complete. Is it useful to have these listed here? I find them more accessible if grouped with their topics; also, an up-to-date list of all Draft or Obsolete pages can be found at [[Project:Wiki maintenance]].&lt;br /&gt;
&lt;br /&gt;
== Drafts ==&lt;br /&gt;
Currently unfinished/works-in-progress.&lt;br /&gt;
* [[Using Racoon for Remote Sites]]&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using the Squark Squid authentication helper)&#039;&#039; [!-- no longer a draft --]&lt;br /&gt;
* [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]] &#039;&#039;(Installing and configuring Snort and related applications on Alpine 2.0.x)&#039;&#039;&lt;br /&gt;
* [[IP Accounting]] &#039;&#039;(Installing and configuring pmacct for IP Accounting, Netflow/sFlow collector)&#039;&#039;&lt;br /&gt;
* [[Disk Replication with DRBD]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Newbies ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_newbie]] (for overall information in funny sections)&lt;br /&gt;
&lt;br /&gt;
[[Category:System_Administration]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21511</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21511"/>
		<updated>2022-01-26T23:42:05Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/won&#039;t use &#039;&#039;&#039;setup-bootable&#039;&#039;&#039;, you can manually create a customizable (writable) USB boot device instead.&lt;br /&gt;
&lt;br /&gt;
=== Copying ISO/tarball contents to a USB stick ===&lt;br /&gt;
&lt;br /&gt;
This method is written for copying files from an Alpine ISO file but also works for Alpine tarballs (.tar.gz files) with a one line tweak (see below).&lt;br /&gt;
&lt;br /&gt;
# Install some prerequisites. (If you&#039;re not currently using Alpine Linux then you probably have these installed already, otherwise you&#039;ll have to figure out how to install them.)&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;apk add syslinux}}&lt;br /&gt;
# Set the environment variable &#039;mydev&#039; to the [https://en.wikipedia.org/wiki/Device_file device file] name of the USB stick that Alpine Linux is to be installed to:&lt;br /&gt;
#: {{Warning | BE SURE TO GET THIS RIGHT OR ELSE YOU COULD OVERWRITE THE WRONG DISK! }}&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydev=/dev/sdU&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Make sure that the target drive&#039;s existing partitions, if any, are not mounted:&lt;br /&gt;
#: {{Cmd|umount -q $mydev?}}&lt;br /&gt;
# Copy and paste the following as a single command to wipe the target drive, create an MBR partition table, and create a single FAT32 partition (you can ignore any &amp;quot;Partition #1 contains a vfat signature.&amp;quot; warning message):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;fdisk -w always $mydev &amp;lt;&amp;lt;EOF&lt;br /&gt;
  o&lt;br /&gt;
  n&lt;br /&gt;
  p&lt;br /&gt;
  1&lt;br /&gt;
  2048&lt;br /&gt;
  -0&lt;br /&gt;
  t&lt;br /&gt;
  0c&lt;br /&gt;
  a&lt;br /&gt;
  w&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Format the new FAT32 partition with a FAT32 filesystem:&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdosfs -F32 ${mydev}1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Copy the [https://wiki.syslinux.org/wiki/index.php?title=Mbr syslinix executable boot code] into the bootstrap code area of the MBR boot sector (if you&#039;re not currently using Alpine Linux you may need to adjust the path to syslinux&#039;s mbr.bin file):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=$mydev&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Install the syslinux bootloader files onto the FAT32 filesystem (ignore the &amp;quot;Hidden (2048) does not match sectors (62)&amp;quot; messages - modern systems use the partition table):&lt;br /&gt;
#: {{Cmd|syslinux ${mydev}1}}&lt;br /&gt;
# Copy the Alpine files to the FAT32 filesystem (to copy the contents of an Alpine {{Path|.tar.gz}} tarball instead of copying {{Path|/media/cdrom}}, set &amp;lt;code&amp;gt;$alpinetarball&amp;lt;/code&amp;gt; to the path to the tarball and replace the &#039;cp&#039; line with: &amp;lt;code&amp;gt;tar -p -s --atime-preserve --same-owner --one-top-level=/media/$mydevname -zxvf &amp;quot;$alpinetarball&amp;quot;&amp;lt;/code&amp;gt;):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydevname=$(basename $mydev)1&lt;br /&gt;
mkdir -p /media/$mydevname&lt;br /&gt;
mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
cp -aT /media/cdrom /media/$mydevname  # -T to copy hidden files&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any .apkovl overlay files that were transferred as part of the copy process. Do this if you want an unmodified, vanilla install.&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
rm /media/$mydevname/*.apkovl.tar.gz&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21510</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21510"/>
		<updated>2022-01-26T23:23:20Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/won&#039;t use &#039;&#039;&#039;setup-bootable&#039;&#039;&#039;, you can manually create a customizable (writable) USB boot device instead.&lt;br /&gt;
&lt;br /&gt;
=== Copying ISO/tarball contents to a USB stick ===&lt;br /&gt;
&lt;br /&gt;
This method is written for copying files from an Alpine ISO file but also works for Alpine tarballs (.tar.gz files) with a one line tweak (see below).&lt;br /&gt;
&lt;br /&gt;
# Install some prerequisites. (If you&#039;re not currently using Alpine Linux then you probably have these installed already, otherwise you&#039;ll have to figure out how to install them.)&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;apk add syslinux}}&lt;br /&gt;
# Set the environment variable &#039;mydev&#039; to the [https://en.wikipedia.org/wiki/Device_file device file] name of the USB stick that Alpine Linux is to be installed to:&lt;br /&gt;
#: {{Warning | BE SURE TO GET THIS RIGHT OR ELSE YOU COULD OVERWRITE THE WRONG DISK! }}&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydev=/dev/sdU&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Make sure that the target drive&#039;s existing partitions, if any, are not mounted:&lt;br /&gt;
#: {{Cmd|umount -q $mydev?}}&lt;br /&gt;
# Copy and paste the following as a single command to wipe the target drive, create an MBR partition table, and create a single FAT32 partition (you can ignore any &amp;quot;Partition #1 contains a vfat signature.&amp;quot; warning message):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;fdisk -w always $mydev &amp;lt;&amp;lt;EOF&lt;br /&gt;
  o&lt;br /&gt;
  n&lt;br /&gt;
  p&lt;br /&gt;
  1&lt;br /&gt;
  2048&lt;br /&gt;
  -0&lt;br /&gt;
  t&lt;br /&gt;
  0c&lt;br /&gt;
  a&lt;br /&gt;
  w&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Format the new FAT32 partition with a FAT32 filesystem:&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdosfs -F32 ${mydev}1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Copy the [https://wiki.syslinux.org/wiki/index.php?title=Mbr syslinix executable boot code] into the MBR table (if you&#039;re not currently using Alpine Linux you may need to adjust the path to syslinux&#039;s mbr.bin file):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=$mydev&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Install the syslinux bootloader files onto the FAT32 filesystem (ignore the &amp;quot;Hidden (2048) does not match sectors (62)&amp;quot; messages - modern systems use the partition table):&lt;br /&gt;
#: {{Cmd|syslinux ${mydev}1}}&lt;br /&gt;
# Copy the Alpine files to the FAT32 filesystem (to copy the contents of an Alpine {{Path|.tar.gz}} tarball instead of copying {{Path|/media/cdrom}}, set &amp;lt;code&amp;gt;$alpinetarball&amp;lt;/code&amp;gt; to the path to the tarball and replace the &#039;cp&#039; line with: &amp;lt;code&amp;gt;tar -p -s --atime-preserve --same-owner --one-top-level=/media/$mydevname -zxvf &amp;quot;$alpinetarball&amp;quot;&amp;lt;/code&amp;gt;):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydevname=$(basename $mydev)1&lt;br /&gt;
mkdir -p /media/$mydevname&lt;br /&gt;
mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
cp -aT /media/cdrom /media/$mydevname  # -T to copy hidden files&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any .apkovl overlay files that were transferred as part of the copy process. Do this if you want an unmodified, vanilla install.&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
rm /media/$mydevname/*.apkovl.tar.gz&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21509</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21509"/>
		<updated>2022-01-26T23:16:22Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/won&#039;t use &#039;&#039;&#039;setup-bootable&#039;&#039;&#039;, you can manually create a customizable (writable) USB boot device instead.&lt;br /&gt;
&lt;br /&gt;
=== Copying ISO/tarball contents to a USB stick ===&lt;br /&gt;
&lt;br /&gt;
This method is written for copying files from an Alpine ISO file but also works for Alpine tarballs (.tar.gz files) with a one line tweak (see below).&lt;br /&gt;
&lt;br /&gt;
# Install some prerequisites. (If you&#039;re not currently using Alpine Linux then you probably have these installed already, otherwise you&#039;ll have to figure out how to install them.)&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;apk add syslinux}}&lt;br /&gt;
# Set the environment variable &#039;mydev&#039; to the [https://en.wikipedia.org/wiki/Device_file device file] name of the USB stick that Alpine Linux is to be installed to:&lt;br /&gt;
#: {{Warning | BE SURE TO GET THIS RIGHT OR ELSE YOU COULD OVERWRITE THE WRONG DISK! }}&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydev=/dev/sdU&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Make sure that the target drive&#039;s existing partitions, if any, are not mounted:&lt;br /&gt;
#: {{Cmd|umount -q $mydev?}}&lt;br /&gt;
# Copy and paste the following as a single command to wipe the target drive, create an MBR partition table, and create a single FAT32 partition (you can ignore any &amp;quot;Partition #1 contains a vfat signature.&amp;quot; warning message):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;fdisk -w always $mydev &amp;lt;&amp;lt;EOF&lt;br /&gt;
  o&lt;br /&gt;
  n&lt;br /&gt;
  p&lt;br /&gt;
  1&lt;br /&gt;
  2048&lt;br /&gt;
  -0&lt;br /&gt;
  t&lt;br /&gt;
  0c&lt;br /&gt;
  a&lt;br /&gt;
  w&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Format the new FAT32 partition with a FAT32 filesystem:&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdosfs -F32 ${mydev}1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Copy the [https://wiki.syslinux.org/wiki/index.php?title=Mbr syslinix executable boot code] into the MBR table (if you&#039;re not currently using Alpine Linux you may need to adjust the path to syslinux&#039;s mbr.bin file):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=$mydev&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Install the syslinux bootloader files onto the FAT32 filesystem (ignore the &amp;quot;Hidden (2048) does not match sectors (62)&amp;quot; messages - modern systems use the partition table):&lt;br /&gt;
#: {{Cmd|syslinux ${mydev}1}}&lt;br /&gt;
# Copy the Alpine files to the FAT32 filesystem (to copy the contents of an Alpine {{Path|.tar.gz}} tarball instead of copying {{Path|/media/cdrom}}, set &amp;lt;code&amp;gt;$alpinetarball&amp;lt;/code&amp;gt; to the path to the tarball and replace the &#039;cp&#039; line with: &amp;lt;code&amp;gt;tar -p -s --atime-preserve --same-owner --one-top-level=/media/$mydevname -zxvf &amp;quot;$alpinetarball&amp;quot;&amp;lt;/code&amp;gt;):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydevname=$(basename $mydev)1&lt;br /&gt;
mkdir -p /media/$mydevname&lt;br /&gt;
mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
cp -aT /media/cdrom /media/$mydevname  # -T to copy hidden files&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any apkovl files that were transfered as part of the copy process.  This should be done if you wish to have a fresh install.  Replace sdU with your device name)&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
rm /media/$mydevname/*.apkovl.tar.gz&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21508</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21508"/>
		<updated>2022-01-26T21:56:26Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Rework the &amp;quot;Copy the Alpine files to the FAT32 filesystem&amp;quot; bullet point to be simpler&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/won&#039;t use &#039;&#039;&#039;setup-bootable&#039;&#039;&#039;, you can manually create a customizable (writable) USB boot device instead.&lt;br /&gt;
&lt;br /&gt;
=== Copy ISO content to USB stick as individual files ===&lt;br /&gt;
&lt;br /&gt;
This method also works for Alpine tarballs (.tar.gz files) with a one line tweak (see below).&lt;br /&gt;
&lt;br /&gt;
# Install some prerequisites. (If you&#039;re not currently using Alpine Linux then you probably have these installed already, otherwise you&#039;ll have to figure out how to install them.)&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;apk add syslinux}}&lt;br /&gt;
# Set the environment variable &#039;mydev&#039; to the [https://en.wikipedia.org/wiki/Device_file device file] name of the USB stick that Alpine Linux is to be installed to:&lt;br /&gt;
#: {{Warning | BE SURE TO GET THIS RIGHT OR ELSE YOU COULD OVERWRITE THE WRONG DISK! }}&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydev=/dev/sdU&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Make sure that the target drive&#039;s existing partitions, if any, are not mounted:&lt;br /&gt;
#: {{Cmd|umount -q $mydev?}}&lt;br /&gt;
# Copy and paste the following as a single command to wipe the target drive, create an MBR partition table, and create a single FAT32 partition (you can ignore any &amp;quot;Partition #1 contains a vfat signature.&amp;quot; warning message):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;fdisk -w always $mydev &amp;lt;&amp;lt;EOF&lt;br /&gt;
  o&lt;br /&gt;
  n&lt;br /&gt;
  p&lt;br /&gt;
  1&lt;br /&gt;
  2048&lt;br /&gt;
  -0&lt;br /&gt;
  t&lt;br /&gt;
  0c&lt;br /&gt;
  a&lt;br /&gt;
  w&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Format the new FAT32 partition with a FAT32 filesystem:&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdosfs -F32 ${mydev}1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Copy the [https://wiki.syslinux.org/wiki/index.php?title=Mbr syslinix executable boot code] into the MBR table (if you&#039;re not currently using Alpine Linux you may need to adjust the path to syslinux&#039;s mbr.bin file):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=$mydev&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Install the syslinux bootloader files onto the FAT32 filesystem (ignore the &amp;quot;Hidden (2048) does not match sectors (62)&amp;quot; messages - modern systems use the partition table):&lt;br /&gt;
#: {{Cmd|syslinux ${mydev}1}}&lt;br /&gt;
# Copy the Alpine files to the FAT32 filesystem (to copy the contents of an Alpine {{Path|.tar.gz}} tarball instead of copying {{Path|/media/cdrom}}, set &amp;lt;code&amp;gt;$alpinetarball&amp;lt;/code&amp;gt; to the path to the tarball and replace the &#039;cp&#039; line with: &amp;lt;code&amp;gt;tar -p -s --atime-preserve --same-owner --one-top-level=/media/$mydevname -zxvf &amp;quot;$alpinetarball&amp;quot;&amp;lt;/code&amp;gt;):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydevname=$(basename $mydev)1&lt;br /&gt;
mkdir -p /media/$mydevname&lt;br /&gt;
mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
cp -aT /media/cdrom /media/$mydevname  # -T to copy hidden files&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any apkovl files that were transfered as part of the copy process.  This should be done if you wish to have a fresh install.  Replace sdU with your device name)&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
rm /media/$mydevname/*.apkovl.tar.gz&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_configuration_management_scripts&amp;diff=21507</id>
		<title>Alpine configuration management scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_configuration_management_scripts&amp;diff=21507"/>
		<updated>2022-01-26T18:14:50Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Tweak and add link to the intro text.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feature descriptions for available Alpine Linux setup scripts ({{Path|/sbin/setup-*}}).&lt;br /&gt;
&lt;br /&gt;
These scripts can be installed by using &amp;lt;code&amp;gt;apk&amp;lt;/code&amp;gt; to install the &amp;lt;code&amp;gt;alpine-conf&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have an Alpine Linux install, you can find and examine the scripts in their [https://github.com/alpinelinux/alpine-conf git repository].&lt;br /&gt;
&lt;br /&gt;
== setup-alpine ==&lt;br /&gt;
&lt;br /&gt;
This is the main Alpine configuration and installation script.&lt;br /&gt;
&lt;br /&gt;
The script interactively walks the user through executing several auxiliary &amp;lt;code&amp;gt;setup-*&amp;lt;/code&amp;gt; scripts, in the order shown below.&lt;br /&gt;
&lt;br /&gt;
The bracketed options represent example configuration choices, formatted as they may be supplied when manually calling the auxiliary setup scripts, or using a &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; &amp;quot;answerfile&amp;quot; (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;setup-keymap&amp;lt;/code&amp;gt; [us us]&lt;br /&gt;
# [[#setup-hostname|setup-hostname]] [-n alpine-test]&lt;br /&gt;
# [[#setup-interfaces|setup-interfaces]] [-i &amp;lt; interfaces-file]&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/init.d/networking --quiet start &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
# if none of the networking interfaces were configured using dhcp, then: &amp;lt;code&amp;gt;[[#setup-dns|setup-dns]]&amp;lt;/code&amp;gt; [-d example.com -n &amp;quot;192.168.0.1 [...]&amp;quot;]&lt;br /&gt;
# set the root password&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;[[#setup-timezone|setup-timezone]]&amp;lt;/code&amp;gt; [-z UTC | -z America/New_York | -p EST+5]&lt;br /&gt;
# enable the new hostname (&amp;lt;code&amp;gt;/etc/init.d/hostname --quiet restart&amp;lt;/code&amp;gt;)&lt;br /&gt;
# add &amp;lt;code&amp;gt;networking&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;urandom&amp;lt;/code&amp;gt; to the &#039;&#039;&#039;boot&#039;&#039;&#039; rc level, and &amp;lt;code&amp;gt;acpid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;crond&amp;lt;/code&amp;gt; to the &#039;&#039;&#039;default&#039;&#039;&#039; rc level, and start the &#039;&#039;&#039;boot&#039;&#039;&#039; and &#039;&#039;&#039;default&#039;&#039;&#039; rc services&lt;br /&gt;
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt;, and update {{Path|/etc/hosts}}&lt;br /&gt;
# &amp;lt;code&amp;gt;[[#setup-proxy|setup-proxy]]&amp;lt;/code&amp;gt; [-q &amp;lt;nowiki&amp;gt;&amp;quot;http://webproxy:8080&amp;quot;&amp;lt;/nowiki&amp;gt;], and activate proxy if it was configured&lt;br /&gt;
# &amp;lt;code&amp;gt;setup-apkrepos&amp;lt;/code&amp;gt; [-r (to select a mirror randomly)]&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;[[#setup-sshd|setup-sshd]]&amp;lt;/code&amp;gt; [-c openssh | dropbear | none]&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;setup-ntp&amp;lt;/code&amp;gt; [-c chrony | openntpd | busybox | none]&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;DEFAULT_DISK=none&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;-q&amp;lt;/code&amp;gt; [-m data /dev/sda] (see [[Installation#Installation_Overview]] about the disk modes)&lt;br /&gt;
# if installation mode selected during setup-disk was &amp;quot;data&amp;quot; instead of &amp;quot;sys&amp;quot;, then: &amp;lt;code&amp;gt;setup-lbu&amp;lt;/code&amp;gt; [/media/sdb1]&lt;br /&gt;
# if installation mode selected during setup-disk was &amp;quot;data&amp;quot; instead of &amp;quot;sys&amp;quot;, then: &amp;lt;code&amp;gt;setup-apkcache&amp;lt;/code&amp;gt; [/media/sdb1/cache | none]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; itself accepts the following command-line switches&lt;br /&gt;
&lt;br /&gt;
{{Define|-h|Shows the up-to-date usage help message.}}&lt;br /&gt;
&lt;br /&gt;
{{Define|-a|Create an overlay file: this creates a temporary directory and saves its location in ROOT; however, the script doesn&#039;t export this variable so I think this feature isn&#039;t currently functional.}}&lt;br /&gt;
;-c &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&lt;br /&gt;
:Create a new &amp;quot;answerfile&amp;quot;, with default choices. You can edit the file and then invoke &amp;lt;code&amp;gt;setup-alpine -f &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;-f &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&lt;br /&gt;
:Use an existing &amp;quot;answerfile&amp;quot;, which may override some or all of the interactive prompts.&lt;br /&gt;
{{Define|-q|Run in &amp;quot;quick mode&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-hostname ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-hostname&amp;lt;/code&amp;gt; [-h] [-n hostname]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-n&#039;&#039;&#039; &amp;lt;var&amp;gt;Specify hostname&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script allows quick and easy setup of the system hostname by writing it to {{Path|/etc/hostname}}.  The script prevents you from writing an invalid hostname (such as one that used invalid characters or starts with a &#039;-&#039; or is too long).&lt;br /&gt;
The script can be invoked manually or is called as part of the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-interfaces ==&lt;br /&gt;
{{Cmd|setup-interfaces [-i &amp;amp;lt; &amp;lt;var&amp;gt;interfaces-file&amp;lt;/var&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
Note that the contents of &amp;lt;var&amp;gt;interfaces-file&amp;lt;/var&amp;gt; has to be supplied as stdin, rather than naming the file as an additional argument. The contents should have the format of {{Path|/etc/network/interfaces}}, such as:&lt;br /&gt;
&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 &lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet dhcp&lt;br /&gt;
     hostname alpine-test&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-dns ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-dns&amp;lt;/code&amp;gt; [-h] [-d domain name] [-n name server]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-d&#039;&#039;&#039; &amp;lt;var&amp;gt;specify search domain name&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-n&#039;&#039;&#039; &amp;lt;var&amp;gt;name server IP&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The setup-dns script is stored in {{Path|/sbin/setup-dns}} and allows quick and simple setup of DNS servers (and a DNS search domain if required).  Simply running &amp;lt;code&amp;gt;setup-dns&amp;lt;/code&amp;gt; will allow interactive use of the script, or the options can be specified.&lt;br /&gt;
&lt;br /&gt;
The information fed to this script is written to {{Path|/etc/resolv.conf}}&lt;br /&gt;
&lt;br /&gt;
Example usage (with 192.168.0.1 being the local router/dns-forwarder): {{Cmd|setup-dns -d example.org -n 192.168.0.1}}&lt;br /&gt;
&lt;br /&gt;
Example {{Path|/etc/resolv.conf}}:&lt;br /&gt;
&lt;br /&gt;
 search example.org&lt;br /&gt;
 nameserver 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
It can be run manually but is also invoked in the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script unless interfaces are configured for DHCP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-timezone ==&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-timezone&amp;lt;/code&amp;gt; [-z UTC | -z America/New_York | -p EST+5]&lt;br /&gt;
&lt;br /&gt;
Can pre-select the timezone using either of these switches:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-z&#039;&#039;&#039; &amp;lt;var&amp;gt;subfolder of&amp;lt;/var&amp;gt; {{Path|/usr/share/zoneinfo}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-p&#039;&#039;&#039; &amp;lt;var&amp;gt;POSIX TZ format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-proxy ==&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-proxy&amp;lt;/code&amp;gt; [-hq] [PROXYURL]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-q&#039;&#039;&#039; &amp;lt;var&amp;gt;Quiet mode&amp;lt;/var&amp;gt; prevents changes from taking effect until after reboot&lt;br /&gt;
&lt;br /&gt;
This script requests the system proxy to use in the form &amp;lt;code&amp;gt;http://&amp;lt;proxyurl&amp;gt;:&amp;lt;port&amp;gt;&amp;lt;/code&amp;gt; for example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://10.0.0.1:8080&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set no system proxy use &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;.&lt;br /&gt;
This script exports the following environmental variables: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;http_proxy=$proxyurl&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;https_proxy=$proxyurl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ftp_proxy=$proxyurl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;$proxyurl&amp;lt;/code&amp;gt; is the value input.  &lt;br /&gt;
If &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt; was chosen then the value it is set to a blank value (and so no proxy is used).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-apkrepos ==&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-apkrepos&amp;lt;/code&amp;gt; [-fhr] [REPO...]&lt;br /&gt;
&lt;br /&gt;
Setup &amp;lt;code&amp;gt;apk&amp;lt;/code&amp;gt; repositories.&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-f&#039;&#039;&#039;  &amp;lt;var&amp;gt;Detect and add fastest mirror&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-r&#039;&#039;&#039;  &amp;lt;var&amp;gt;Add a random mirror and do not prompt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-1&#039;&#039;&#039;  &amp;lt;var&amp;gt;Add first mirror on the list (normally a CDN)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is run as part of the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-sshd ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-sshd&amp;lt;/code&amp;gt; [-h] [-c choice of SSH daemon]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-c&#039;&#039;&#039; &amp;lt;var&amp;gt;SSH daemon&amp;lt;/var&amp;gt; where SSH daemon can be one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;openssh&amp;lt;/code&amp;gt; install the {{Pkg|openSSH}} daemon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dropbear&amp;lt;/code&amp;gt; install the {{Pkg|dropbear}} daemon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt; Do not install an SSH daemon&lt;br /&gt;
&lt;br /&gt;
Example usage: {{Cmd|setup-sshd -c dropbear}}&lt;br /&gt;
&lt;br /&gt;
The setup-sshd script is stored in {{Path|/sbin/setup-sshd}} and allows quick and simple setup of either the OpenSSH or Dropbear SSH daemon &amp;amp; client. &lt;br /&gt;
It can be run manually but is also invoked in the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-ntp ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From [https://en.wikipedia.org/wiki/Network_Time_Protocol Wikipedia]&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Network Time Protocol (NTP)&#039;&#039;&#039; is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|usage: setup-ntp [-h] [-c choice of NTP daemon]&lt;br /&gt;
&lt;br /&gt;
Setup NTP time synchronization&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -c  Choice of NTP daemon: busybox openntpd chrony none}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;setup-ntp&amp;lt;/code&amp;gt; script is stored in {{Path|/sbin/setup-ntp}} and allows quick and simple setup of the NTP client,&lt;br /&gt;
It can be run manually but is also invoked in the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-disk ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;DEFAULT_DISK=none setup-disk -q&amp;lt;/code&amp;gt; [-m data | sys] [&amp;lt;var&amp;gt;mountpoint directory&amp;lt;/var&amp;gt; | /dev/sda ...]&lt;br /&gt;
&lt;br /&gt;
In &amp;quot;sys&amp;quot; mode, it&#039;s an installer, it permanently installs Alpine on the disk, in &amp;quot;data&amp;quot; mode, it provides a larger and persistent /var volume.&lt;br /&gt;
&lt;br /&gt;
This script accepts the following command-line switches:&lt;br /&gt;
&lt;br /&gt;
;-k &amp;lt;var&amp;gt;kernel flavor&amp;lt;/var&amp;gt;&lt;br /&gt;
;-o &amp;lt;var&amp;gt;apkovl file&amp;lt;/var&amp;gt;&lt;br /&gt;
:Restore system from &amp;lt;var&amp;gt;apkovl file&amp;lt;/var&amp;gt;&lt;br /&gt;
;-m data | sys&lt;br /&gt;
:Don&#039;t prompt for installation mode. With &#039;&#039;&#039;-m data&#039;&#039;&#039;, the supplied devices are formatted to use as a {{Path|/var}} volume.&lt;br /&gt;
{{Define|-r|Use RAID1 with a single disk (degraded mode)}}&lt;br /&gt;
{{Define|-L|Create and use volumes in a LVM group}}&lt;br /&gt;
;-s &amp;lt;var&amp;gt;swap size in MB&amp;lt;/var&amp;gt;&lt;br /&gt;
:Use 0 to disable swap&lt;br /&gt;
{{Define|-q|Exit quietly if no disks are found}}&lt;br /&gt;
{{Define|-v|Verbose mode}}&lt;br /&gt;
&lt;br /&gt;
The script also honors the following environment variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;BOOT_SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
:Size of the boot partition in MB; defaults to 100. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SWAP_SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
:Size of the swap volume in MB; set to 0 to disable swap. If not specified, will default to twice RAM, up to 4096, but won&#039;t be more than 1/3 the size of the smallest disk, and if less than 64 will just be 0. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ROOTFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the / volume; defaults to ext4. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 [[Btrfs|btrfs]] xfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;BOOTFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the /boot volume; defaults to ext4. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 [[Btrfs|btrfs]] xfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VARFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the /var volume; defaults to ext4. Only used if &#039;&#039;&#039;-m data&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 [[Btrfs|btrfs]] xfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SYSROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
:Mountpoint to use when creating volumes and doing traditional disk install (&#039;&#039;&#039;-m sys&#039;&#039;&#039;). Defaults to {{Path|/mnt}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
:Path of MBR binary code, defaults to {{Path|/usr/share/syslinux/mbr.bin}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;BOOTLOADER&amp;lt;/code&amp;gt;&lt;br /&gt;
:Bootloader to use, defaults to syslinux. Supported bootloaders are: grub syslinux zipl.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DISKLABEL&amp;lt;/code&amp;gt;&lt;br /&gt;
:Disklabel to use, defaults to dos. Supported disklabels are: dos gpt eckd.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Writes to /tmp/ovlfiles, /tmp/alpine-install-diskmode.out, and /tmp/sfdisk.out but that never seems to be used elsewhere. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Partitioning ===&lt;br /&gt;
&lt;br /&gt;
If you have complex partitioning needs, that go beyond above alpine-disk options, you can partition, format, and mount your volumes manually, and then just supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;. Doing so implicitly behaves as though &#039;&#039;&#039;-m sys&#039;&#039;&#039; had also been specified.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RAID ====&lt;br /&gt;
&amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; will automatically build a RAID array if you supply the &#039;&#039;&#039;-r&#039;&#039;&#039; switch, or if you specify more than one device. The array will always be [https://en.m.wikipedia.org/wiki/Standard_RAID_levels#RAID_1 RAID1] (and [https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#The_version-0.90_Superblock_Format --metadata=0.90]) for the /boot volumes, but will be [https://en.m.wikipedia.org/wiki/Standard_RAID_levels#RAID_5 RAID5] (and [https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#The_version-1_Superblock_Format --metadata=1.2] for non-boot volumes when 3 or more devices are supplied.&lt;br /&gt;
&lt;br /&gt;
If you instead want to build your RAID array manually, see [[Setting up a software RAID array]]. Then format and mount the disks, and supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== LVM ====&lt;br /&gt;
&amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; will automatically build and use volumes in a LVM group if you supply the &#039;&#039;&#039;-L&#039;&#039;&#039; switch. The group and volumes created by the script will have the following names:&lt;br /&gt;
&lt;br /&gt;
* volume group: &#039;&#039;&#039;vg0&#039;&#039;&#039;&lt;br /&gt;
* swap volume: &#039;&#039;&#039;lv_swap&#039;&#039;&#039; (only created when swap size &amp;gt; 0)&lt;br /&gt;
* root volume: &#039;&#039;&#039;lv_root&#039;&#039;&#039; (only created when &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected)&lt;br /&gt;
* var volume: &#039;&#039;&#039;lv_var&#039;&#039;&#039; (only created when &#039;&#039;&#039;-m data&#039;&#039;&#039; is specified or interactively selected)&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;lv_var&#039;&#039;&#039; or &#039;&#039;&#039;lv_root&#039;&#039;&#039; volumes are created to occupy all remaining space in the volume group.&lt;br /&gt;
&lt;br /&gt;
If you need to change any of these settings, you can use &amp;lt;code&amp;gt;vgrename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;lvrename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;lvreduce&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;lvresize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you instead want to build your LVM system manually, see [[Setting up Logical Volumes with LVM]]. Then format and mount the disks, and supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=Setup-Disk Usage=&lt;br /&gt;
&lt;br /&gt;
usage: setup-disk [-hqr] [-k kernelflavor] [-m MODE] [-o apkovl] [-s SWAPSIZE]&lt;br /&gt;
		  [MOUNTPOINT | DISKDEV...]&lt;br /&gt;
&lt;br /&gt;
Install alpine on harddisk.&lt;br /&gt;
&lt;br /&gt;
If MOUNTPOINT is specified, then do a traditional disk install with MOUNTPOINT&lt;br /&gt;
as root.&lt;br /&gt;
&lt;br /&gt;
If DISKDEV is specified, then use the specified disk(s) without asking. If&lt;br /&gt;
multiple disks are specified then set them up in a RAID array. If there are&lt;br /&gt;
mode than 2 disks, then use raid level 5 instead of raid level 1.&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -m  Use disk for MODE without asking, where MODE is either &#039;data&#039; or &#039;root&#039;&lt;br /&gt;
 -o  Restore system from given apkovl file&lt;br /&gt;
 -k  Use kernelflavor instead of $KERNEL_FLAVOR&lt;br /&gt;
 -L  Use LVM to manage partitions&lt;br /&gt;
 -q  Exit quietly if no disks are found&lt;br /&gt;
 -r  Enable software RAID1 with single disk&lt;br /&gt;
 -s  Use SWAPSIZE MB instead of $SWAP_SIZE MB for swap (Use 0 to disable swap)&lt;br /&gt;
 -v  Be more verbose about what is happening&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disk Install Styles==&lt;br /&gt;
&lt;br /&gt;
You can select between &#039;sys&#039; or &#039;data&#039;.&lt;br /&gt;
&lt;br /&gt;
sys:&lt;br /&gt;
  This mode is a traditional disk install. The following partitions will be&lt;br /&gt;
  created on the disk: /boot, / (filesystem root) and swap.&lt;br /&gt;
    &lt;br /&gt;
  This mode may be used for development boxes, desktops, virtual servers, etc.&lt;br /&gt;
&lt;br /&gt;
data:&lt;br /&gt;
  This mode uses your disk(s) for data storage, not for the operating system.&lt;br /&gt;
  The system itself will run from tmpfs (RAM).&lt;br /&gt;
&lt;br /&gt;
  Use this mode if you only want to use the disk(s) for a mailspool, databases,&lt;br /&gt;
  logs, etc.&lt;br /&gt;
&lt;br /&gt;
none:&lt;br /&gt;
  Run without installing to disk.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-lbu ==&lt;br /&gt;
&lt;br /&gt;
This script will only be invoked for by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; when installing &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; installation types (ramdisk)&lt;br /&gt;
&lt;br /&gt;
It configures where &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; will store the .apkovl backup. See [[Alpine local backup]] for more information.&lt;br /&gt;
&lt;br /&gt;
When started, &amp;lt;code&amp;gt;setup-lbu&amp;lt;/code&amp;gt; will prompt where to store your data. The options it will prompt for will be taken from the directories found in &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; (except for &amp;lt;code&amp;gt;cdrom&amp;lt;/code&amp;gt;). [not sure how these are mounted: are they automatically mounted by setup-lbu? Does the user have to manually mount using another tty?]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-apkcache ==&lt;br /&gt;
&lt;br /&gt;
This script will only be invoked for by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; when installing &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; installation types (ramdisk)&lt;br /&gt;
&lt;br /&gt;
It configures where to save the apk package files. The apkcache is where apk stores downloaded packages, such that the system does not need to download them again on each reboot, and doesn&#039;t have to depend on the network. See [[Local APK cache]] for a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
You should be able to use a partition that you set up in the previous steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-bootable ==&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
It allows to create boot media that boots the system running from RAM memory (diskless) like the installation images, but using a writable (i.e. not iso9660) filesystem. So that it can also serve to store local customizations (e.g. apkovl files and cached packages). &lt;br /&gt;
&lt;br /&gt;
First, the script copies files from an ISO image (as file on a CD/DVD/USB etc.) onto a USB-Stick/CompactFlash/SDCard etc., or harddisk partition. And then, it installs the syslinux bootloader to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
However, its current syslinux installation seems to fail on non-FAT32 partitions. So in these cases, you may start over with a FAT32 filesystem, or rather with the desired filesystem and using &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; only with the &amp;lt;code&amp;gt;-u&amp;lt;/code&amp;gt; option, to skip the syslinux install, and then refer to the [[Create_a_Bootable_Device#Manually_copying_Alpine_files|manual method]] to fix the problem, or use one of the other bootloader options, instead.&lt;br /&gt;
&lt;br /&gt;
{{Tip| The [[Bootloaders]] page shows different ways to setup booting, and multi-boot menus!}}  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The setup-bootable script accepts the following arguments and command-line switches (you can run &amp;lt;code&amp;gt;setup-bootable -h&amp;lt;/code&amp;gt; to see a usage message).&lt;br /&gt;
&lt;br /&gt;
{{Cmd|setup-bootable &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
The argument &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; can be a directory or an ISO (will be mounted to &amp;lt;code&amp;gt;MNT&amp;lt;/code&amp;gt; or {{Path|/mnt}}) or a URL (will be downloaded with &amp;lt;code&amp;gt;WGET&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;). The argument &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; can be a directory mountpoint, or will default to {{Path|/media/usb}} if not supplied.&lt;br /&gt;
&lt;br /&gt;
{{Define|-k|Keep alpine_dev in {{Path|syslinux.cfg}}; otherwise, replace with UUID.}}&lt;br /&gt;
{{Define|-u|Upgrade mode: keep existing {{Path|syslinux.cfg}} and don&#039;t run &amp;lt;code&amp;gt;syslinux&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Define|-f|Overwrite {{Path|syslinux.cfg}} even if &#039;&#039;&#039;-u&#039;&#039;&#039; was specified.}}&lt;br /&gt;
{{Define|-s|Force the running of &amp;lt;code&amp;gt;syslinux&amp;lt;/code&amp;gt; even if &#039;&#039;&#039;-u&#039;&#039;&#039; was specified.}}&lt;br /&gt;
{{Define|-v|Verbose mode}}&lt;br /&gt;
&lt;br /&gt;
The script will ensure that &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; are available; will copy the contents of &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt;, ensuring first that there&#039;s enough space; and unless &#039;&#039;&#039;-u&#039;&#039;&#039; was specified, will make &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; bootable.&lt;br /&gt;
&lt;br /&gt;
Suppose the target device is /dev/sdXY, then this partition can be prepared for booting with&lt;br /&gt;
{{Cmd|# setup-bootable -v /media/&amp;lt;installation-media-device&amp;gt; /dev/sdXY&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For the manual way to set up boot media see [[Create_a_Bootable_Device#Manually_copying_Alpine_files|Manually_copying_Alpine_files]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-xorg-base ==&lt;br /&gt;
&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
It configures a graphical environment, installing basic Xorg packages and udev (replacing mdev), and is also required for Wayland sessions.&lt;br /&gt;
&lt;br /&gt;
The script installs, among other packages, e.g.: &amp;lt;code&amp;gt;xorg-server xf86-input-libinput xinit udev&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Additional packages to install may be supplied as arguments.&lt;br /&gt;
{{cmd|setup-xorg-base [additional package(s) to install]}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Video packages (optional) ====&lt;br /&gt;
&lt;br /&gt;
You may install specific xf86 xorg driver packages for your video card&#039;s chipset, as they may support specific features, effects and acceleration modes, and avoid error messages during X initialization.&lt;br /&gt;
&lt;br /&gt;
However, the most basic X features should work fine with just using the default kernel video-modesetting drivers.&lt;br /&gt;
&lt;br /&gt;
Info about the particular video cards that are installed in the computer may be found in the list of PCI devices:&lt;br /&gt;
{{cmd|# apk add pciutils&lt;br /&gt;
$ lspci}}&lt;br /&gt;
&lt;br /&gt;
To see available video driver packages run:&lt;br /&gt;
{{cmd|$ apk search xf86-video}}&lt;br /&gt;
&lt;br /&gt;
For example, &lt;br /&gt;
* For an Sis video chipset install &#039;xf86-video-sis&#039;.&lt;br /&gt;
{{Cmd|# apk add xf86-video-sis}}&lt;br /&gt;
&lt;br /&gt;
Others:&lt;br /&gt;
* For Intel video chipsets install &#039;xf86-video-intel&#039; and see [[Intel Video]].&lt;br /&gt;
{{Tip|In some cases, freezes on suspend/resume stop happening when changing the video port the monitor is connected to.}}&lt;br /&gt;
* For AMD Radeon Video see [[Radeon_Video]]&lt;br /&gt;
* For Alix1D use xf86-video-geode.&lt;br /&gt;
* In KVM/QEMU guests see [[QEMU#Using_Xorg_inside_Qemu|Xorg within KVM/QEMU]]&lt;br /&gt;
* In VirtualBox guests use xf86-video-vboxvideo, and install the [[VirtualBox_guest_additions|VirtualBox guest additions]] as well. They contain important parts for the driver.&lt;br /&gt;
* In VMware guests use xf86-video-vmware&lt;br /&gt;
* In Hyper-V guests use xf86-video-fbdev and install the [[Hyper-V_guest_services|Hyper-V guest services]] as well.&lt;br /&gt;
&lt;br /&gt;
==== Input packages ====&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;b&amp;gt;Numlock&amp;lt;/b&amp;gt; settings are not working, or getting &amp;lt;b&amp;gt;&#039;setleds not found&#039;&amp;lt;/b&amp;gt; errors:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add kbd}}&lt;br /&gt;
&lt;br /&gt;
If some input device is not working at all, the available xf86-input drivers can be listed with:&lt;br /&gt;
{{cmd|$ apk search xf86-input}}&lt;br /&gt;
&lt;br /&gt;
Typical legacy drivers:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add xf86-input-mouse xf86-input-keyboard}}&lt;br /&gt;
&lt;br /&gt;
And for touchpad tapping support on many laptops, also:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add xf86-input-synaptics}}&lt;br /&gt;
&lt;br /&gt;
==== Configure xorg-server (optional) ====&lt;br /&gt;
&lt;br /&gt;
On most systems, xorg should be able to autodetect all devices. However you can still configure xorg-server by hand by launching:&lt;br /&gt;
{{Cmd|# Xorg -configure}}&lt;br /&gt;
This will create a `/root/xorg.conf.new` file. You can modify this file to fit your needs.&amp;lt;BR&amp;gt;&lt;br /&gt;
(When finished modifying and testing the above configuration file, move it to `/etc/X11/xorg.conf` for normal usage.)&lt;br /&gt;
&lt;br /&gt;
==== Keyboard Layout (optional) ====&lt;br /&gt;
&lt;br /&gt;
If you use a keyboard layout different than &amp;quot;us&amp;quot;, and you are using a window manager or desktop environment that does not support to configure the keyboard layout itself, then you need to&lt;br /&gt;
&lt;br /&gt;
* [[Enable_Community_Repository#Using_community_repositories|Enable the &amp;quot;community&amp;quot; repository]]&lt;br /&gt;
&lt;br /&gt;
and install setxkbmap:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add setxkbmap}}&lt;br /&gt;
&lt;br /&gt;
Then try&lt;br /&gt;
 # setxkbmap &amp;lt;%a language layout from /usr/share/X11/xkb/rules/xorg.lst%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to make it persistent add this section to /etc/X11/xorg.conf:&lt;br /&gt;
{{Cmd|Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
	Identifier	&amp;quot;Keyboard Default&amp;quot;&lt;br /&gt;
	MatchIsKeyboard	&amp;quot;yes&amp;quot;&lt;br /&gt;
	Option		&amp;quot;XkbLayout&amp;quot; &amp;quot;&amp;lt;%a language layout from /usr/share/X11/xkb/rules/xorg.lst%&amp;gt;&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another way to change the keymap when logging into X is to use ~/.xinitrc.  The following example loads a British keymap, simply add this line to the beginning of the file:&lt;br /&gt;
&amp;lt;code&amp;gt;setxkbmap gb &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you need to create the ~/.xinitrc file, you may also want to add a second line like &amp;lt;code&amp;gt;exec openbox-session&amp;lt;/code&amp;gt; to still start the window manager with &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;xinit&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation needed ==&lt;br /&gt;
&lt;br /&gt;
=== setup-xen-dom0 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== setup-mta ===&lt;br /&gt;
Uses ssmtp.&lt;br /&gt;
&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== setup-acf ===&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
This script was named &amp;lt;code&amp;gt;setup-webconf&amp;lt;/code&amp;gt; before Alpine 1.9 beta 4.&lt;br /&gt;
&lt;br /&gt;
See [[:Category:ACF|ACF pages]] for more information.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
* [[Post installation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=21506</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=21506"/>
		<updated>2022-01-26T16:30:01Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Update the link to the instructions on creating a bootable device and remove duplicated bullet points.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning | 11 Feb 2021 - There is currently a known bug upstream &amp;lt;br /&amp;gt;[https://github.com/raspberrypi/firmware/issues/1529 kernel/initramfs cannot be loaded from subdirectory with same name as volume label] }}&lt;br /&gt;
&lt;br /&gt;
{{TOC right}}&lt;br /&gt;
&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;
# [http://alpinelinux.org/downloads/ Download] the Alpine for Raspberry Pi tarball. You should be safe using the &#039;&#039;&#039;armhf&#039;&#039;&#039; 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 &#039;&#039;&#039;armv7&#039;&#039;&#039; build is compatible with Raspberry Pi 2 Model B. The &#039;&#039;&#039;aarch64&#039;&#039;&#039; build should be compatible with Raspberry Pi 2 Model v1.2, Raspberry Pi 3 and Compute Module 3, and Raspberry Pi 4 model B.&lt;br /&gt;
# [[Create_a_Bootable_Device#Manually_copying_Alpine_files|Create a bootable FAT32 partition on your SD card.]] The partitioning and formatting part of the instructions on the linked page could be done using a graphical partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks], just make sure the partition type is &amp;lt;code&amp;gt;W95 FAT32 (LBA)&amp;lt;/code&amp;gt;. (The current type can be found in the &amp;quot;Type&amp;quot; column in the output of &amp;lt;code&amp;gt;fdisk -l&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Optionally create a &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039; file on the partition to configure low-level system settings. Specifications can be found [https://www.raspberrypi.org/documentation/configuration/config-txt here]. However, note some settings can only be set directly in &#039;&#039;&#039;config.txt&#039;&#039;&#039;, which may be overwritten after updates. In particular, &amp;lt;code&amp;gt;gpu_mem&amp;lt;/code&amp;gt; will have no effect when specified in &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039; ([https://github.com/raspberrypi/firmware/issues/1332 source]). Some interesting values include:&lt;br /&gt;
* To enable audio: &amp;lt;code&amp;gt;dtparam=audio=on&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you see black edges around your screen after booting the Pi, you can add &amp;lt;code&amp;gt;disable_overscan=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recent versions include Broadcom firmware files. If you&#039;re using an older Alpine version, see [[#Wireless_support_with_older_Alpine_images|section below]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed in [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.&lt;br /&gt;
&lt;br /&gt;
For users who will be using their Raspberry Pi in scenarios where there is not expected to be significant changes to disk after setup (like running a static HTTP server), this is likely preferable, as running the entire system from memory will improve performance (by avoiding the slow SD card) and improve the SD card life (by reducing the writes to the card, as all logging will happen in RAM). Diskless installations still allow you to install packages, save local files, and tune the system to your needs. &lt;br /&gt;
&lt;br /&gt;
However, if you:&lt;br /&gt;
* Expect there will be constant changes to the disk after initial setup (for example, if you expect people to login and save files to their home directories)&lt;br /&gt;
* Need logs to persist after reboot&lt;br /&gt;
* Plan to install packages which consume more space than can be loaded into RAM&lt;br /&gt;
* Want to install kernel modules (such as ZFS or Wireguard)&lt;br /&gt;
&lt;br /&gt;
Then you may be better served by a [[Classic install or sys mode on Raspberry Pi|sys-mode installation]]. &lt;br /&gt;
&lt;br /&gt;
Follow these steps to install Alpine Linux in Diskless Mode:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD card into the Raspberry Pi and power 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 -d&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;
After installation, make sure 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 -d}}&lt;br /&gt;
&lt;br /&gt;
Note: this does not upgrade the kernel. In order to upgrade the kernel, a full upgrade of the Alpine Linux version must be performed as described in [[Upgrading Alpine#Upgrading Alpine Linux on other removable media (such as CF/USB)|upgrading Alpine Linux for removable media]].&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, thus 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 the Raspberry Pi does not have a clock, 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 you have a&lt;br /&gt;
NTP daemon installed and running.  If you are not sure, you can install an 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;
The 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 -d&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
After reboot, make sure 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;
=== WiFi on boot ===&lt;br /&gt;
If you have already [[Connecting_to_a_wireless_access_point|configured WiFi]] during the setup, the connection will not return on reboot.&lt;br /&gt;
You will need to start up a service to automatically connect to the wireless access point.&lt;br /&gt;
# Run &amp;lt;code&amp;gt;rc-update add wpa_supplicant boot&amp;lt;/code&amp;gt; to connect to the wireless access point during bootup.&lt;br /&gt;
# Run it manually with &amp;lt;code&amp;gt;/etc/init.d/wpa_supplicant start&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Enable OpenGL (Raspberry Pi 3/4) ===&lt;br /&gt;
Remount the boot partition writeable (i.e. &amp;lt;code&amp;gt;/media/mmcblk0p1&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{{cmd|mount /media/mmcblk0p1 -o rw,remount}}&lt;br /&gt;
&lt;br /&gt;
Add the following lines to &amp;lt;code&amp;gt;/media/mmcblk0p1/config.txt&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 gpu_mem=128&lt;br /&gt;
 # Raspberry Pi 3:&lt;br /&gt;
 dtoverlay=vc4-kms-v3d&lt;br /&gt;
 # Raspberry Pi 4:&lt;br /&gt;
 dtoverlay=vc4-fkms-v3d&lt;br /&gt;
&lt;br /&gt;
256MB (and more on the Raspberry Pi 4) &amp;lt;code&amp;gt;gpu_mem&amp;lt;/code&amp;gt; is also possible.&lt;br /&gt;
&lt;br /&gt;
Install the Mesa drivers:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# Raspberry Pi 3:&lt;br /&gt;
apk add mesa-dri-vc4&lt;br /&gt;
# Raspberry Pi 4:&lt;br /&gt;
apk add mesa-dri-gallium&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Then reboot:&lt;br /&gt;
&lt;br /&gt;
{{cmd|lbu_commit -d; reboot}}&lt;br /&gt;
&lt;br /&gt;
=== WiFi drivers ===&lt;br /&gt;
As of Alpine 3.14, the WiFi drivers for the Raspberry Pi were moved from &amp;lt;code&amp;gt;linux-firmware-brcm&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;linux-firmware-cypress&amp;lt;/code&amp;gt; package (source?). Since the images seem to be an outdated version of the former, Wi-Fi will work during installation, but after the first update it will break.&lt;br /&gt;
Use the ethernet interface to download the required packages:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add linux-firmware-cypress}}&lt;br /&gt;
&lt;br /&gt;
And reboot.&lt;br /&gt;
&lt;br /&gt;
== Persistent storage ==&lt;br /&gt;
=== Loopback image with overlayfs ===&lt;br /&gt;
&lt;br /&gt;
When you install Alpine in diskless mode, the entire system is loaded into memory at boot. If you want additional storage (for example, if you need more space than offered by your RAM) we need to create loop-back storage onto the SD card 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 using the /usr directory here, but you can use /home or anything else. &lt;br /&gt;
{{Warning|Overlay workdir needs to be an empty directory on the same filesystem mount as the upper directory. So each overlay must use its own workdir.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{cmd|mkdir /media/persist/usr &lt;br /&gt;
mkdir /media/persist/.work_usr &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_usr 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_usr 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 -d}}&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, not to the persistent 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 -d`.&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 be sure to check everything you need is in that directory and not in folders you have not made persistent.&lt;br /&gt;
&lt;br /&gt;
=== Traditional disk-based (sys) installation ===&lt;br /&gt;
{{Merge|Classic install or sys mode on Raspberry Pi|There&#039;s an existing page for sys-installations on RasPi.}}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Split your SD card into two partitions: the FAT32 boot partition described above (in this example it&#039;ll be &amp;lt;code&amp;gt;mmcblk0p1&amp;lt;/code&amp;gt;) , and a second partition to hold the root filesystem (here it&#039;ll be &amp;lt;code&amp;gt;mmcblk0p2&amp;lt;/code&amp;gt;). Boot and configure your diskless system as above, then create a root filesystem:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add e2fsprogs&lt;br /&gt;
mkfs.ext4 /dev/mmcblk0p2}}&lt;br /&gt;
&lt;br /&gt;
Now do a disk install via a mountpoint. The &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; script will give some errors about syslinux/extlinux, but you can ignore them.&lt;br /&gt;
The Raspberry Pi doesn&#039;t need them to boot.&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mkdir /stage&lt;br /&gt;
mount /dev/mmcblk0p2 /stage&lt;br /&gt;
setup-disk -o /media/mmcblk0p1/MYHOSTNAME.apkovl.tar.gz /stage&lt;br /&gt;
# (ignore errors about syslinux/extlinux)&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Add a line to &amp;lt;code&amp;gt;/stage/etc/fstab&amp;lt;/code&amp;gt; to mount the Pi&#039;s boot partition again:&lt;br /&gt;
&lt;br /&gt;
{{cmd|/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0}}&lt;br /&gt;
&lt;br /&gt;
Now add a &amp;lt;code&amp;gt;root=/dev/mmcblk0p2&amp;lt;/code&amp;gt; parameter to the Pi&#039;s boot command line, either &amp;lt;code&amp;gt;cmdline-rpi2.txt&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;cmdline-rpi.txt&amp;lt;/code&amp;gt; depending on model:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mount -o remount,rw /media/mmcblk0p1&lt;br /&gt;
sed -i &#039;$ s/$/ root=\/dev\/mmcblk0p2/&#039; /media/mmcblk0p1/cmdline-rpi2.txt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You might also consider &amp;lt;code&amp;gt;overlaytmpfs=yes&amp;lt;/code&amp;gt; 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 at shutdown.&lt;br /&gt;
&lt;br /&gt;
N.B. &amp;lt;b&amp;gt;the contents of /boot will be ignored when the Pi boots&amp;lt;/b&amp;gt;. 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, in which case,&lt;br /&gt;
copying the files to boot partition manually, is not needed.&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;echo /media/mmcblk0p1/boot /boot none defaults,bind 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Persistent Installation on Raspberry Pi 3 ===&lt;br /&gt;
See [[Classic install or sys mode on Raspberry Pi]] and https://web.archive.org/web/20171125115835/https://forum.alpinelinux.org/comment/1084#comment-1084&lt;br /&gt;
&lt;br /&gt;
=== Persistent Installation on Raspberry Pi 4 ===&lt;br /&gt;
As of 3.14, setup-alpine should ask you if you want to create a sys mode partition on your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Long boot time when running headless ===&lt;br /&gt;
&lt;br /&gt;
If no peripherals are connected, the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.&lt;br /&gt;
&lt;br /&gt;
If this is the case, simply plugging in any USB device should work around this issue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternatively&#039;&#039;&#039;, installing haveged, the random numbers generator, would speed up the process: &lt;br /&gt;
&lt;br /&gt;
  apk update &lt;br /&gt;
  apk add haveged&lt;br /&gt;
  rc-update add haveged boot&lt;br /&gt;
  lbu commit -d&lt;br /&gt;
  service haveged start&lt;br /&gt;
&lt;br /&gt;
(Tested on a raspberry pi zero W in headless mode, no USB connected, Alpine 3.10.3)&lt;br /&gt;
&lt;br /&gt;
=== apk indicating &#039;No space left on device&#039; ===&lt;br /&gt;
&lt;br /&gt;
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&#039;s important to keep this limitation in mind when using these boards.&lt;br /&gt;
&lt;br /&gt;
=== Wireless support with older Alpine images ===&lt;br /&gt;
&lt;br /&gt;
If you need Wi-Fi, you&#039;ll need to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card.&lt;br /&gt;
(Replace /mnt/sdcard with the correct mount point.)&lt;br /&gt;
&lt;br /&gt;
  git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git&lt;br /&gt;
  cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi]] - a variant.&lt;br /&gt;
* [[Raspberry Pi - Headless Installation]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi]]&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;br /&gt;
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]&lt;br /&gt;
* [[Tutorials and Howtos#Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category: Raspberry]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21505</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21505"/>
		<updated>2022-01-26T16:22:46Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Fill in lots of missing information from the manual method so it actually works (testing by installing alpine-rpi-3.15.0-aarch64.tar.gz to a Raspberry Pi 4)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/won&#039;t use &#039;&#039;&#039;setup-bootable&#039;&#039;&#039;, you can manually create a customizable (writable) USB boot device instead.&lt;br /&gt;
&lt;br /&gt;
=== Copy ISO content to USB stick as individual files ===&lt;br /&gt;
&lt;br /&gt;
This method also works for Alpine tarballs (.tar.gz files) with a one line tweak (see below).&lt;br /&gt;
&lt;br /&gt;
# Install some prerequisites. (If you&#039;re not currently using Alpine Linux then you probably have these installed already, otherwise you&#039;ll have to figure out how to install them.)&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;apk add syslinux}}&lt;br /&gt;
# Set the environment variable &#039;mydev&#039; to the [https://en.wikipedia.org/wiki/Device_file device file] name of the USB stick that Alpine Linux is to be installed to:&lt;br /&gt;
#: {{Warning | BE SURE TO GET THIS RIGHT OR ELSE YOU COULD OVERWRITE THE WRONG DISK! }}&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydev=/dev/sdU&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Make sure that the target drive&#039;s existing partitions, if any, are not mounted:&lt;br /&gt;
#: {{Cmd|umount -q $mydev?}}&lt;br /&gt;
# Copy and paste the following as a single command to wipe the target drive, create an MBR partition table, and create a single FAT32 partition (you can ignore any &amp;quot;Partition #1 contains a vfat signature.&amp;quot; warning message):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;fdisk -w always $mydev &amp;lt;&amp;lt;EOF&lt;br /&gt;
  o&lt;br /&gt;
  n&lt;br /&gt;
  p&lt;br /&gt;
  1&lt;br /&gt;
  2048&lt;br /&gt;
  -0&lt;br /&gt;
  t&lt;br /&gt;
  0c&lt;br /&gt;
  a&lt;br /&gt;
  w&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Format the new FAT32 partition with a FAT32 filesystem:&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdosfs -F32 ${mydev}1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Copy the [https://wiki.syslinux.org/wiki/index.php?title=Mbr syslinix executable boot code] into the MBR table (if you&#039;re not currently using Alpine Linux you may need to adjust the path to syslinux&#039;s mbr.bin file):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=$mydev&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Install the syslinux bootloader files onto the FAT32 filesystem (ignore the &amp;quot;Hidden (2048) does not match sectors (62)&amp;quot; messages - modern systems use the partition table):&lt;br /&gt;
#: {{Cmd|syslinux ${mydev}1}}&lt;br /&gt;
# Copy the Alpine files to the FAT32 filesystem (if you&#039;re installing files from a .tar.gz archive, first extract the contents of the archive to an empty directory, then in the following replace &amp;quot;/media/cdrom&amp;quot; with the path to that directory):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mydevname=$(basename $mydev)1&lt;br /&gt;
mkdir -p /media/$mydevname&lt;br /&gt;
mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
# If copying from /media/cdrom, use:&lt;br /&gt;
( cd /media/cdrom &amp;amp;&amp;amp; cp -a .alpine-release * /media/$mydevname )&lt;br /&gt;
# otherwise, if copying from an alpine .tar.gz file, use this instead:&lt;br /&gt;
#tar -p -s --atime-preserve --same-owner --one-top-level=/media/$mydevname -zxvf &amp;quot;$alpinetarball&amp;quot;&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any apkovl files that were transfered as part of the copy process.  This should be done if you wish to have a fresh install.  Replace sdU with your device name)&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat ${mydev}1 /media/$mydevname&lt;br /&gt;
rm /media/$mydevname/*.apkovl.tar.gz&lt;br /&gt;
umount /media/$mydevname&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21503</id>
		<title>Create a Bootable Device</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_a_Bootable_Device&amp;diff=21503"/>
		<updated>2022-01-25T23:17:11Z</updated>

		<summary type="html">&lt;p&gt;Jwatt: Tweak intro prose to be clearer and add links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page is about creating directly customizable boot devices. If you are looking for instructions on creating (flashing) read-only (iso9660 &amp;quot;CD&amp;quot; filesystem) images onto installation media, see the [[Installation#Flashing_.28direct_data_writing.29_the_installation_image-file_onto_a_device_or_media|Installation]] page instead.&lt;br /&gt;
&lt;br /&gt;
A directly customizable Alpine Linux boot medium is basically an Alpine system in &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode installed to (and booting from) a device with a writable filesystem. It allows to also upgrade the kernel with its modules and firmware that is used to boot the system with the &amp;lt;code&amp;gt;[[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs|update-kernel]]&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The more general local customizations, the configs (.apkovl) and the package cache, may of course also be stored on the same device, as long as the hardware is not being set to be write-locked by a hardware switch.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* An Alpine Linux CD-ROM or an .iso file containing the desired Alpine release ([https://alpinelinux.org/downloads/ Download]).&lt;br /&gt;
* A device like an USB drive (flash, external HD, card reader, etc.) or a CF &amp;quot;CompactFlash&amp;quot;, or SDcard.&lt;br /&gt;
&lt;br /&gt;
= Using setup-bootable  =&lt;br /&gt;
&lt;br /&gt;
This is now the preferable method to create a directly customizable bootable device.&lt;br /&gt;
&lt;br /&gt;
It consists an [[Installation]] of a &#039;&#039;&#039;diskless&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039; mode system with configs and package cache on the target device, and using the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; script to make the device bootable.&lt;br /&gt;
&lt;br /&gt;
= Manually copying Alpine files =&lt;br /&gt;
&lt;br /&gt;
This process applies to Alpine Linux 1.9.0 or later.&lt;br /&gt;
&lt;br /&gt;
It describes how to manually create a custom (writable) USB boot device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Copy ISO content to USB stick as individual files ===&lt;br /&gt;
&lt;br /&gt;
{{Warning | We assume here &#039;&#039;sdU&#039;&#039; is your USB stick which would hold bootable Alpine Linux files. }}&lt;br /&gt;
&lt;br /&gt;
The following procedure is for the Alpine Linux distribution itself, if you are using other Linux distro or other operating system you should know the best how to install syslinux and where &#039;&#039;mbr.bin&#039;&#039; file is located on your filesystem.&lt;br /&gt;
&lt;br /&gt;
# If you created a new partition above, format it with a FAT32 filesystem (replacing sdU with your device name):&lt;br /&gt;
#: {{Cmd|apk add dosfstools&amp;lt;BR&amp;gt;mkdosfs -F32 /dev/sdU1}}&lt;br /&gt;
# Install syslinux and MBR (replacing sdU with your device name):&lt;br /&gt;
#: {{Cmd|{{{|apk add syslinux&amp;lt;BR&amp;gt;dd if=/usr/share/syslinux/mbr.bin of=/dev/sdU}}}&amp;lt;BR&amp;gt;syslinux /dev/sdU1}}&lt;br /&gt;
#Copy the files to the boot device (replacing sdU with your device name):&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mkdir -p /media/sdU1&lt;br /&gt;
mount -t vfat /dev/sdU1 /media/sdU1&lt;br /&gt;
cd /media/cdrom&lt;br /&gt;
cp -a .alpine-release * /media/sdU1/&lt;br /&gt;
umount /media/sdU1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# (&#039;&#039;Optional&#039;&#039;) Remove any apkovl files that were transfered as part of the copy process.  This should be done if you wish to have a fresh install.  Replace sdU with your device name)&lt;br /&gt;
#: {{Cmd|&amp;lt;nowiki&amp;gt;mount -t vfat /dev/sdU1 /media/sdU1&lt;br /&gt;
rm /media/sdU1/*.apkovl.tar.gz&lt;br /&gt;
umount /media/sdU1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong Device Name ====&lt;br /&gt;
&lt;br /&gt;
If you cannot boot from the boot device and you see something like:&lt;br /&gt;
 Mounting boot media failed.&lt;br /&gt;
 initramfs emergency recovery shell launched. Type &#039;exit&#039; to continue boot&lt;br /&gt;
then it is likely that the device name in {{Path|syslinux.cfg}} is wrong. You should replace the device name in this line:&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=&#039;&#039;&#039;usbdisk&#039;&#039;&#039;:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
with the proper device name.&lt;br /&gt;
* For boot from USB, the device name should be &#039;usbdisk&#039; (as shown above)&lt;br /&gt;
* For other options, you can run &amp;lt;code&amp;gt;cat /proc/partitions&amp;lt;/code&amp;gt; to see the available disks (i.e. &#039;sda&#039; or &#039;sdb&#039;)&lt;br /&gt;
&lt;br /&gt;
==== Non-FAT32 Filesystems ====&lt;br /&gt;
&lt;br /&gt;
===== Diskless and data mode booting =====&lt;br /&gt;
&lt;br /&gt;
When the boot device is formatted with a filesystem other than those supported by default, the necessary initfs features need to be added to the modloop using &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt;. See: [[Alpine_Linux_package_management#Upgrading_.22diskless.22_and_.22data.22_disk_mode_installs]]&lt;br /&gt;
&lt;br /&gt;
===== Sys mode booting  =====&lt;br /&gt;
&lt;br /&gt;
Mount the boot device and edit the {{Path|syslinux.cfg}} file.&lt;br /&gt;
&lt;br /&gt;
Then locate the &amp;quot;append&amp;quot; line, and change the &amp;lt;code&amp;gt;alpine_dev=&amp;lt;/code&amp;gt; setting to match the used filesystem and add the filesystem&#039;s kernel module to the &amp;lt;code&amp;gt;modules=&amp;lt;/code&amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
For example, change&lt;br /&gt;
 append [...] alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append [...] alpine_dev=usbdisk:&#039;&#039;&#039;ext4&#039;&#039;&#039; modules=loop,cramfs,sd-mod,usb-storage&#039;&#039;&#039;,ext4&#039;&#039;&#039; quiet&lt;br /&gt;
in the case of an ext4 formatted partition. (Or correspondingly for other filesystems, if they are supported by syslinux and the Alpine Linux kernel.)&lt;br /&gt;
&lt;br /&gt;
== Finishing installation ==&lt;br /&gt;
&lt;br /&gt;
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run &#039;&#039;setup-alpine&#039;&#039; to finish the installation.&lt;br /&gt;
&lt;br /&gt;
First let&#039;s find out where is our just booted USB media mounted, the location could vary.&lt;br /&gt;
&lt;br /&gt;
 # mount | grep /media&lt;br /&gt;
 /dev/sdU1 on /media/sdU1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)&lt;br /&gt;
&lt;br /&gt;
Create local directory on USB media to hold local APK cache (see [[Alpine_Linux_package_management#Local_Cache|APK Local Cache]] for details).&lt;br /&gt;
&lt;br /&gt;
 # mount -o remount,rw /media/sdU1&lt;br /&gt;
 # mkdir /media/sdU1/cache&lt;br /&gt;
 # setup-apkcache /media/sdU1/cache&lt;br /&gt;
 # ls -l /etc/apk/cache&lt;br /&gt;
 lrwxrwxrwx    1 root     root            17 Oct 19 13:16 /etc/apk/cache -&amp;gt; /media/sdU1/cache&lt;br /&gt;
&lt;br /&gt;
Now run &#039;&#039;setup-alpine&#039;&#039; and proceed until a question about local disk selection - in &#039;&#039;diskless&#039;&#039; mode we won&#039;t use any disk (ie. our bootable media files is basically untouched) and we are going to use &#039;&#039;sdU1&#039;&#039; to hold our system customization.&lt;br /&gt;
&lt;br /&gt;
 # setup-alpine&lt;br /&gt;
 ...&lt;br /&gt;
 Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] &lt;br /&gt;
 Enter where to store configs (&#039;floppy&#039;, &#039;sdU1&#039;, &#039;usb&#039; or &#039;none&#039;) [sdU1]: &lt;br /&gt;
 Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/media/sdU1/cache]:&lt;br /&gt;
&lt;br /&gt;
After the installer finished you can see how many created/modified files are detected and will be added to the backup:&lt;br /&gt;
 # lbu status&lt;br /&gt;
 # lbu status | wc -l&lt;br /&gt;
 59&lt;br /&gt;
 # lbu commit&lt;br /&gt;
 # ls -l /media/sdU1/*apkovl.tar.gz&lt;br /&gt;
 -rwxr-xr-x    1 root     root          9591 Oct 19 15:23 /media/sdU1/foo.apkovl.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now all the customization are saved into the &#039;&#039;foo.apkovl.tar.gz&#039;&#039; compressed tarball on the USB stick itself.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
=== Slow USB Devices ===&lt;br /&gt;
Specifying the &#039;waitusb=X&#039; option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet &#039;&#039;&#039;waitusb=3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CF card readers ===&lt;br /&gt;
&lt;br /&gt;
Some CF card readers have problems with the faster CF cards on the market. If you experience problems booting the CF card even after checking BIOS settings, you may need to use an older card.&lt;br /&gt;
&lt;br /&gt;
Also, many CF card readers don&#039;t support DMA correctly, so you may need to add &#039;&#039;nodma&#039;&#039; to the &#039;&#039;append&#039;&#039; line of the syslinux.cfg file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jwatt</name></author>
	</entry>
</feed>