<?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=Sb1</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=Sb1"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Sb1"/>
	<updated>2026-05-01T14:31:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23513</id>
		<title>User talk:Sb1</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23513"/>
		<updated>2023-05-23T14:24:19Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
I noticed your recent edits to Installation page made quite a development on an optional matter (&#039;&#039;&#039;headless config&#039;&#039;&#039;), that may still be of interest for many.&amp;lt;br&amp;gt;&lt;br /&gt;
I can see a few downsides on how it stands now:&lt;br /&gt;
* instructions for an &#039;&#039;optional thing&#039;&#039; are becoming very long (and yet incomplete)&lt;br /&gt;
* described method requires quite some familiarity with Alpine, whereas this guide is intended for new comers&lt;br /&gt;
* that solution has several pitfalls (it will transfer all same settings to any server installed with said apkovl, etc...)&lt;br /&gt;
&lt;br /&gt;
I&#039;m not sure why a reference to a straightforward and working third-party solution is now removed from wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
Wiki is not official doc, and any mention does not express endorsement: quality external references are just fine in wiki. Referring to &#039;&#039;backdoor&#039;&#039; is irrelevant on this topic: it is not a good place to state personal judgement.&amp;lt;br&amp;gt;&lt;br /&gt;
As for the longer option you describe, it may fit better into tutorial section where things could be detailed more.&lt;br /&gt;
&lt;br /&gt;
Would you reconsider the edits in that part? &lt;br /&gt;
&lt;br /&gt;
:We could add the link (https://github.com/macmpi/alpine-linux-headless-bootstrap) to the main [[Raspberry Pi]] page. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 15:18, 20 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::That third-party apkovl solution works on any Alpine platform it is not limited to Pi-thing: I&#039;ve been successfully using it on x86_64, x86,... So referring to it from main install page makes sense --[[User:Alpwik|Alpwik]] ([[User talk:Alpwik|talk]]) 15:07, 21 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That headless.apkovl has too many  security complaints filed, and unfortunately the author has not yet chosen to take the secure-defaults-first approach. The overlay makes users accept publicly shipped &amp;quot;private&amp;quot;(not) keys, by default, and continues starting that unsecured sshd root login server after an installation, by default. Obviously wrong things, but the issues that got filed are hidden as &amp;quot;closed&amp;quot; without actually fixing the wrong behavior. That was the reason for the link removal, to not have users directed to it, at least not without prominent warning. At the moment, sadly, instead of fixing the defaults, the github readme actually kind of hides the facts in in descriptive footnotes that do not mention the consequences. --[[User:Sb1|Sb1]]&lt;br /&gt;
:: Ok, noted you are not happy with that solution, it&#039;s your own opinion. Please consider there are many different opinions out there (repo stars appreciations give some clues; you can discuss the topic there, etc...). This &#039;&#039;&#039;wiki is not a place for advocacy&#039;&#039;&#039;, revenge statement or frustration expression: this does not help users and make things very confusing. Please consider reverting your last changes. --[[User:Alpwik|Alpwik]] ([[User talk:Alpwik|talk]]) 06:23, 23 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Sorry both of you. It appears that I made a change on the page by accident. My son touched the keyboard when I wasn&#039;t looking. Please feel free to &amp;quot;undo&amp;quot; whatever I just change on the Installation page. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 07:33, 23 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::: * The primary install wiki page for alpine would really not help users *learning to use alpine*, if just plugged with links to external packages, and worse if leaving out security relevant information. It&#039;s thus actually preferable to provide notes about imminent security facts and explaining the alternative of using the setup-alpine tools. Consequently, I looked up and added that information, which was missing in edits made by newly created user accounts. Concerning the topic of how to create an only-pre-configured headless install media, i.e. without a sshd that is already fully-configured for a particular system, I guess this would only need some one-liner to only set up starting the completion of the sshd install *after* the next boot (and then not doing an lbu commit after rebooting, to get a new sshd configuration for every new &amp;quot;headless&amp;quot; setup-alpine run after a reboot). --[[User:Sb1|Sb1]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23511</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23511"/>
		<updated>2023-05-23T10:58:05Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */  small wording improvements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continues to start its passwordless root login ssh-daemon on boot even after the user completed an installation [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself (only for special cases). &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. Such a system can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and completing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp auto-configuration, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the custom configs as &amp;quot;local backup&amp;quot;. Then your completed setup, including its securely created own private keys, will readily get restored on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; file stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23505</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23505"/>
		<updated>2023-05-22T23:43:26Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continues to start its passwordless root login ssh-daemon on boot even after the user completed an installation [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. One of those can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp auto-configuration, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the custom configs as &amp;quot;local backup&amp;quot;. Then your completed setup, including its securely created own private keys, will readily get restored on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; file stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23504</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23504"/>
		<updated>2023-05-22T23:34:06Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continues to start its passwordless root login ssh-daemon on boot even after the user completed an installation [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. One of those can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23503</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23503"/>
		<updated>2023-05-22T23:30:56Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continues to start its passwordless root login ssh-daemon on boot even after the user completed an installation [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. This can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23502</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23502"/>
		<updated>2023-05-22T23:30:11Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continues to start its passwordless root login ssh-daemon on boot even after completing an installation [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. This can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23501</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23501"/>
		<updated>2023-05-22T23:28:25Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their own headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continuing to start its passwordless root login ssh-daemon on boot after completing the initial install [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. This can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23500</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23500"/>
		<updated>2023-05-22T23:27:21Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continuing to start its passwordless root login ssh-daemon on boot after completing the initial install [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. This can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Then choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23499</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23499"/>
		<updated>2023-05-22T23:26:11Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continuing to start its passwordless root login ssh-daemon on boot after completing the initial install [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, customizing the setup of the installation media itself for special cases. &amp;lt;/br&amp;gt;[For example, for a &amp;quot;headless&amp;quot; system without a display and keyboard. This can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23498</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23498"/>
		<updated>2023-05-22T23:19:52Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly known &amp;quot;private&amp;quot;(not) keys for their headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continuing to start its passwordless root login ssh-daemon on boot after completing the initial install [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a customizing setup of the installation media itself. [For example, a &amp;quot;headless&amp;quot; system without a display and keyboard can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23497</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23497"/>
		<updated>2023-05-22T23:17:52Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */  ok, lets keep mentioning the external offer with due diligence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* Be careful to understand the risks of using third-party packages [https://gitlab.alpinelinux.org/alpine/aports/-/issues/14904 not endorsed by alpine] but offered for installation of headless systems, when that package does not fix its defaults after issues got filed, like making users accept publicly know &amp;quot;private&amp;quot; keys for their headless servers by default [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/7 1], or by default continuing to start its passwordless root login ssh-daemon on boot after completing the initial install [https://github.com/macmpi/alpine-linux-headless-bootstrap/issues/6 2].}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a customizing setup of the installation media itself. [For example, a &amp;quot;headless&amp;quot; system without a display and keyboard can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23496</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23496"/>
		<updated>2023-05-22T22:56:52Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* For headless system, initial network setup may be fed by pre-built &amp;lt;code&amp;gt;apkovl&amp;lt;/code&amp;gt; overlay file, custom-made or via [https://github.com/macmpi/alpine-linux-headless-bootstrap/ 3rd party]}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a customizing setup of the installation media itself. [For example, a &amp;quot;headless&amp;quot; system without a display and keyboard can be properly installed after first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23495</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23495"/>
		<updated>2023-05-22T22:55:19Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */  Preparing a headless install is just one particular example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|&lt;br /&gt;
* For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.&lt;br /&gt;
* For headless system, initial network setup may be fed by pre-built &amp;lt;code&amp;gt;apkovl&amp;lt;/code&amp;gt; overlay file, custom-made or via [https://github.com/macmpi/alpine-linux-headless-bootstrap/ 3rd party]}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a customizing setup of the installation media itself. [For example, a &amp;quot;headless&amp;quot; system without a display and keyboard can be properly installed by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23494</id>
		<title>User talk:Sb1</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23494"/>
		<updated>2023-05-22T22:26:39Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
I noticed your recent edits to Installation page made quite a development on an optional matter (&#039;&#039;&#039;headless config&#039;&#039;&#039;), that may still be of interest for many.&amp;lt;br&amp;gt;&lt;br /&gt;
I can see a few downsides on how it stands now:&lt;br /&gt;
* instructions for an &#039;&#039;optional thing&#039;&#039; are becoming very long (and yet incomplete)&lt;br /&gt;
* described method requires quite some familiarity with Alpine, whereas this guide is intended for new comers&lt;br /&gt;
* that solution has several pitfalls (it will transfer all same settings to any server installed with said apkovl, etc...)&lt;br /&gt;
&lt;br /&gt;
I&#039;m not sure why a reference to a straightforward and working third-party solution is now removed from wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
Wiki is not official doc, and any mention does not express endorsement: quality external references are just fine in wiki. Referring to &#039;&#039;backdoor&#039;&#039; is irrelevant on this topic: it is not a good place to state personal judgement.&amp;lt;br&amp;gt;&lt;br /&gt;
As for the longer option you describe, it may fit better into tutorial section where things could be detailed more.&lt;br /&gt;
&lt;br /&gt;
Would you reconsider the edits in that part? &lt;br /&gt;
&lt;br /&gt;
:We could add the link (https://github.com/macmpi/alpine-linux-headless-bootstrap) to the main [[Raspberry Pi]] page. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 15:18, 20 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::That third-party apkovl solution works on any Alpine platform it is not limited to Pi-thing: I&#039;ve been successfully using it on x86_64, x86,... So referring to it from main install page makes sense --[[User:Alpwik|Alpwik]] ([[User talk:Alpwik|talk]]) 15:07, 21 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That headless.apkovl has too many  security complaints filed, and unfortunately the author has not yet chosen to take the secure-defaults-first approach. The overlay makes users accept publicly shipped &amp;quot;private&amp;quot;(not) keys, by default, and continues starting that unsecured sshd root login server after an installation, by default. Obviously wrong things, but the issues that got filed are hidden as &amp;quot;closed&amp;quot; without actually fixing the wrong behavior. That was the reason for the link removal, to not have users directed to it, at least not without prominent warning. At the moment, sadly, instead of fixing the defaults, the github readme actually kind of hides the facts in in descriptive footnotes that do not mention the consequences. --[[User:Sb1|Sb1]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23493</id>
		<title>User talk:Sb1</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User_talk:Sb1&amp;diff=23493"/>
		<updated>2023-05-22T22:25:49Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
I noticed your recent edits to Installation page made quite a development on an optional matter (&#039;&#039;&#039;headless config&#039;&#039;&#039;), that may still be of interest for many.&amp;lt;br&amp;gt;&lt;br /&gt;
I can see a few downsides on how it stands now:&lt;br /&gt;
* instructions for an &#039;&#039;optional thing&#039;&#039; are becoming very long (and yet incomplete)&lt;br /&gt;
* described method requires quite some familiarity with Alpine, whereas this guide is intended for new comers&lt;br /&gt;
* that solution has several pitfalls (it will transfer all same settings to any server installed with said apkovl, etc...)&lt;br /&gt;
&lt;br /&gt;
I&#039;m not sure why a reference to a straightforward and working third-party solution is now removed from wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
Wiki is not official doc, and any mention does not express endorsement: quality external references are just fine in wiki. Referring to &#039;&#039;backdoor&#039;&#039; is irrelevant on this topic: it is not a good place to state personal judgement.&amp;lt;br&amp;gt;&lt;br /&gt;
As for the longer option you describe, it may fit better into tutorial section where things could be detailed more.&lt;br /&gt;
&lt;br /&gt;
Would you reconsider the edits in that part? &lt;br /&gt;
&lt;br /&gt;
:We could add the link (https://github.com/macmpi/alpine-linux-headless-bootstrap) to the main [[Raspberry Pi]] page. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 15:18, 20 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::That third-party apkovl solution works on any Alpine platform it is not limited to Pi-thing: I&#039;ve been successfully using it on x86_64, x86,... So referring to it from main install page makes sense --[[User:Alpwik|Alpwik]] ([[User talk:Alpwik|talk]]) 15:07, 21 May 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That headless.apkovl has too many  security complaints filed, and unfortunately the author has not yet chosen to take the secure-defaults-first approach. The overlay makes user accept publicly shipped &amp;quot;private&amp;quot;(not) keys, by default, and continues starting that unsecured sshd root login server after an installation, by default. Obviously wrong things, but the issues that got filed are hidden as &amp;quot;closed&amp;quot; without actually fixing the wrong behavior. That was the reason for the link removal, to not have users directed to it, at least not without prominent warning. At the moment, sadly, instead of fixing the defaults, the github readme actually kind of hides the facts in in descriptive footnotes that do not mention the consequences. --[[User:Sb1|Sb1]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi_Zero_W_-_Installation&amp;diff=23474</id>
		<title>Raspberry Pi Zero W - Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi_Zero_W_-_Installation&amp;diff=23474"/>
		<updated>2023-05-18T13:49:30Z</updated>

		<summary type="html">&lt;p&gt;Sb1: rm link to page marked for deletion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
{{Delete|This page may be consolidated into the main Raspberry Pi installation page and then deleted.}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
This wiki describes how I installed Alpine Linux 3.9.2 armhf on a Raspberry Pi Zero W.  I had problems with it initially as WiFi wouldn&#039;t connect when going through the setup-alpine script and when I was able to get it connect (after numerous failed manual attempts) it wouldn&#039;t reconnect on reboot.  The solution documented below adds and starts the rngd service prior to running setup-alpine which fixes the wifi connection problems and allows you to walk through the setup script successfully.  It also adds the rngd and wpa_supplicant services to start at boot and removes the network service from the rc-update list completely, which seems like the wrong thing to do and probably is - networking still gets started, probably as a dependency to something else, and it starts after rngd and wpa_supplicant, which is what I needed.  When the networking service was set to &amp;quot;boot&amp;quot; (which it was out of the box) it was starting before rngd and wpa_supplicant so wlan0 would never connect.&lt;br /&gt;
&lt;br /&gt;
I need to go back through this again but it should work as written.  Some steps may not be necessary for your use case and some steps may not be necessary at all, but don&#039;t seem to hurt.  I&#039;m still learning about Alpine Linux and hope to improve this process as I do more reading and experimentation.&lt;br /&gt;
&lt;br /&gt;
Update - 7 Dec 2019 - I went through installation again on a Pi Zero W with Alpine 3.10.3 for armhf.  First boot after writing the image to the SD card seems to work ok as far as WiFi functionality is concerned. Setup script completes and I was able to connect to WiFi and pull down packages etc. I decided to not install the rngd related packages at this point to see how a reboot looked, answer is not good. The dhcp request just times out.  Running setup-alpine again at this point also doesn&#039;t work. If you start over and rewrite the image to the SD card, the first boot will again work ok, it&#039;s only rebooting that breaks Wifi. I think it&#039;s best to follow the steps for installing the rngd related packages and configuring the service to start at boot. Note that you can install what you need on first boot using apk, you don&#039;t need to copy the packages to the SD card offline as written below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Write image to SD =&lt;br /&gt;
First, format an SD card with the FAT filesystem. That can be done with a graphical tool like GParted once the SD card is mounted on your operating system. The following assumes the SD card device is at /dev/sdb1.&lt;br /&gt;
&lt;br /&gt;
Mount the SD card:&lt;br /&gt;
{{Cmd|sudo mount /dev/sdb1 /mnt}}&lt;br /&gt;
&lt;br /&gt;
Then, copy the files:&lt;br /&gt;
{{Cmd|tar -xzvf alpine-rpi-3.9.2-armhf.tar.gz -C /mnt --no-same-owner}}&lt;br /&gt;
If you have no means to mount the SD card normally with an SD reader, it can be mounted via USB via the Raspberry Pi Zero W, using the usbbootgui tool to mount as eMMC/SD card reader. On Ubuntu, this can be installed as follows:&lt;br /&gt;
{{Cmd|sudo add-apt-repository ppa:rpi-distro/ppa}}&lt;br /&gt;
{{Cmd|sudo apt install usbbootgui}}&lt;br /&gt;
&lt;br /&gt;
A GUI should open as soon as you plug in your Pi; otherwise run&lt;br /&gt;
{{Cmd|usbbootgui}}&lt;br /&gt;
&lt;br /&gt;
= Edit cmdline.txt and add line for serial console (Optional)=&lt;br /&gt;
&lt;br /&gt;
This is for my use case and optional if you are using a local keyboard and monitor.  I do not connect a keyboard and monitor but rather do the setup via the Pi&#039;s serial GPIO pins.&lt;br /&gt;
&lt;br /&gt;
Create a file called cmdline.txt in the root of the SD card and place the following text in it:&lt;br /&gt;
{{Cmd|modules{{=}}loop,squashfs,sd-mod,usb-storage quiet dwc_otg.lpm_enable{{=}}0 console{{=}}tty1 console{{=}}ttyAMA0,115200}}&lt;br /&gt;
&lt;br /&gt;
= Create usercfg.txt and edit (Optional) =&lt;br /&gt;
&lt;br /&gt;
This is mostly optional I believe and applies to my use case where I will be running the Pi in a headless appliance type mode.  I reduce the memory allocated for the GPU, turn off audio (not sure I still need this on the Zero W), disable bluetooth (which I think puts the serial console back on the real uart, again, need to double check), add w1 for a temperature sensor, and set the enable_uart to 1 (may not be necessary, need to verify and add comments). This can be done by creating a file called usercfg.txt at the base of the SD card with the following contents:&lt;br /&gt;
{{Cmd|gpu_mem{{=}}16&lt;br /&gt;
dtparam{{=}}audio{{=}}off&lt;br /&gt;
dtoverlay{{=}}pi3-disable-bt&lt;br /&gt;
dtoverlay{{=}}w1-gpio&lt;br /&gt;
enable_uart{{=}}1}}&lt;br /&gt;
&lt;br /&gt;
= Create cache folder and add rng-tools packages =&lt;br /&gt;
{{Cmd|mkdir /mnt/cache}}&lt;br /&gt;
I copied/pasted the following into the cache dir on the SD card.  I have another Alpine env to apk fetch packages from (chroot on Fedora)&lt;br /&gt;
{{Cmd|rng-tools-6.3.1-r1.652a1399.apk&lt;br /&gt;
rng-tools-openrc-6.3.1-r1.e9b063f8.apk}}&lt;br /&gt;
&lt;br /&gt;
= Boot Pi with prepared SD card, login as root and add packages =&lt;br /&gt;
&lt;br /&gt;
I&#039;m still new to Alpine, not sure if the setup-apkcache step is necessary or accomplishes anything here.&lt;br /&gt;
{{Cmd|localhost:~# setup-apkcache &lt;br /&gt;
Enter apk cache directory (or &#039;?&#039; or &#039;none&#039;) [/var/cache/apk]: /media/mmcblk0p1/cache/&lt;br /&gt;
&lt;br /&gt;
localhost:~# apk add --allow-untrusted /media/mmcblk0p1/cache/rng-tools-6.3.1-r1.652a1399.apk &lt;br /&gt;
(1/1) Installing rng-tools (6.3.1-r1)&lt;br /&gt;
Executing busybox-1.29.3-r10.trigger&lt;br /&gt;
OK: 8 MiB in 21 packages&lt;br /&gt;
&lt;br /&gt;
localhost:~# apk add --allow-untrusted /media/mmcblk0p1/cache/rng-tools-openrc-6.3.1-r1.e9b063f8.apk &lt;br /&gt;
(1/1) Installing rng-tools-openrc (6.3.1-r1)&lt;br /&gt;
OK: 8 MiB in 22 packages}}&lt;br /&gt;
&lt;br /&gt;
= Start rngd service =&lt;br /&gt;
{{Cmd|localhost:~# service rngd start&lt;br /&gt;
 * Caching service dependencies ...&lt;br /&gt;
 [ ok ]&lt;br /&gt;
 * Starting rngd ...&lt;br /&gt;
&lt;br /&gt;
Initalizing available sources&lt;br /&gt;
 [ ok ]}}&lt;br /&gt;
&lt;br /&gt;
= Run setup-alpine. Wifi connection should setup ok with rngd running. =&lt;br /&gt;
The setup process turns off the rngd service at some point, but that happens after wifi is connected.&lt;br /&gt;
{{Cmd|setup-alpine}}&lt;br /&gt;
&lt;br /&gt;
= Configure services and reboot =&lt;br /&gt;
Removing networking from boot results in it not being present in any stage which seems like the wrong fix, but it runs after rngd and wpa_supplicant, which is what we want:&lt;br /&gt;
{{Cmd|pet-protect:~# rc-update add rngd boot&lt;br /&gt;
 * service rngd added to runlevel boot&lt;br /&gt;
&lt;br /&gt;
pet-protect:~# rc-update add wpa_supplicant boot&lt;br /&gt;
 * service wpa_supplicant added to runlevel boot&lt;br /&gt;
&lt;br /&gt;
pet-protect:~# rc-update del networking boot&lt;br /&gt;
 * service networking removed from runlevel boot&lt;br /&gt;
&lt;br /&gt;
pet-protect:~# rc-update -u&lt;br /&gt;
 * Caching service dependencies ...&lt;br /&gt;
 [ ok ]&lt;br /&gt;
&lt;br /&gt;
pet-protect:~# lbu commit -d&lt;br /&gt;
pet-protect:~# reboot}}&lt;br /&gt;
&lt;br /&gt;
[[category:Installation]]&lt;br /&gt;
[[category: Raspberry]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23472</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23472"/>
		<updated>2023-05-17T15:57:59Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to provide the basic overview to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23471</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23471"/>
		<updated>2023-05-17T12:33:04Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to the previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23470</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23470"/>
		<updated>2023-05-17T12:31:35Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu config storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23469</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23469"/>
		<updated>2023-05-17T12:30:53Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23468</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23468"/>
		<updated>2023-05-17T12:21:16Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine&#039;s &amp;quot;data&amp;quot; disk mode will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23467</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23467"/>
		<updated>2023-05-17T12:17:30Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; stored on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23466</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23466"/>
		<updated>2023-05-17T12:16:04Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on the boot media (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23464</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23464"/>
		<updated>2023-05-17T12:11:42Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, a custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23463</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23463"/>
		<updated>2023-05-17T12:10:53Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture with their corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23462</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23462"/>
		<updated>2023-05-17T12:09:53Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture, together with the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23461</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23461"/>
		<updated>2023-05-17T12:08:54Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the target computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23460</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23460"/>
		<updated>2023-05-17T12:07:54Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page exists to point out the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23459</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23459"/>
		<updated>2023-05-17T12:05:49Z</updated>

		<summary type="html">&lt;p&gt;Sb1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]], as well as to refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23458</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23458"/>
		<updated>2023-05-17T11:59:33Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding some third-party backdoor package. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23457</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23457"/>
		<updated>2023-05-17T11:56:16Z</updated>

		<summary type="html">&lt;p&gt;Sb1: latest ver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/ docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23456</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23456"/>
		<updated>2023-05-17T11:54:38Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23455</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23455"/>
		<updated>2023-05-17T11:53:18Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a basic setup of the initial &amp;quot;diskless&amp;quot; installation media in order to prepare for the installation of the target system. For example, also to download and install some specific driver or software tool. And to possibly use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation in a custom way. A most basic pre-setup of just the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, for where to store configs, and for the location of the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23454</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23454"/>
		<updated>2023-05-17T11:44:10Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; exits, and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23453</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23453"/>
		<updated>2023-05-17T11:42:43Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (as the new data partition is not listed anyway) and configure lbu manually after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; but before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23452</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23452"/>
		<updated>2023-05-17T11:38:28Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Data Disk Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but &#039;&#039;&#039;can not yet configure lbu storage settings automatically&#039;&#039;&#039;. The &#039;&#039;&#039;current workaround&#039;&#039;&#039;, is to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23451</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23451"/>
		<updated>2023-05-17T11:32:48Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Diskless Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on &#039;&#039;&#039;internal disks still require&#039;&#039;&#039; [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23450</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23450"/>
		<updated>2023-05-17T11:27:48Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optionally, custom setup of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23449</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23449"/>
		<updated>2023-05-17T11:24:01Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23448</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23448"/>
		<updated>2023-05-17T11:21:43Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs. Then your completed setup, including securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It is really helpful for many cases that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, also to download and install some specific driver or software tool. And then also to use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, in order to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23447</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23447"/>
		<updated>2023-05-17T11:17:39Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs. Then your completed setup, including securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, in case the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23446</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23446"/>
		<updated>2023-05-17T11:17:08Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs. Then your completed setup, including securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media from your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, if the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23445</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23445"/>
		<updated>2023-05-17T11:15:34Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (more details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs. Then your completed setup, including securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media  with your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, if the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23444</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23444"/>
		<updated>2023-05-17T11:14:53Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Bluproper-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to install a headless system without relying on adding a third-party backdoor. [A headless install is properly done by first booting the install media on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (moree details below), i.e. using the offical &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; to configure the system&#039;s network, possibly for dhcp if needed, a ssh server, and a login user. Choosing &amp;quot;disks=none&amp;quot; for now, yet, configure to store configs on the boot media (if it is writable, otherwise on a separate storage media). And afterwards calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs. Then your completed setup, including securely created own private keys, will readily get (re)loaded on a next (headless) boot of the boot media  with your custom-build &amp;lt;code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/code&amp;gt; on it (or on an auxilary media or server location, if the boot media is read-only).]&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23443</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23443"/>
		<updated>2023-05-16T00:37:57Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* Completing the installation */ setup-alpine can create user now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, yet, to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations can get readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browsers are installed.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23442</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23442"/>
		<updated>2023-05-16T00:24:37Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, yet, to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations can get readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux &amp;quot;disk&amp;quot; modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none), &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browser are installed, and &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is the only user.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23441</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23441"/>
		<updated>2023-05-16T00:22:55Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, yet, to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations can get readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to boot into one of three different &#039;&#039;&#039;Alpine Linux disk modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browser are installed, and &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is the only user.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23440</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23440"/>
		<updated>2023-05-16T00:18:56Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional customization of the installation media, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, yet, to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations can get readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to&amp;lt;/br&amp;gt;&lt;br /&gt;
boot into one of three different &#039;&#039;&#039;Alpine Linux disk modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browser are installed, and &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is the only user.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23439</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23439"/>
		<updated>2023-05-15T18:03:42Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional installation media customization, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, yet, to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations can get readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to&amp;lt;/br&amp;gt;&lt;br /&gt;
boot into one of three different &#039;&#039;&#039;Alpine Linux disk modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browser are installed, and &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is the only user.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23438</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=23438"/>
		<updated>2023-05-15T18:00:40Z</updated>

		<summary type="html">&lt;p&gt;Sb1: /* The general course of action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]]. &lt;br /&gt;
&lt;br /&gt;
NOTE: This is an unofficial guide. Refer to the official installation guide at [https://docs.alpinelinux.org/user-handbook/0.1a/index.html docs.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
{{Tip|This is a wiki!&lt;br /&gt;
If something isn&#039;t correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].&lt;br /&gt;
&lt;br /&gt;
And then carefully edit the wiki page.&lt;br /&gt;
&lt;br /&gt;
Just as those before you did it for you.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
&lt;br /&gt;
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in &amp;quot;sys&amp;quot; or &amp;quot;data&amp;quot; mode installations (explained below). It is optional in &amp;quot;diskless&amp;quot; mode, where it may be used to save newer data and configurations states of a running system.]&lt;br /&gt;
&lt;br /&gt;
For more information please check [[Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
=== The general course of action ===&lt;br /&gt;
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}&lt;br /&gt;
&lt;br /&gt;
As usual, starting an installation procedure requires some basic steps (additional details for all the steps follow [[Installation#Basic Installation Step Details|below]]):&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Downloading and verifying the proper [https://alpinelinux.org/downloads/ stable-release ISO installation image-file] for the computer&#039;s architecture, and the corresponding &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; (checksum) and &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; (signature) files. &lt;br /&gt;
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).&lt;br /&gt;
# Optional installation media customization, e.g. to do an install on a headless system. With alpine, this is done by first booting the install media either on some computer with a display and keyboard attached or in a virtual machine, and doing an intermediate &amp;quot;diskless&amp;quot; setup of just the boot media (details below), i.e. configuring the system&#039;s network for dhcp, a ssh server, and a login user, but disks only &amp;quot;none&amp;quot; for now, and to store configs on the boot media (if it is writable, otherwise on a separate storage media). Then calling &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to store the configs, and all customizations are readily loaded from the created .apkovl.tar.gz file on the next boot.&lt;br /&gt;
# Booting the target computer from the prepared disk or storage device.&lt;br /&gt;
&lt;br /&gt;
The boot process of the alpine installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.&lt;br /&gt;
&lt;br /&gt;
Local log-in is possible as the user &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;. Initially, the root user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system.&lt;br /&gt;
&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; takes care of the base configuration and allows to configure the system to&amp;lt;/br&amp;gt;&lt;br /&gt;
boot into one of three different &#039;&#039;&#039;Alpine Linux disk modes&#039;&#039;&#039;: &#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;, or &#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These modes are explained in more detail in the following subsections.&lt;br /&gt;
&lt;br /&gt;
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial &amp;quot;diskless&amp;quot; installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the &amp;quot;diskless&amp;quot; system may be completed by running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and answering &amp;quot;none&amp;quot; when asked for the disk to use, and where to store configs, as well as for the location for the package cache.&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
&lt;br /&gt;
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).&lt;br /&gt;
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager &amp;lt;code&amp;gt;[[Alpine_Package_Keeper|apk]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; to configure a &amp;quot;local backup&amp;quot; location for the diskless system, and &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; to then save the local configuration state.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]&amp;lt;/code&amp;gt; to configure a local package cache storage location.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a &amp;quot;data&amp;quot; mode partition, or do a classic full install of the &amp;quot;diskless&amp;quot; system onto a &amp;quot;sys&amp;quot; disk or partition.&lt;br /&gt;
&lt;br /&gt;
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Installation|Post-Installation]] below.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Diskless Mode&#039;&#039;&#039;=== &lt;br /&gt;
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method already used to boot the .iso installation images, however &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can also configure the installed system to continue to boot like this if &amp;quot;disk=none&amp;quot; is specified. The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot into with a &amp;quot;toram&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Custom configurations and package installations may optionally still be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine local backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt;. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Package_Keeper#Local_Cache|local package cache]] on the writable storage.&lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an &#039;&#039;internal&#039;&#039; disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]&lt;br /&gt;
&lt;br /&gt;
If a writable partition is available, &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)&lt;br /&gt;
&lt;br /&gt;
The boot device of the newly configured local &amp;quot;diskless&amp;quot; system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Data Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as &amp;quot;diskless&amp;quot; mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. &lt;br /&gt;
&lt;br /&gt;
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select &amp;quot;none&amp;quot; at the &#039;where to store configs&#039; prompt (the new data partition is not listed) and configure lbu manually, i.e. after running &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; and before rebooting:&lt;br /&gt;
&lt;br /&gt;
# Identify the created data partition, e.g. &amp;lt;code&amp;gt;/dev/sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt;, and its filesystemtype, e.g. using &amp;lt;code&amp;gt;&#039;&#039;lsblk&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Manually edit the lbu backups location in &amp;lt;code&amp;gt;/etc/lbu/lbu.conf&amp;lt;/code&amp;gt; and configure &amp;lt;code&amp;gt;LBU_MEDIA=sd&#039;&#039;XY&#039;&#039;&amp;lt;/code&amp;gt; (according to previous findings).&lt;br /&gt;
# Save the configuration on that partition for the next boot with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If (a new) partition fails to get mounted, execute: &amp;lt;code&amp;gt;mkdir /media/&#039;&#039;sdXY&#039;&#039; ; echo &amp;quot;/dev/sd&#039;&#039;XY&#039;&#039; /media/sd&#039;&#039;XY&#039;&#039; &#039;&#039;fstype&#039;&#039; noauto,rw 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/code&amp;gt;, and try &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; again.&lt;br /&gt;
&lt;br /&gt;
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;System Disk Mode&#039;&#039;&#039;=== &lt;br /&gt;
This is a traditional hard-disk install.&lt;br /&gt;
&lt;br /&gt;
If this mode is selected, the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[:Category:Desktop|desktop]] and development machines.&lt;br /&gt;
&lt;br /&gt;
For custom partitioning, see [[Setting up disks manually]].&lt;br /&gt;
&lt;br /&gt;
To install along side another operating systems, see [[Dualbooting]].&lt;br /&gt;
&lt;br /&gt;
== Basic Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
{{Expand|  }}&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;Additional Details&amp;quot; section needs to be consolidated with the work at &#039;&#039;&#039;[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)&#039;&#039;&#039; &lt;br /&gt;
(Restructuring things there, moving and linking from here or there?). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Verifying the downloaded image-file ===&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:95%; align=center&amp;quot;&lt;br /&gt;
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.&lt;br /&gt;
|-&lt;br /&gt;
! width=100px |  OS type&lt;br /&gt;
!  &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; check !! &amp;lt;code&amp;gt;SHA256&amp;lt;/code&amp;gt; calculation (to be compared manually) !! &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verification&lt;br /&gt;
|-&lt;br /&gt;
! Linux&lt;br /&gt;
| &amp;lt;code&amp;gt;sha256sum -c alpine-*.iso.sha256&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! MACOS  &lt;br /&gt;
| - ? -  || &amp;lt;code&amp;gt;shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! OpenBSD  &lt;br /&gt;
| &amp;lt;code&amp;gt;sha256 -C alpine-*.sha256 alpine-*.iso&amp;lt;/code&amp;gt; ||        || &amp;lt;code&amp;gt;doas pkg_add gnupg;&lt;br /&gt;
ftp -o - https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;&lt;br /&gt;
gpg --verify alpine-&amp;lt;version&amp;gt;.iso.asc alpine-&amp;lt;version&amp;gt;.iso&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! FreeBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! NetBSD  &lt;br /&gt;
| - ? - || &amp;lt;code&amp;gt;/usr/local/bin/shasum -a 256 alpine-*.iso&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|-&lt;br /&gt;
! Windows (PowerShell installed)&lt;br /&gt;
|                 - ? -             || &amp;lt;code&amp;gt;Get-FileHash .\alpine-&amp;lt;image-version&amp;gt;.iso -Algorithm SHA256&amp;lt;/code&amp;gt; || - ? -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flashing (direct data writing) the installation image-file onto a device or media  ===&lt;br /&gt;
&lt;br /&gt;
==== Unix/Linux ====&lt;br /&gt;
&lt;br /&gt;
Under Unix (and thus Linux), &amp;quot;everything is a file&amp;quot; and the data in the image-file can be written to a device or media with the &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command. Afterward, executing the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command removes the target device from the system and ensures the write cache is completely flushed.&lt;br /&gt;
&lt;br /&gt;
 dd if=&amp;lt;iso-file-to-read-in&amp;gt; of=&amp;lt;target-device-node-to-write-out-to&amp;gt; bs=4M oflag=sync status=progress; eject &amp;lt;target-device-node-to-write-to&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to correctly identify the target device as any data on it &#039;&#039;&#039;will&#039;&#039;&#039; be lost! All connected &amp;quot;bulk storage devices&amp;quot; can be listed with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;blkid&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sdX               0:0    0  64,0G  0 disk  &lt;br /&gt;
 ├─sdX1            0:1    0     2G  0 part  &lt;br /&gt;
 └─sdX2            0:2    0    30G  0 part  /mnt/sdX2&lt;br /&gt;
 &lt;br /&gt;
 # blkid&lt;br /&gt;
 /dev/sdX1: LABEL=&amp;quot;some&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 /dev/sdX2: LABEL=&amp;quot;other&amp;quot; UUID=&amp;quot;...&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:&lt;br /&gt;
&lt;br /&gt;
 umount  /dev/sdX1  /dev/sdX2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;&#039;s output-file (&amp;lt;code&amp;gt;of=&amp;lt;/code&amp;gt;), however, do &#039;&#039;&#039;not&#039;&#039;&#039; specify a partition number. For example, write to sdX, &#039;&#039;&#039;not&#039;&#039;&#039; sdX1:&lt;br /&gt;
&lt;br /&gt;
Warning: &#039;&#039;&#039;This will overwrite the target device /dev/sdX&#039;&#039;&#039;, so before executing, make sure you have a backup of the data if you can&#039;t afford to lose it.&lt;br /&gt;
&lt;br /&gt;
 dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. &lt;br /&gt;
&lt;br /&gt;
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:&lt;br /&gt;
* &#039;&#039;&#039;Partition scheme&#039;&#039;&#039;: &amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Target system&#039;&#039;&#039;: &amp;lt;code&amp;gt;BIOS or UEFI&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;File system&#039;&#039;&#039;: &amp;lt;code&amp;gt;FAT32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Cluster size&#039;&#039;&#039;: &amp;lt;code&amp;gt;4096 bytes (default)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Verifying the written installation media ===&lt;br /&gt;
&lt;br /&gt;
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:&lt;br /&gt;
&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.00.0-x86_64.iso&lt;br /&gt;
&lt;br /&gt;
=== Booting from external devices ===&lt;br /&gt;
&lt;br /&gt;
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
&lt;br /&gt;
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button &#039;&#039;before&#039;&#039; starting the computer and hold it down while the computer boots. Typical keys are:  `F9`-`F12`, sometimes `F7` or `F8`. If these don&#039;t bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning of the harddisk ===&lt;br /&gt;
&lt;br /&gt;
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;diskless&amp;quot; or &amp;quot;data disk&amp;quot; mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt;, to have a place for a package cache, or to use it for a /var mount. &lt;br /&gt;
&lt;br /&gt;
For a &amp;quot;sys&amp;quot; install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.&lt;br /&gt;
&lt;br /&gt;
=== Questions asked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; ===&lt;br /&gt;
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; session]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script offers the following configuration options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Keyboard Layout&#039;&#039;&#039; (Local keyboard language and usage mode, e.g. &#039;&#039;us&#039;&#039; and variant of &#039;&#039;us-nodeadkeys&#039;&#039;.)&lt;br /&gt;
* &#039;&#039;&#039;Hostname&#039;&#039;&#039; (The name for the computer.)&lt;br /&gt;
* &#039;&#039;&#039;Network&#039;&#039;&#039; (For example, automatic IP address discovery with the &amp;quot;DHCP&amp;quot; protocol.)&lt;br /&gt;
* &#039;&#039;&#039;DNS Servers&#039;&#039;&#039; (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google&#039;s &amp;lt;s&amp;gt;8.8.8.8&amp;lt;/s&amp;gt; .)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web. Use &amp;quot;none&amp;quot; for direct connections to the internet.)&lt;br /&gt;
* &#039;&#039;&#039;Mirror&#039;&#039;&#039; (From where to download packages. Choose the organization you trust giving your usage patterns to.)&lt;br /&gt;
* &#039;&#039;&#039;SSH&#039;&#039;&#039; (Secure SHell remote access server. &amp;quot;Openssh&amp;quot; is part of the default install image. Use &amp;quot;none&amp;quot; to disable remote login, e.g. on laptops.)&lt;br /&gt;
* &#039;&#039;&#039;NTP&#039;&#039;&#039; (Network Time Protocol client used for keeping the system clock in sync with a time server. Package &amp;quot;chrony&amp;quot; is part of the default install image.)&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; (Select between diskless (disk=&amp;quot;none&amp;quot;), &amp;quot;data&amp;quot; or &amp;quot;sys&amp;quot;, as described above.) &lt;br /&gt;
  {{Warning|The data on a chosen device will be overwritten!}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing for the first boot ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; has finished configuring the &amp;quot;sys&amp;quot; disk mode, the system should be ready to reboot right away (see next subsection).&lt;br /&gt;
&lt;br /&gt;
If the new local system was configured to run in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.&lt;br /&gt;
&lt;br /&gt;
The target partition may be identified using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;lsblk&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (after installing it with &amp;lt;code&amp;gt;apk add lsblk&amp;lt;/code&amp;gt;) and/or &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt;, similar to previously identifying the initial installation media device.&lt;br /&gt;
&lt;br /&gt;
The procedure to copy the boot system is explained at &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt; before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Rebooting and testing the new system ===&lt;br /&gt;
&lt;br /&gt;
First, remove the initial installation media from the boot drive, or detach it from the port it&#039;s connected to.&lt;br /&gt;
&lt;br /&gt;
The system may now be power-cycled or rebooted to confirm everything is working correctly.&lt;br /&gt;
&lt;br /&gt;
The relevant commands for this are &amp;lt;code&amp;gt;poweroff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Completing the installation ===&lt;br /&gt;
&lt;br /&gt;
The installation script installs only the base operating system. &#039;&#039;&#039;No&#039;&#039;&#039; applications e.g. web server, mail server, desktop environment, or web browser are installed, and &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is the only user.&lt;br /&gt;
&lt;br /&gt;
Please look under [[Installation#Post-Installation|Post-Installation]] below, for some common things to do after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Further Installation Instructions =&lt;br /&gt;
&lt;br /&gt;
{{Note| Specific topics should be kept on separate, individually manageable topic-pages and only get listed with a direct reference (link) on this general page.}}&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
* [[Kernels]] &#039;&#039;(kernel selection, e.g. for VMs or RPi)&#039;&#039;&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]] &#039;&#039;(installation media with its own configuration)&#039;&#039;&lt;br /&gt;
* [[Directly booting an ISO file]] &#039;&#039;(without flashing it to a disk or device)&#039;&#039;&lt;br /&gt;
* [[Dualbooting|Dual/multi-boot install to HDD partition]]&lt;br /&gt;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
Also see other [[:Category:Installation|Installation Category]] pages.&lt;br /&gt;
&lt;br /&gt;
=== Post-Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&lt;br /&gt;
If you edit Post-Install,&lt;br /&gt;
&lt;br /&gt;
  * Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and maintaining topic details of considerable size on their own pages.&lt;br /&gt;
  * Here, only the most relevant jumping off points are listed, not exact list duplicates!!!&lt;br /&gt;
  * Keep short-list of links here, as overview to more detailed topic specific pages.&lt;br /&gt;
  * Don&#039;t aggregate different topics at yet another place.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]] &#039;&#039;(to allow remote, console, or graphical logins)&#039;&#039;&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&lt;br /&gt;
* [[Alpine_Package_Keeper|Package Management (apk)]] &#039;&#039;(how to search/add/del packages etc.)&#039;&#039;&lt;br /&gt;
** [[Alpine_Package_Keeper#Upgrade_a_Running_System|Upgrading Alpine]] &#039;&#039;(checking for and installing updates)&#039;&#039;&lt;br /&gt;
** [[Repositories#Managing_repositories|Enable the community repository]] &#039;&#039;(access to additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Running glibc programs]] &#039;&#039;(installation and development)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_local_backup|Local backup utility &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt;]] &#039;&#039;(persisting RAM system configurations)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &#039;&#039;(&amp;quot;diskless mode&amp;quot; systems)&#039;&#039;&lt;br /&gt;
** [[Manually_editing_a_existing_apkovl]] &#039;&#039;(the stored custom configs)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OpenRC|Init System (OpenRC)]] &#039;&#039;(configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Writing Init Scripts]]&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|&amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;]] &#039;&#039;(setup graphical base environment)&#039;&#039;&lt;br /&gt;
** [[Tutorials_and_Howtos#Desktop|Desktop Environments]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;(things one may miss in a too lightweight installation )&#039;&#039;&lt;br /&gt;
* Running applications and services in their own [[Firejail Security Sandbox]]&lt;br /&gt;
&lt;br /&gt;
=== Broader Usage Guides ===&lt;br /&gt;
&lt;br /&gt;
* See: [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
= General Documentation =&lt;br /&gt;
&lt;br /&gt;
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ ArchWiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Alpine_Linux:Contribute|How to Contribute]]&lt;br /&gt;
* [[:Category_talk:Developer_Documentation|Developer Documentation]]&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sb1</name></author>
	</entry>
</feed>