<?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=Armarmgc</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=Armarmgc"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Armarmgc"/>
	<updated>2026-05-02T07:16:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Diskless_Mode&amp;diff=27853</id>
		<title>Diskless Mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Diskless_Mode&amp;diff=27853"/>
		<updated>2024-11-20T06:51:49Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: /* Installation */ Fix casing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Diskless mode, the entire operating system with all applications are first loaded into RAM and then only run from there. This is also the method used to boot the Alpine Linux &amp;lt;Code&amp;gt;iso&amp;lt;/Code&amp;gt; installation media. Alpine Linux can be installed and configured so that the system continue to boot like this if &amp;quot;disk=none&amp;quot; is specified while running the &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
The mode is extremely fast and can save on unnecessary disk spin-ups, power, and wear and suitable for servers. It is similar to what other linux distributions may call a &amp;quot;frugal&amp;quot; install or boot using a &amp;quot;toram&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
You can continue using your [[Installation#Preparing_installation_media|installation media]] as a [[#Boot Device|boot device]] without installing alpine to the device&#039;s internal disk, but it is also possible to install Alpine Linux to a device&#039;s internal disk and configure it so that it boots into &amp;quot;diskless mode&amp;quot;  .&lt;br /&gt;
&lt;br /&gt;
== Apkovl ==&lt;br /&gt;
{{Seealso|Alpine local backup}}&lt;br /&gt;
&lt;br /&gt;
When you boot an alpine installation into diskless mode, it will initialize a fresh new root (&amp;lt;Code&amp;gt;/&amp;lt;/Code&amp;gt;) and any customisations you make (such as changing the password, adding users, etc.) will be lost when you reboot. However, any custom configurations may be preserved or &amp;quot;persist&amp;quot; across reboots by using the Alpine Linux tool named &amp;lt;code&amp;gt;[[Alpine_local_backup|Local Backup Utility]](lbu)&amp;lt;/code&amp;gt;. The initial and possibly read-only installation media can remain the only boot device for the &amp;quot;diskless&amp;quot; system by saving the running state to an [[#Apkovl|&amp;lt;Code&amp;gt;.apkovl&amp;lt;/Code&amp;gt;]] file, and have these automatically loaded when booting from the boot device.&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;Apkovl&#039;&#039;&#039; (APK Overlay file) is a file used for storing local configuration state when running Alpine Linux in [[Diskless Mode]]. It stores all configuration files that have changed from the default ones. The filename is &amp;lt;Code&amp;gt;&amp;lt;hostname&amp;gt;.apkovl.tar.gz&amp;lt;/Code&amp;gt; and is stored in a location whose path is defined in {{Path|/etc/lbu/lbu.conf}}. The contents from the Apkovl file are overlaid on top of the contents of the apks that are loaded on boot.&lt;br /&gt;
&lt;br /&gt;
The backup tool &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu]]&amp;lt;/code&amp;gt; enables committing and reverting local configuration system state by using &#039;&#039;&#039;.apkovl&#039;&#039;&#039; files that are saved to a backup location and loaded when booting. In Diskless mode, for every change made to the running system to persist across reboot, the command &amp;lt;code&amp;gt;[[Alpine_local_backup|lbu commit]]&amp;lt;/code&amp;gt; must be issued before rebooting the system to update the .apkovl file.&lt;br /&gt;
&lt;br /&gt;
== Local Package Cache ==&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux boots in Diskless Mode, the remote repositories will not be available until after networking has started. That means extra packages newer not in your local boot media would not be available after a reboot, unless they were made to persistent [[Alpine_Package_Keeper#Local_Cache|local package cache]] available on a local, writable, storage device. The local package cache can be stored on the same partition as the .apkovl file.&lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
{{Seealso|Create a Bootable Device}}&lt;br /&gt;
&lt;br /&gt;
Alpine Linux setup script &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; uses &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-lbu|setup-lbu]]&amp;lt;/code&amp;gt; script to save the config and package cache to any available writable filesystem on any media other than the read-only [[Installation#Preparing_installation_media|installation media]].&lt;br /&gt;
&lt;br /&gt;
Due to Bug: [https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 #10473] storing local configs and package cache on &#039;&#039;&#039;internal disks&#039;&#039;&#039; requires manual steps, i.e making an entry in {{Path|/etc/fstab}}, create mountpoint, and mount the partition before running &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
# In this case, boot the target diskless system from the [[Installation#Preparing_installation_media|installation media]] and do not proceed after the [[Installation#Boot_Process|boot process]] stage. &lt;br /&gt;
# If necessary partition(s) are unavailable, manually [[Setting_up_disks_manually#Creating_partitions|create]] a partition using &amp;lt;Code&amp;gt;fdisk&amp;lt;/Code&amp;gt;. In the below steps, we will use /dev/sdXY as partition number. Adjust the partition identifier as per the output of {{Codeline|&amp;lt;Code&amp;gt;blkid&amp;lt;/Code&amp;gt;}}&amp;lt;br&amp;gt;&lt;br /&gt;
#* Due to Bug: {{Issue|11589|The APKOVL loading of diskless setups doesn&#039;t work on btrfs and xfs filesystems, or nvme-based devices}}. So use only ext4 filesystem partitions on classic drives to store diskless mode states.&lt;br /&gt;
#*  mkfs.ext4 creates ext4 filesystem with 64bit feature enabled by default, but extlinux may not be able to boot with that due to Issue {{Issue|14895}}. You may need to add &amp;quot;-O ^64bit&amp;quot; to mkfs.ext4 to circumvent this. The below command creates an ext4 partition with disabled journaling, to reduce write operations and allow the disk to spin down after the .apkovl and the packages have been read from the partition during the boot. Install package {{pkg|&amp;lt;Code&amp;gt;e2fsprogs&amp;lt;/code&amp;gt;}} using command {{Codeline|&amp;lt;Code&amp;gt;apk add e2fsprogs&amp;lt;/Code&amp;gt;}}, if the command &amp;lt;Code&amp;gt;mkfs.ext4&amp;lt;/Code&amp;gt; is not available.&lt;br /&gt;
#: {{Cmd|mkfs.ext4 -O ^has_journal,^64bit /dev/sdXY}}&lt;br /&gt;
# Due to a [https://gitlab.alpinelinux.org/alpine/mkinitfs/-/issues/5 bug], the partition can not be mounted to /boot. Configure the /etc/fstab to mount the writable partition to /media/sdXY instead of /boot i.e. conforming to the hot/cold-plug mountpoints. &lt;br /&gt;
#: {{Cmd|mkdir /media/sdXY}}&lt;br /&gt;
#: {{cmd|echo &amp;quot;/dev/sdXY /media/sdXY ext4 noatime,ro 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab}}&lt;br /&gt;
&amp;lt;!-- Mounting read-only is possible, because the [[Alpine_local_backup|lbu tools]] can temporarily remount it writable for their operation. --&amp;gt;&lt;br /&gt;
# Mount the partitions listed in {{Path|/etc/fstab}}. &lt;br /&gt;
#: {{Cmd|&amp;lt;code&amp;gt;mount -a&amp;lt;/code&amp;gt;}} Look at the output of {{Codeline|&amp;lt;code&amp;gt;mount&amp;lt;/code&amp;gt;}} to verify that the changes have been applied correctly.&amp;lt;br&amp;gt;&lt;br /&gt;
# If &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; has not run before, follow the [[Installation#Installation_Step_Details|Installation steps]] to complete the [[Installation#Base_configuration|base configuration]]. The above changes should now enable you to choose the partition for saving the local configs and package cache. If asked, there is no need to first unmount the partition, that would only be needed to allow installing on its parent disk.&lt;br /&gt;
# If &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; has already been used to configure the diskless system, the storage settings may be modified directly with&lt;br /&gt;
#: {{cmd|setup-lbu sdXY}} &lt;br /&gt;
# [[Alpine_Package_Keeper#Local_Cache|Local package cache]] can be enabled as follows:&lt;br /&gt;
#: {{cmd|mkdir /media/sdXY/cache}} &lt;br /&gt;
#: {{cmd|setup-apkcache /media/sdXY/cache}}&lt;br /&gt;
# If the partition is large enough, it can be useful to edit {{Path|lbu.conf}} to uncomment and set {{Codeline|BACKUP_LIMIT{{=}}3}}. For example, to allow reverting to a previous, working state if needed. &lt;br /&gt;
#: {{cmd|apk add nano}}&lt;br /&gt;
#: {{cmd|nano /etc/lbu/lbu.conf }}&lt;br /&gt;
# Finally, generate the first .apkovl file containing all the previous changes by executing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;, so the customizations that were just made will persist a reboot.&lt;br /&gt;
#: {{cmd|lbu commit}}&lt;br /&gt;
# From now on, whenever packages are installed or newly configured, and the changes should be kept, execute &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Boot Device == &lt;br /&gt;
&lt;br /&gt;
{{Main|Create a Bootable Device}}&lt;br /&gt;
&lt;br /&gt;
The initial ISO9660 filesystem based read-only [[Installation#Preparing_installation_media|installation media]] may remain the only boot device for the newly configured Alpine Linux &#039;&#039;&#039;Diskless&#039;&#039;&#039; system. &lt;br /&gt;
&lt;br /&gt;
Alpine Linux running Diskless mode can also boot from a partition with a writable filesystem on USB-Stick/CompactFlash/SDCard or SSD/NVMe harddisk. This boot device is known as [[Create_a_Bootable_Device|customizable boot device]] to differentiate against [[Installation#Preparing_installation_media|installation media]]. Local customizations like apkovl files and cached packages can be stored in this customizable boot device, which also allows to upgrade the kernel with its modules and firmware with the &amp;lt;code&amp;gt;update-kernel&amp;lt;/Code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
== Loading apkovl from webserver ==&lt;br /&gt;
&lt;br /&gt;
Alpine&#039;s &amp;quot;diskless mode&amp;quot; ISO boot images support boot parameters to load customizations files i.e  [[Alpine_local_backup#Creating_and_saving_an_apkovl_from_a_remote_host|apkovl from a webserver]]. &lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to load an APKOVL file from a webserver, by supplying a custom url with the &amp;lt;code&amp;gt;APKOVL&amp;lt;/code&amp;gt; kernel boot parameter. If you don&#039;t have a web server you can run busybox&#039;s httpd temporarily to serve an .apkovl - &amp;lt;code&amp;gt;busybox httpd -p 127.0.0.1:80&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Upgrading a Diskless System ==&lt;br /&gt;
&lt;br /&gt;
When Alping Linux runs in &amp;quot;diskless&amp;quot; or &amp;quot;data&amp;quot; disk mode, Upgrading requires few extra steps in addition to the regular [[Alpine_Package_Keeper#Upgrade_a_Running_System|upgrade steps]].&lt;br /&gt;
&lt;br /&gt;
If booting a &amp;quot;diskless&amp;quot; system from a read-only device, or as an iso image on writable media, it&#039;s not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.&lt;br /&gt;
&lt;br /&gt;
For [[Create_a_Bootable_Device|customizable boot device]], It is possible to update the boot files. However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt; script that can generate initfs images and install them together with upgraded kernels.&lt;br /&gt;
&lt;br /&gt;
Upgrading can be done as follows.&lt;br /&gt;
{{cmd|apk add mkinitfs&lt;br /&gt;
}}&lt;br /&gt;
This package is required for the generation of the initial filesystem used during boot.&lt;br /&gt;
* Additional initfs features that are missing in the default configuration, like the [[Btrfs|btrfs]] filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in &amp;lt;code&amp;gt;/etc/mkinitfs/mkinitfs.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Available initfs features may be listed with &amp;lt;code&amp;gt;ls /etc/mkinitfs/features.d&amp;lt;/code&amp;gt;&lt;br /&gt;
{{cmd|ls /etc/mkinitfs/features.d&lt;br /&gt;
apk add nano&lt;br /&gt;
nano /etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
lbu commit&lt;br /&gt;
}}&lt;br /&gt;
Finally update the kernel and its boot environment.&lt;br /&gt;
{{cmd|update-kernel /media/sdXY/boot/&lt;br /&gt;
}}&lt;br /&gt;
* An &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt; run needs at least 8 GB free ram memory to avoid a broken modloop-image.&lt;br /&gt;
* See &amp;lt;code&amp;gt;update-kernel --help&amp;lt;/code&amp;gt; for options to manually add additional module or firmware packages.&lt;br /&gt;
&lt;br /&gt;
== Kernel Options ==&lt;br /&gt;
&lt;br /&gt;
Documentation about kernel command line options regarding diskless mode will be available after installing the documentation sub-package {{Pkg|mkinitfs-doc}}:  &lt;br /&gt;
&lt;br /&gt;
{{Cmd|man mkinitfs-bootparam}} &amp;lt;Pre&amp;gt;&lt;br /&gt;
       If no root= parameter is given, the initramfs will build a live system&lt;br /&gt;
       in memory from scratch. This is also called diskless mode.&lt;br /&gt;
&lt;br /&gt;
       When booting in diskless mode, the following options are also&lt;br /&gt;
       available:&lt;br /&gt;
&lt;br /&gt;
       alpine_repo=(URL | PATH)&lt;br /&gt;
              If set, /etc/apk/repositories will be filled with this. May be a&lt;br /&gt;
              comma-separated list of URLs.&lt;br /&gt;
&lt;br /&gt;
       apkovl=(URL | [DEVICE[:FS_TYPE]:]PATH)&lt;br /&gt;
              A HTTP, HTTPS or FTP URL to an apkovl.tar.gz file which will be&lt;br /&gt;
              retrieved and applied. Can also be a filesystem path, optionally&lt;br /&gt;
              prepended with the device name without the /dev/ prefix.&lt;br /&gt;
&lt;br /&gt;
       autodetect_serial=no&lt;br /&gt;
              Disable automatic detection and setup of serial console.&lt;br /&gt;
&lt;br /&gt;
       ds=OPTIONS&lt;br /&gt;
              Data source for tiny-cloud. If OPTIONS starts with nocloud,&lt;br /&gt;
              tiny-cloud will be enabled.&lt;br /&gt;
&lt;br /&gt;
       nokeep_apk_new&lt;br /&gt;
              Setup a fresh system, ignore any apkovl.&lt;br /&gt;
&lt;br /&gt;
       pkgs=PACKAGE{,PACKAGE}&lt;br /&gt;
              Comma-separated list of packages to be installed.&lt;br /&gt;
       ssh_key=(URL | SSH_KEY)&lt;br /&gt;
              This setting installs openssh and places the public key given as&lt;br /&gt;
              value in /root/.ssh/authorized_keys.  If the value is an HTTP or&lt;br /&gt;
              FTP url, its fetches the key(s) from there.&lt;br /&gt;
&lt;br /&gt;
       splash Enable splash screen.&lt;br /&gt;
&lt;br /&gt;
       usbdelay=NUMBER&lt;br /&gt;
              Wait NUMBER seconds for USB devices to show up before searching&lt;br /&gt;
              for boot media.&lt;br /&gt;
&lt;br /&gt;
       wireguard=INTERFACE;IP_ADDRESS{,IP_ADDRESS,...}[;WG_CONFIG_FILE]&lt;br /&gt;
              Set up a wireguard interface named INTERFACE with the addresses&lt;br /&gt;
              IP_ADDRESS and use /etc/wireguard/initrd.conf or WG_CONFIG_FILE&lt;br /&gt;
              as a classic wg (not wg-quick) config.&lt;br /&gt;
&lt;br /&gt;
       zfs_force=NUMBER&lt;br /&gt;
              Enable force importing the root zpool on boot, even if it was&lt;br /&gt;
              previously mounted from a different system/OS.&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Alpine_local_backup|Alpine Local backup Utility - &#039;&#039;lbu&#039;&#039;&#039;]]&lt;br /&gt;
* [[Alpine_Package_Keeper#Local_Cache|Local package cache]]&lt;br /&gt;
* [[Manually editing a existing apkovl]]&lt;br /&gt;
* [[Back Up a Flash Memory Installation]]&lt;br /&gt;
* [[Upgrading_Alpine#Upgrading_Alpine_Linux_on_other_removable_media_(such_as_CF/USB)|Upgrading Diskless to New Alpine Linux Release]]&lt;br /&gt;
* [[PXE boot#Specifying an apkovl|Diskless PXE Boot]]&lt;br /&gt;
* [[How to make a custom ISO image with mkimage]]&lt;br /&gt;
* [[QEMU#Live_mode|QEMU Diskless example]] &lt;br /&gt;
* [[Alpine local backup#Include special files.2Ffolders to the apkovl|Include special files section]] - To include custom files outside of &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt; in .apkovl file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Diskless]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Busybox&amp;diff=27852</id>
		<title>Busybox</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Busybox&amp;diff=27852"/>
		<updated>2024-11-20T06:45:59Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: add redirect to BusyBox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[BusyBox]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Joysticks&amp;diff=27851</id>
		<title>Joysticks</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Joysticks&amp;diff=27851"/>
		<updated>2024-11-20T06:39:39Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: fix double redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Gamepad]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Development_using_git_with_write_access&amp;diff=27850</id>
		<title>Development using git with write access</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Development_using_git_with_write_access&amp;diff=27850"/>
		<updated>2024-11-20T06:37:30Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: Fix double redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Git]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setup-xorg-base&amp;diff=27849</id>
		<title>Setup-xorg-base</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setup-xorg-base&amp;diff=27849"/>
		<updated>2024-11-20T06:30:38Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: add redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alpine setup scripts]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setup-lbu&amp;diff=27848</id>
		<title>Setup-lbu</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setup-lbu&amp;diff=27848"/>
		<updated>2024-11-20T06:05:49Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: Undo revision 27847 by Armarmgc (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alpine setup scripts]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setup-lbu&amp;diff=27847</id>
		<title>Setup-lbu</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setup-lbu&amp;diff=27847"/>
		<updated>2024-11-20T06:04:50Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: make redirect link to appropriate section in the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alpine setup scripts#setup-lbu]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Screen_terminal_multiplexer&amp;diff=27771</id>
		<title>Screen terminal multiplexer</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Screen_terminal_multiplexer&amp;diff=27771"/>
		<updated>2024-11-09T05:18:51Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: /* Where to find more examples */ fixed list formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{pkg|screen}} is a terminal multiplexer. It&#039;s a good tool for e.g. remote support. It can also be used to start a command you want to keep running after you close your console session (you can later on attach to your running session). When you enter a {{pkg|screen}} session you will not notice too much.&amp;lt;BR&amp;gt;&lt;br /&gt;
To know if you are inside a {{pkg|screen}} session, use the notes in &#039;[[#Get_help|get help]]&#039; section mentioned below.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
In order to use {{pkg|screen}} you will have to install it:&lt;br /&gt;
{{cmd|apk add screen}}&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Start a new session ==&lt;br /&gt;
To enter a {{pkg|screen}} session you just enter:&lt;br /&gt;
{{cmd|screen}}&lt;br /&gt;
&lt;br /&gt;
== List existing sessions ==&lt;br /&gt;
When you have started some session(s) you can list them:&lt;br /&gt;
{{cmd|screen -list}}&lt;br /&gt;
You might get a list that looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
There are screens on:&lt;br /&gt;
        11151.pts-1.mhlab01     (Attached)&lt;br /&gt;
        11131.pts-3.mhlab01     (Attached)&lt;br /&gt;
2 Sockets in /var/run/screen/S-root.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Attach to a existing session ==&lt;br /&gt;
Lets say you want to attach to a existing session (e.g. the above &amp;lt;code&amp;gt;11131.pts-3.mhlab01&amp;lt;/code&amp;gt; session).&lt;br /&gt;
{{cmd|screen -x 11131}}&lt;br /&gt;
or&lt;br /&gt;
{{cmd|screen -x pts-3}}&lt;br /&gt;
{{tip|If you see &amp;lt;code&amp;gt;Attaching from inside of screen?&amp;lt;/code&amp;gt;, you are already inside a screen session.}}&lt;br /&gt;
&lt;br /&gt;
== Controlling a screen session ==&lt;br /&gt;
While inside a {{pkg|screen}} session, you can control it using keyboard shortcuts. We will only describe some of those alternatives.&lt;br /&gt;
&lt;br /&gt;
{{tip|To enter a keyboard shortcut that controls the current {{pkg|screen}} session, you should click {{key|A}} while holding down {{key|CTRL}}&amp;lt;br&amp;gt;In the below examples this procedure is described as &amp;lt;code&amp;gt;^A&amp;lt;/code&amp;gt;}}&lt;br /&gt;
=== Get help ===&lt;br /&gt;
One of the most useful commands is the one that gives you &#039;help&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
While in your {{pkg|screen}} session, click:&lt;br /&gt;
{{cmd|^A ?}}&lt;br /&gt;
&#039;&#039;(Do not press/hold {{key|CTRL}} when clicking {{key|?}})&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Detach from a session ===&lt;br /&gt;
Sometimes it&#039;s useful to just detach from a session without killing it.&amp;lt;br&amp;gt;&lt;br /&gt;
{{cmd|^A d}}&lt;br /&gt;
{{tip|Try starting &amp;lt;code&amp;gt;ping 127.0.0.1&amp;lt;/code&amp;gt; while inside a screen session and then detach from the session.&amp;lt;br&amp;gt;After some while re-connect to the session using &amp;lt;code&amp;gt;screen -x&amp;lt;/code&amp;gt;.&amp;lt;br&amp;gt;Note that the &amp;quot;seq&amp;quot; value indicates that ping had continued running while you where detached from the session.}}&lt;br /&gt;
&lt;br /&gt;
=== Close or kill a session ===&lt;br /&gt;
To &#039;kill&#039; a session:&lt;br /&gt;
{{cmd|^A k}}&lt;br /&gt;
Confirm by clicking {{key|y}} when prompted.&lt;br /&gt;
&lt;br /&gt;
You can also &#039;kill&#039; your session by entering:&lt;br /&gt;
{{cmd|exit}}&lt;br /&gt;
&lt;br /&gt;
= Extra =&lt;br /&gt;
== Connect to serial console ==&lt;br /&gt;
{{pkg|screen}} is a good tool when you need to connect to a serial console &#039;&#039;(e.g. if you want to configure a switch using it&#039;s serial port)&#039;&#039;. Connecting to a serial console could look like this:&lt;br /&gt;
{{cmd|screen /dev/ttyS0 9600}}&lt;br /&gt;
&lt;br /&gt;
== Force console users into a screen session ==&lt;br /&gt;
In some cases you might want to force only console users into a screen session.&amp;lt;BR&amp;gt;&lt;br /&gt;
Note that the this configuration will not force SSH-users into a screen.&amp;lt;BR&amp;gt;&lt;br /&gt;
Edit {{path|/etc/profile}} and add the following code to it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if [ -n &amp;quot;$PS1&amp;quot; ] &amp;amp;&amp;amp; [ -z &amp;quot;$STARTED_SCREEN&amp;quot; ] &amp;amp;&amp;amp; [ -z &amp;quot;$SSH_TTY&amp;quot; ]; then&lt;br /&gt;
  STARTED_SCREEN=1 ; export STARTED_SCREEN&lt;br /&gt;
  screen -RR &amp;amp;&amp;amp; exit 0&lt;br /&gt;
  echo &amp;quot;Screen failed! continuing with normal startup&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Force console and SSH users into a screen session ==&lt;br /&gt;
The above example holds the if-statement:&lt;br /&gt;
 &amp;amp;&amp;amp; [ -z &amp;quot;$SSH_TTY&amp;quot; ]&lt;br /&gt;
Remove this part from above configuration to force SSH sessions into a screen session.&amp;lt;BR&amp;gt;&lt;br /&gt;
{{Note|Console users will also be forced into a screen session when folowing these instructions}}&lt;br /&gt;
&lt;br /&gt;
= Other terminal multiplexers =&lt;br /&gt;
A similar tool is {{pkg|tmux}} which is documented [[tmux|here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Configuring .screenrc (example) =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#hardstatus off&lt;br /&gt;
hardstatus alwayslastline &#039;%{= kG}[ %{y}%H%? %1`%?%{g} ][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][ %{y}%l %{g}][%{W}%c:%s %{g}]&#039;&lt;br /&gt;
msgwait 1&lt;br /&gt;
vbell off&lt;br /&gt;
&lt;br /&gt;
# Huge scrollback buffer&lt;br /&gt;
defscrollback 5000&lt;br /&gt;
&lt;br /&gt;
# No welcome message&lt;br /&gt;
startup_message off&lt;br /&gt;
&lt;br /&gt;
# Clear the screen after closing some programs&lt;br /&gt;
altscreen on&lt;br /&gt;
&lt;br /&gt;
# Get rid of the vertical bars&lt;br /&gt;
rendition so =00&lt;br /&gt;
caption string &amp;quot;%{03} &amp;quot;&lt;br /&gt;
&lt;br /&gt;
# 256 colors&lt;br /&gt;
term screen-256color&lt;br /&gt;
terminfo rxvt-unicode &#039;Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm&#039;&lt;br /&gt;
termcapinfo xterm* ti@:te@&lt;br /&gt;
attrcolor b &amp;quot;.I&amp;quot; &lt;br /&gt;
&lt;br /&gt;
# UTF-8&lt;br /&gt;
#defutf8 on&lt;br /&gt;
#utf8 on&lt;br /&gt;
&lt;br /&gt;
# Default Windows&lt;br /&gt;
&lt;br /&gt;
# Switch windows with F3 (prev) and F4 (next)&lt;br /&gt;
bindkey &amp;quot;^[OR&amp;quot; prev&lt;br /&gt;
bindkey &amp;quot;^[OS&amp;quot; next&lt;br /&gt;
&lt;br /&gt;
# Get rid of silly xoff stuff&lt;br /&gt;
bind s split&lt;br /&gt;
bind c screen 1&lt;br /&gt;
bind ^c screen 1&lt;br /&gt;
bind 0 select 10                                                            &lt;br /&gt;
screen 1&lt;br /&gt;
&lt;br /&gt;
# remove some stupid / dangerous key bindings&lt;br /&gt;
bind k&lt;br /&gt;
bind ^k&lt;br /&gt;
bind .&lt;br /&gt;
bind ^\&lt;br /&gt;
bind \\&lt;br /&gt;
bind ^h&lt;br /&gt;
bind h  hardcopy&lt;br /&gt;
bind &#039;K&#039; kill&lt;br /&gt;
bind &#039;}&#039; history&lt;br /&gt;
&lt;br /&gt;
bind L screen -t dmesg 10 watch &amp;quot;dmesg | tail -n $((LINES-42))&amp;quot;&lt;br /&gt;
bind T screen -t htop 11 htop&lt;br /&gt;
bind A screen -t atop 12 atop&lt;br /&gt;
bind N screen -t nethogs 15 nethogs&lt;br /&gt;
bind V screen -t vnstat 16 vnstat&lt;br /&gt;
bind S screen -t ss 17 ss -s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to find more examples ==&lt;br /&gt;
* Archlinux forums (https://bbs.archlinux.org/viewtopic.php?id=55618)&lt;br /&gt;
* GithubGist (https://gist.github.com/search?utf8=%E2%9C%93&amp;amp;q=screenrc)&lt;br /&gt;
* Github (https://github.com/search?utf8=%E2%9C%93&amp;amp;q=screenrc)&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=27685</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Installation&amp;diff=27685"/>
		<updated>2024-11-02T23:16:48Z</updated>

		<summary type="html">&lt;p&gt;Armarmgc: Fix formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hdd_mount.png|left|link=]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page exists to provide a basic overview to get started. Before actually installing, it can help to skim through the [[Alpine_Linux:FAQ| Frequently 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, or is incomplete, you will have to figure 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 who did it for you.}}&lt;br /&gt;
&lt;br /&gt;
== Minimal Hardware Requirements ==&lt;br /&gt;
{{Main|Requirements}}&lt;br /&gt;
* At least 128 MB of RAM. [A graphical desktop system may require up to 512 minimum.]. Note that an installation itself (from ISO) generally requires at least 320 MB during installation.&lt;br /&gt;
* At least 0-700 MB space on a writable storage device. [Only required in [[#System Disk Mode|&amp;quot;sys&amp;quot;]] or [[#Data Disk Mode|&amp;quot;data&amp;quot;]] mode installations. It is optional in [[#Diskless Mode|&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;
* A working internet connection is required to complete [[#System Disk Mode|&amp;quot;sys&amp;quot;]] mode installation.&lt;br /&gt;
&lt;br /&gt;
{{Note| Most of the steps outlined on this page applies to all [[:Category:Architectures|Architectures]] supported by Alpine Linux. For more specific installation instructions, refer to their respective pages. Refer [[#Custom Installation Instructions|custom installation instructions]] for headless system, virtualization etc.}}&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux can be installed and run in [[Setting_up_disks_manually#Alpine_Linux_modes|three modes]]  i.e [[#Diskless_Mode|Diskless Mode]], [[#Data_Disk_Mode|Data Disk Mode]] and [[#System_Disk_Mode|System Disk Mode]]. The installation procedure for Alpine Linux &#039;&#039;&#039;requires basic understanding of the three modes&#039;&#039;&#039; explained in brief below: &lt;br /&gt;
&lt;br /&gt;
====Diskless Mode====&lt;br /&gt;
In Diskless mode the entire operating system with all applications are first loaded into RAM and then only run from there. Alpine Linux uses this method to boot the .iso installation images. The &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script configures 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. For further info, refer [[Setting_up_disks_manually#Diskless_Mode| Diskless Mode]].&lt;br /&gt;
&lt;br /&gt;
====Data Disk Mode====&lt;br /&gt;
In Data Disk mode also the operating system  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. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. For further info, refer [[Setting_up_disks_manually#Data_Disk_Mode| Data Disk Mode]].&lt;br /&gt;
&lt;br /&gt;
====System Disk Mode====&lt;br /&gt;
&lt;br /&gt;
System or &#039;&#039;&#039;sys&#039;&#039;&#039; Disk Mode is the traditional hard-disk install. &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-alpine|setup-alpine]]&amp;lt;/code&amp;gt; script based [[#setup-alpine based System Disk Install|install]] supports only [[Setting_up_disks_manually#Default_Layout|default layout]]. For further info, refer [[Setting_up_disks_manually#System_Disk_Mode|System Disk Mode]]. &lt;br /&gt;
&lt;br /&gt;
=== General course of action ===&lt;br /&gt;
&lt;br /&gt;
{{Note| It is really helpful for many use cases to [[#Preparing_for_the_installation|prepare]] and  complete the [[#Installation_Step_Details|Installation]] until the [[#Base_configuration|base configuration]] step, then proceed with installation of the target system with any one of the various [[#Alternate courses of action|alternate]] courses of action.}}&lt;br /&gt;
&lt;br /&gt;
=== Alternate courses of action ===&lt;br /&gt;
&lt;br /&gt;
Examples of preparation options:&lt;br /&gt;
* Download and install some specific driver or software tool.&lt;br /&gt;
* Do a [[Setting_up_disks_manually#Manual_partitioning|Manual partitioning]] of the harddisk that avoids overwrite of an entire disk.&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;
* Use more specific [[Alpine_setup_scripts|setup-scripts]] in order to proceed with the final installation in a custom way.&lt;br /&gt;
&lt;br /&gt;
Examples of proceeding options:&lt;br /&gt;
&lt;br /&gt;
* To install Alpine Linux on an &#039;&#039;&#039;entire hard disk&#039;&#039;&#039; with [[Setting_up_disks_manually#Default_Layout|default layout]] proceed with [[#setup-alpine_based_System_Disk_Install|setup-alpine based System Disk Install]]&lt;br /&gt;
* Use &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 Mode|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;
* Use &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;
* Use &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to add a [[#Data Disk Mode|&amp;quot;data&amp;quot;]] mode partition &lt;br /&gt;
* Use &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-disk|setup-disk]]&amp;lt;/code&amp;gt; to complete a [[Setting_up_disks_manually#Custom_Layout|traditional hard-disk installation]] or to [[Dualbooting|Dualboot]] or to configure [[Setting_up_disks_manually#RAID|RAID]], [[Setting_up_disks_manually#Encryption|encryption]] or [[Setting_up_disks_manually#LVM|LVM]] for both [[#Data Disk Mode|&amp;quot;data&amp;quot;]] disk and  [[#System_Disk_Mode|&amp;quot;system&amp;quot;]] disk mode or to use [[Setting_up_disks_manually#Environment_variables|environment variables]].&lt;br /&gt;
* Use &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt; to create a [[Create_a_Bootable_Device#Using_setup-bootable|customizable boot media]] for &#039;&#039;&#039;[[Installation#Diskless_Mode|diskless]]&#039;&#039;&#039; or &#039;&#039;&#039;[[Installation#Data_Disk_Mode|data]]&#039;&#039;&#039; disk-mode i.e a boot device with a writable filesystem. &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;
== Preparing for the installation ==&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{Note|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;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Downloading installation image ===&lt;br /&gt;
&lt;br /&gt;
Download the [https://alpinelinux.org/downloads/ stable-release 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;
&lt;br /&gt;
{{Note|Download &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 only from [https://alpinelinux.org/downloads/ official] site and not from mirrors.}}&lt;br /&gt;
&lt;br /&gt;
Now you have three files of the following format.. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alpine-standard-*.iso&lt;br /&gt;
alpine-standard-*.iso.sha256&lt;br /&gt;
alpine-standard-*.iso.asc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;alpine-standard-3.20.3-x86_64.iso&#039;&#039; is the &#039;&#039;&#039;3.20.3&#039;&#039;&#039; version &#039;&#039;&#039;Standard&#039;&#039;&#039; image file in &#039;&#039;&#039;iso&#039;&#039;&#039; format for &#039;&#039;&#039;x86_64&#039;&#039;&#039; architecture. Image file can also be &#039;&#039;&#039;gz&#039;&#039;&#039; for certain cases.&lt;br /&gt;
&lt;br /&gt;
=== Verifying downloaded image ===&lt;br /&gt;
&lt;br /&gt;
From Security point of view, verify the downloaded image file for both checksum and GPG signature before proceeding further. The three required utilities i.e &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;curl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;gpg&amp;lt;/code&amp;gt; or their equivalents are available in every operating system including Linux, windows, Mac and BSD derivaties. &lt;br /&gt;
&lt;br /&gt;
{{Tip|Ensure that all the three downloaded files remain in the same folder. If not, adjust the commands accordingly.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt; checksum verifies the integrity of the downloaded image i.e no modifications occurred during download.&lt;br /&gt;
{{Cmd|sha256sum -c alpine-*.iso.&#039;&#039;&#039;sha256&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GPG&amp;lt;/code&amp;gt; signature verifies the link between the downloaded image to the individual who signed it. Signature verification involves two steps:&lt;br /&gt;
&lt;br /&gt;
Step 1. Download and import the gpg signature from official website &lt;br /&gt;
{{Cmd|curl https://alpinelinux.org/keys/ncopa.asc &amp;amp;#124; gpg --import ;}}&lt;br /&gt;
&lt;br /&gt;
Step 2. Verify that the image signature matches with the one downloded in Step 1.&lt;br /&gt;
{{Cmd|gpg --verify alpine-*.iso.&#039;&#039;&#039;asc&#039;&#039;&#039; alpine-*.&#039;&#039;&#039;iso&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
=== Preparing installation media  ===&lt;br /&gt;
{{Seealso|Burning ISOs}}&lt;br /&gt;
&lt;br /&gt;
{{Note|These instructions are exclusively for x86_64 and x86. For ARM boards, see [[Alpine on ARM#Preparing installation media|Alpine on ARM]].}}&lt;br /&gt;
&lt;br /&gt;
All data currently on the installation media will be &#039;&#039;&#039;lost&#039;&#039;&#039;, when the Alpine Linux image is written on it. Be extremely careful to correctly identify the device name for the installation media.&lt;br /&gt;
&lt;br /&gt;
In Linux, &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command can write the downloaded image file to the installation media i.e target device. To identify the target device, 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;
&amp;lt;pre&amp;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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if /dev/sdX is the desired target device, ensure that all mounted partitions of the target device are un-mounted first. In the above case, for device sdX with partitions sdX1 and sdX2, the partition sdX2 needs to be unmounted:&lt;br /&gt;
{{Cmd|# umount /dev/sdX2}}&lt;br /&gt;
&lt;br /&gt;
{{Note| In &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command, do not specify partition number for target device i.e use &#039;&#039;&#039;/dev/sdX&#039;&#039;&#039; and not &#039;&#039;&#039;/dev/sdX1&#039;&#039;&#039;}}  &lt;br /&gt;
&lt;br /&gt;
The syntax for &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command is as follows:&lt;br /&gt;
{{Cmd|# dd if{{=}}&amp;lt;iso-image-file&amp;gt; of{{=}}&amp;lt;target-device&amp;gt; bs{{=}}4M status{{=}}progress; eject &amp;lt;target-device&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If your version of &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; does not support the option &amp;quot;status=progress&amp;quot;, remove it. 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;
A complete example for &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; command with image file &#039;&#039;alpine-standard-3.20.3-x86_64.iso&#039;&#039; and target device &#039;&#039;&#039;/dev/sdd&#039;&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
{{Warning|Below command will overwrite data on target device &#039;&#039;&#039;/dev/sdd&#039;&#039;&#039;. Modify &#039;&#039;&#039;if&#039;&#039;&#039; and &#039;&#039;&#039;of&#039;&#039;&#039; according to the name of your image file and target device}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# dd if{{=}}~/Downloads/alpine-standard-3.20.3-x86_64.iso of{{=}}/dev/sdd bs{{=}}4M status{{=}}progress; eject /dev/sdd}}&lt;br /&gt;
&lt;br /&gt;
In Windows, [https://rufus.ie/ Rufus] has been tested to create bootable USB flash drives and worked 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;   &#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;      &#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 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;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cmp ~/Downloads/alpine-standard-3.20.3-x86_64.iso /dev/sdX&lt;br /&gt;
 cmp: EOF on alpine-standard-3.20.3-x86_64.iso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting Installation Media ===&lt;br /&gt;
&lt;br /&gt;
Insert the [[#Preparing_installation_media|Installation media]] to a proper drive or port of the computer and turn the machine on, or restart it, if already running.&lt;br /&gt;
{{Note| To successfully boot and install Alpine Linux, disable [[Alpine_and_UEFI#How_to_boot_unsigned_code?|secure boot]] in the BIOS. Once Alpine Linux is installed, this can be [[UEFI_Secure_Boot|enabled]].}}&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:  {{key|F9}}-{{key|F12}}, sometimes {{key|F7}} or {{key|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: {{key|Del}} {{key|F1}} {{key|F2}} {{key|F6}} or {{key|Esc}}.&lt;br /&gt;
&lt;br /&gt;
== Installation Step Details ==&lt;br /&gt;
&lt;br /&gt;
=== Boot Process ===&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 &#039;&#039;&#039;root&#039;&#039;&#039; user has no password.&lt;br /&gt;
&lt;br /&gt;
At the command prompt, an interactive script named &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; is available to configure and install the initial Alpine Linux system. Using [[Setting_up_disks_manually#Environment_variables|environment variables]] at this stage is optional. Launch the Alpine Linux Installation by running the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script :&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# setup-alpine}}&lt;br /&gt;
&lt;br /&gt;
=== Base configuration ===&lt;br /&gt;
The question-and-answer dialog of &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; takes care of the base configuration. &lt;br /&gt;
&lt;br /&gt;
It 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;:  [[Installation#Diskless_Mode|&#039;&#039;&#039;&amp;quot;diskless&amp;quot;&#039;&#039;&#039;(none)]],  [[Installation#Data_Disk_Mode|&#039;&#039;&#039;&amp;quot;data&amp;quot;&#039;&#039;&#039;]]  or [[Installation#System_Disk_Mode|&#039;&#039;&#039;&amp;quot;sys&amp;quot;&#039;&#039;&#039;]].&lt;br /&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. If unsure, leave DNS domain name blank and using &amp;lt;code&amp;gt;[https://quad9.net/ 9.9.9.9 2620:fe::fe]&amp;lt;/code&amp;gt; for DNS is typically adequate.)&lt;br /&gt;
* &#039;&#039;&#039;Root password&#039;&#039;&#039; (the password used to login to the root account)&lt;br /&gt;
* &#039;&#039;&#039;Timezone&#039;&#039;&#039; (Optionally display times/dates in your local time zone)&lt;br /&gt;
* &#039;&#039;&#039;HTTP/FTP Proxy&#039;&#039;&#039; (Proxy server to use for accessing the web/ftp. Use &amp;quot;none&amp;quot; for direct connections to websites and FTP servers.)&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;Setup a user&#039;&#039;&#039; (Setting up a regular user account)&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;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;
* In most cases, either one of following line(s) is displayed as follows: &#039;&#039;&#039;No disks found.&#039;&#039;&#039; or &#039;&#039;&#039; Available disks are: sda (128.0 GB JMicron  Tech )&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; ( A pre-setup of the &amp;quot;diskless&amp;quot; system or base configuration is completed by answering &amp;quot;none&amp;quot; when asked for the following questions.) &lt;br /&gt;
** Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) &#039;&#039;&#039;none&#039;&#039;&#039;&lt;br /&gt;
** Enter where to store configs (/media/ or &#039;none&#039;) &#039;&#039;&#039;none&#039;&#039;&#039;&lt;br /&gt;
** The location of the package cache &#039;&#039;&#039;none&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Base configuration is complete with the above step. Refer to the [[#Alternate courses of action|alternate courses of action]] to proceed further.&lt;br /&gt;
&lt;br /&gt;
=== setup-alpine based System Disk Install ===  &lt;br /&gt;
&lt;br /&gt;
If you have &#039;&#039;&#039; entire hard disk(s)&#039;&#039;&#039; for Alpine Linux and [[Setting_up_disks_manually#Default_Layout|default layout]] is acceptable to you, at the final step of [[#Base configuration|base configuration]] do not choose &#039;&#039;&#039;none&#039;&#039;&#039; for the prompts in the &#039;&#039;&#039;Disk Mode&#039;&#039;&#039;.&lt;br /&gt;
 &lt;br /&gt;
* At the &#039;&#039;&#039;Disk Mode&#039;&#039;&#039; stage, &#039;&#039;&#039;sda&#039;&#039;&#039; or relevant disk(s) must be chosen in the below screen:&lt;br /&gt;
* Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) &#039;&#039;&#039;sda&#039;&#039;&#039;&lt;br /&gt;
* Confirmation for the chosen disk(s) appears. &#039;&#039;The following disk is selected:&#039;&#039; &#039;&#039;&#039;sda    (128.0 GB JMicron  Tech ).&#039;&#039;&#039; &lt;br /&gt;
* For automatic RAID configuration, you can select multiple disks as explained in [[Setting_up_disks_manually#Default_Layout|default layout]] section.&lt;br /&gt;
* Pay close attention and verify that the disk(s) matches your requirement. Answering &#039;&#039;&#039;none&#039;&#039;&#039; in the next step or pressing &#039;&#039;&#039;Ctrl+c&#039;&#039;&#039; will exit/abort the installation process.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Warning| If you enter &#039;&#039;&#039;sys&#039;&#039;&#039; in the next step, data on the chosen disk(s) will be overwritten! No further questions will be asked. Proceed only if you are 100% sure.}}&lt;br /&gt;
* How would you like to use it? (&#039;sys&#039;, &#039;data&#039;, &#039;lvm&#039; or &#039;?&#039; for help) &#039;&#039;&#039;sys&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;sys&#039;&#039;&#039; is chosen, the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script will complete the traditional hard-disk installation of Alpine Linux on the chosen disk as per [[Setting_up_disks_manually#Default_Layout|default layout]].  Once the installation is complete, you can skip the next steps and proceed to [[#Reboot|reboot]] the system to [[#Completing_the_installation|complete the installation]].&lt;br /&gt;
&lt;br /&gt;
=== Custom partitioning  ===&lt;br /&gt;
&lt;br /&gt;
Refer [[Setting up disks manually|Setting up disks manually]] page for specific configurations related to [[Setting_up_disks_manually#RAID|RAID]], [[Setting_up_disks_manually#Encryption|encryption]], [[Setting_up_disks_manually#LVM|LVM]], etc. as well as to [[Setting_up_disks_manually#Manual_partitioning|manually partition]] the harddisk for &amp;quot;sys&amp;quot; mode install using [[Setting_up_disks_manually#Custom_Layout|custom layout]].&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;
=== Preparing for the first boot ===&lt;br /&gt;
If [[#System_Disk_Mode|System Disk Mode]] of installation was performed, ignore this section and proceed to [[#Reboot|reboot]].&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 {{ic|lsblk}} (after installing it with {{ic|apk add {{pkg|lsblk}}}}) and/or {{ic|blkid}}, 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 [[Alpine_setup_scripts#setup-bootable|setup-bootable]].&lt;br /&gt;
&lt;br /&gt;
Once everything is in place, save your customized configuration with {{ic|lbu commit}} before rebooting.&lt;br /&gt;
&lt;br /&gt;
=== Reboot ===&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 {{ic|poweroff}} or {{ic|reboot}}. Login into the new system with the root account.&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;
== Custom Installation Instructions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This has to be moved to headless installation page --&amp;gt;&lt;br /&gt;
Custom-made headless apkovl can be 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;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
Specific topics should be kept on separate pages and manageable category-pages only must get listed with direct reference on this general page.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/macmpi/alpine-linux-headless-bootstrap/ Bootstrap Alpine Linux on a headless system] using pre-built &amp;lt;code&amp;gt;apkovl&amp;lt;/code&amp;gt; overlay file.&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;
* [[Netboot Alpine Linux using iPXE]]&lt;br /&gt;
* [[:Category:Virtualization|Virtualization]]&lt;br /&gt;
&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;
{{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], or [https://wiki.gentoo.org/wiki/ Gentoo wiki] 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;
&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]], {{:Daily driver guide}} 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;
=== Daily driver guide  ===&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
Any topic related to configuring Alpine as Desktop workstation i.e as a daily driver must go to the [[Daily driver guide]] which is called below. Tutorial and How To should go to [[Tutorials_and_Howtos]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{:Daily driver guide}}&lt;br /&gt;
&lt;br /&gt;
=== Other topics ===&lt;br /&gt;
&lt;br /&gt;
Topics not strictly related to using Alpine Linux as desktop are listed below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
  * This section is meant to cover topics not related to Using Alpine as daily driver or as desktop workstation as there is already [[Daily driver guide]] and the Handbook. Please refer to the comment at the beginning of this wiki [[#Post-Installation]]. &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Upgrading Alpine|Upgrade your OS]], when a new version is [https://www.alpinelinux.org/releases/ released].&lt;br /&gt;
* [[Change default shell]]&lt;br /&gt;
* [[Tutorials_and_Howtos#Networking_2|Setting up Networking]] &#039;&#039;(including non-standard configurations)&#039;&#039;&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;
* [[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;
* [[Hosting services on Alpine]] &#039;&#039;(links to several mail/web/ssh server setup pages)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials and Howtos]]&lt;br /&gt;
* [[Alpine_Linux:FAQ|FAQs]]&lt;br /&gt;
* [[Comparison with other distros]] &#039;&#039;(how common things are done on Alpine)&#039;&#039;&lt;br /&gt;
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] &#039;&#039;(to collaborate on this documentation)&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Armarmgc</name></author>
	</entry>
</feed>