<?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=PlumpPot</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=PlumpPot"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/PlumpPot"/>
	<updated>2026-04-05T18:59:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=32192</id>
		<title>Polkit</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=32192"/>
		<updated>2026-03-27T20:53:07Z</updated>

		<summary type="html">&lt;p&gt;PlumpPot: Remove trailing whitespace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://polkit.pages.freedesktop.org/polkit/polkit.8.html Polkit] is an authorization manager which is used for allowing unprivileged processes to speak to privileged processes through some form of inter-process communication mechanism like [[D-Bus]]. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Install and configure [[D-Bus#Installation|D-Bus]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For graphical applications, polkit relies on [[Elogind|elogind]] or [[Seatd]] to determine the identity of the user making a request. To use the full features of polkit, [[#Using polkit with elogind|using polkit with elogind]] is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with elogind ===&lt;br /&gt;
&lt;br /&gt;
For a feature-rich [[Desktop environments and Window managers|desktop]] experience, use polkit with [[Elogind|elogind]]. Features like [[#Authentication agents|authentication agents]] can be used only with elogind. Install the {{Pkg|polkit-elogind}} package and enable the {{ic|polkit}} service using [[OpenRC]].&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit-elogind&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Proceed to configure [[Elogind|elogind]], if not done already.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with seatd ===&lt;br /&gt;
&lt;br /&gt;
For a minimal desktop like [[Sway]], polkit can be used with [[Seatd#Polkit|seatd with certain limitations]]. With Seatd, polkit rules can only evaluate group membership, resulting in a &#039;yes&#039; or &#039;no&#039; decision. Graphical, session aware [[#Authentication agents|authentication agents]] are not supported.  &lt;br /&gt;
&lt;br /&gt;
To proceed to use polkit with seatd, install the {{Pkg|polkit}} package and enable the {{ic|polkit}} service using [[OpenRC]]: {{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Authentication agents ==&lt;br /&gt;
&lt;br /&gt;
Polkit authentication agent integration helps coordinate the display of a password prompt to the active and local users. &lt;br /&gt;
When an unprivileged user attempts to access a privileged location (such as by typing admin:// in the address bar of a [[File_management#File_managers|File Manager]]), when the appropriate polkit policy requires administrative authentication, a password dialogue will typically appear. &lt;br /&gt;
&lt;br /&gt;
{{Warning|Authentication agents will work only when [[PAM]] is properly set up and [[#Using polkit with elogind|polkit is used with elogind]].}}&lt;br /&gt;
&lt;br /&gt;
Some of the authentication agents available in Alpine linux is listed below:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|xfce-polkit}}&lt;br /&gt;
* {{Pkg|mate-polkit}}&lt;br /&gt;
* {{Pkg|polkit-gnome}}&lt;br /&gt;
* {{Pkg|polkit-kde-agent-1}}&lt;br /&gt;
&lt;br /&gt;
For [[Xfce]], install {{Pkg|xfce-polkit}} as follows:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add xfce-polkit}}&lt;br /&gt;
&lt;br /&gt;
== Polkit rule files ==&lt;br /&gt;
&lt;br /&gt;
The following example rule files have been provided to show the limitations of [[#Using polkit with seatd|seatd]].&lt;br /&gt;
&lt;br /&gt;
Ensure that correct permissions are set for the rule files. For example, for the rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}}:{{Cmd|&amp;lt;nowiki&amp;gt;# chown root:root /etc/polkit-1/rules.d/50-udisks.rules&lt;br /&gt;
# chmod 644 /etc/polkit-1/rules.d/50-udisks.rules&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Example1 ===&lt;br /&gt;
&lt;br /&gt;
A sample polkit rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}} which allow [[File_management#Automounting_removable_storage|automatic mounting of removable storage]] based on being a member of &#039;&#039;&#039;disk&#039;&#039;&#039; or &#039;&#039;&#039;storage&#039;&#039;&#039; group. This rule depends only on group membership which works with seatd: {{cat|/etc/polkit-1/rules.d/50-udisks.rules|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
polkit.addRule(function(action, subject) {&lt;br /&gt;
    if ((subject.isInGroup(&amp;quot;disk&amp;quot;) || subject.isInGroup(&amp;quot;storage&amp;quot;)) &amp;amp;&amp;amp;&lt;br /&gt;
        (action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount-system&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.filesystem-unmount-others&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.eject-media&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.encrypted-unlock&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.power-off-drive&amp;quot;)) {&lt;br /&gt;
        return polkit.Result.YES;&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}} &lt;br /&gt;
&lt;br /&gt;
The above polkit rule file is fully supported when used with both [[#Using polkit with seatd|seatd]] and [[#Using polkit with elogind|Elogind]].&lt;br /&gt;
&lt;br /&gt;
=== Example2 ===&lt;br /&gt;
&lt;br /&gt;
[[elogind|Elogind]] is required for &amp;quot;subject.active&amp;quot; rules and no AUTH_ADMIN, since polkit agents need POLKIT_IS_SUBJECT. Given below is a sample polkit rule file {{Path|/etc/polkit-1/rules.d/51-require-active-session.rules}} which allow only active local sessions to suspend:{{Cat|/etc/polkit-1/rules.d/51-require-active-session.rules|&amp;lt;nowiki&amp;gt; &lt;br /&gt;
    polkit.addRule(function(action, subject) {&lt;br /&gt;
        if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot; &amp;amp;&amp;amp;&lt;br /&gt;
            subject.active) {&lt;br /&gt;
            return polkit.Result.YES;&lt;br /&gt;
        } else if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot;) {&lt;br /&gt;
            return polkit.Result.NO; // Or polkit.Result.AUTH_ADMIN to prompt for password&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}     &lt;br /&gt;
&lt;br /&gt;
The above rule file depends on &#039;&#039;subject.active&#039;&#039; which is supported only when [[#Using polkit with elogind|polkit is used with Elogind]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://polkit.pages.freedesktop.org/polkit/polkit.8.html polkit Architecture]&lt;br /&gt;
* [https://github.com/polkit-org/polkit polkit github page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Polkit  Arch wiki Polkit page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Running_GUI_applications_as_root Arch wiki Running GUI applications as root]&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>PlumpPot</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Using_an_answerfile_with_setup-alpine&amp;diff=32191</id>
		<title>Using an answerfile with setup-alpine</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Using_an_answerfile_with_setup-alpine&amp;diff=32191"/>
		<updated>2026-03-27T20:46:49Z</updated>

		<summary type="html">&lt;p&gt;PlumpPot: Fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To perform an Alpine Linux [[Installation|installation]] that approaches being fully non-interactive, an answerfile can be created and used to preprogram various answers to the questions prompted by the [[Alpine_configuration_management_scripts#setup-alpine|setup-alpine]] script. [[Alpine_configuration_management_scripts#Environment_Variables|Environment variables]] can be added to configure the behavior of any given utility called by the script. &lt;br /&gt;
&lt;br /&gt;
A fully non-interactive {{ic|setup-alpine}} installation would entail replacing the prompt for a root password with an empty password, and suppressing the verification prompt to erase the target disk.  This could only be achieved if {{ic|setup-alpine}} were run by combining both facilities above ­– i.e. an answerfile and a certain environment variable considered below – plus an additional {{ic|setup-alpine}} switch for an empty password.  These prompts serve as safety and security guards, and their suppression would &#039;&#039;&#039;not be recommended&#039;&#039;&#039; in general use.&lt;br /&gt;
&lt;br /&gt;
== Creating an initial answerfile ==&lt;br /&gt;
&lt;br /&gt;
To get an quick start with setup-alpine answerfiles, a starter answerfile can be generated with:&lt;br /&gt;
{{Cmd|setup-alpine -c &amp;lt;var&amp;gt;PATH_TO_FILENAME&amp;lt;/var&amp;gt;}}&lt;br /&gt;
At the time of writing this, the previous command will result in output in the specified &amp;lt;var&amp;gt;PATH_TO_FILENAME&amp;lt;/var&amp;gt;:&lt;br /&gt;
{{Cat|PATH_TO_FILENAME|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Example answer file for setup-alpine script&lt;br /&gt;
# If you don&#039;t want to use a certain option, then comment it out&lt;br /&gt;
&lt;br /&gt;
# Use US layout with US variant&lt;br /&gt;
# KEYMAPOPTS=&amp;quot;us us&amp;quot;&lt;br /&gt;
KEYMAPOPTS=none&lt;br /&gt;
&lt;br /&gt;
# Set hostname to &#039;alpine&#039;&lt;br /&gt;
HOSTNAMEOPTS=alpine&lt;br /&gt;
&lt;br /&gt;
# Set device manager to mdev&lt;br /&gt;
DEVDOPTS=mdev&lt;br /&gt;
&lt;br /&gt;
# Contents of /etc/network/interfaces&lt;br /&gt;
INTERFACESOPTS=&amp;quot;auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
hostname alpine-test&lt;br /&gt;
&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Search domain of example.com, Google public nameserver&lt;br /&gt;
# DNSOPTS=&amp;quot;-d example.com 8.8.8.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Set timezone to UTC&lt;br /&gt;
#TIMEZONEOPTS=&amp;quot;UTC&amp;quot;&lt;br /&gt;
TIMEZONEOPTS=none&lt;br /&gt;
&lt;br /&gt;
# set http/ftp proxy&lt;br /&gt;
#PROXYOPTS=&amp;quot;http://webproxy:8080&amp;quot;&lt;br /&gt;
PROXYOPTS=none&lt;br /&gt;
&lt;br /&gt;
# Add first mirror (CDN) - Option -1&lt;br /&gt;
# Enable the community repo - Option -c&lt;br /&gt;
APKREPOSOPTS=&amp;quot;-1 -c&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Create admin user&lt;br /&gt;
USEROPTS=&amp;quot;-a -u -g audio,input,video,netdev juser&amp;quot;&lt;br /&gt;
#USERSSHKEY=&amp;quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com&amp;quot;&lt;br /&gt;
#USERSSHKEY=&amp;quot;https://example.com/juser.keys&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Install Openssh&lt;br /&gt;
SSHDOPTS=openssh&lt;br /&gt;
#ROOTSSHKEY=&amp;quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com&amp;quot;&lt;br /&gt;
#ROOTSSHKEY=&amp;quot;https://example.com/juser.keys&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Use openntpd&lt;br /&gt;
# NTPOPTS=&amp;quot;openntpd&amp;quot;&lt;br /&gt;
NTPOPTS=none&lt;br /&gt;
&lt;br /&gt;
# Use /dev/sda as a sys disk&lt;br /&gt;
# DISKOPTS=&amp;quot;-m sys /dev/sda&amp;quot;&lt;br /&gt;
DISKOPTS=none&lt;br /&gt;
&lt;br /&gt;
# Setup storage with label APKOVL for config storage&lt;br /&gt;
#LBUOPTS=&amp;quot;LABEL=APKOVL&amp;quot;&lt;br /&gt;
LBUOPTS=none&lt;br /&gt;
&lt;br /&gt;
#APKCACHEOPTS=&amp;quot;/media/LABEL=APKOVL/cache&amp;quot;&lt;br /&gt;
APKCACHEOPTS=none&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
When using answerfile, be sure to edit the file&#039;s contents to your needs. Comment out variables you wish not to be set.&lt;br /&gt;
Be sure that the uncommented variables have valid values set to your preference. Once you are satisfied with the answerfile contents, this how is to use it:&lt;br /&gt;
{{Cmd|setup-alpine -f &amp;lt;var&amp;gt;PATH_TO_FILENAME&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Answerfile Variables ==&lt;br /&gt;
&lt;br /&gt;
The variables in the answerfile alter the arguments passed to the setup-* scripts that are called out to from setup-alpine. These are:&lt;br /&gt;
* [[Alpine_setup_scripts#setup-keymap|&amp;lt;code&amp;gt;setup-keymap&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: KEYMAPOPTS=&amp;quot;&amp;lt;em&amp;gt;LAYOUT&amp;lt;/em&amp;gt; &amp;lt;em&amp;gt;VARIANT&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-hostname|&amp;lt;code&amp;gt;setup-hostname&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: HOSTNAMEOPTS=&amp;quot;&amp;lt;em&amp;gt;HOSTNAME&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-devd|&amp;lt;code&amp;gt;setup-devd&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: DEVDOPTS=&amp;quot;&amp;lt;em&amp;gt;DEVD&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: The choices are mdev (from busybox), mdevd (standalone), and udev (from eudev).&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-interfaces|&amp;lt;code&amp;gt;setup-interfaces&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: INTERFACEOPTS=&amp;quot;&#039;&#039;file contents to put in /etc/network/interfaces&#039;&#039;&amp;quot;&lt;br /&gt;
::: This will be used as input to the setup-interfaces command.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-dns|&amp;lt;code&amp;gt;setup-dns&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: DNSOPTS=&amp;quot;-d &amp;lt;em&amp;gt;DOMAIN&amp;lt;/em&amp;gt; &#039;&#039;IP_ADDR&#039;&#039;&lt;br /&gt;
::: Use -d to specify search domain. Use &amp;lt;em&amp;gt;IP_ADDR&amp;lt;/em&amp;gt; to specify DNS servers to use (mutliple allowed).&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-timezone|&amp;lt;code&amp;gt;setup-timezone&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: TIMEZONEOPTS=&amp;quot;&amp;lt;em&amp;gt;ZONE&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify the timezone, based on files relative to /usr/share/zoneinfo.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-proxy|&amp;lt;code&amp;gt;setup-proxy&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: PROXYOPTS=&amp;quot;&amp;lt;em&amp;gt;PROXY_URL&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify the URL for proxy to use; eg http://webproxy:8080.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-ntp|&amp;lt;code&amp;gt;setup-ntp&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: NTPOPTS=&amp;quot;&amp;lt;em&amp;gt;NTP_DAEMON&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: The choices are busybox, openntpd, chrony, and none.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-apkrepos|&amp;lt;code&amp;gt;setup-apkrepos&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: APKREPOSPTS=&amp;quot;&#039;&#039;setup-apkrepos options&#039;&#039;&amp;quot;&lt;br /&gt;
::: Specify command line options for setup-apkrepos:&lt;br /&gt;
::: {{Cat|setup-apkrepos -h|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
usage: setup-apkrepos [-ch] [-f|-r|-1|REPO...]&lt;br /&gt;
       setup-apkrepos -o&lt;br /&gt;
&lt;br /&gt;
Setup apk repositories&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -c  Enable the community repo&lt;br /&gt;
 -f  Detect and add fastest mirror&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -o  Only enable a community repo for every defined repo&lt;br /&gt;
 -r  Add a random mirror and do not prompt&lt;br /&gt;
 -1  Add first mirror on the list (normally a CDN)&lt;br /&gt;
&lt;br /&gt;
Option -o cannot be used with options -c, -f, -r or -1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-user|&amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: USEROPTS=&amp;quot;&#039;&#039;setup-user options&#039;&#039;&amp;quot;&lt;br /&gt;
::: Specify setup-user options:&lt;br /&gt;
::: {{Cat|setup-user -h|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
usage: setup-user [-h] [-a] [-u] [-f FULLNAME] [-g GROUPS] [-k SSHKEY] [USERNAME]&lt;br /&gt;
&lt;br /&gt;
Create user account&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -a  Create admin user. Add to wheel group and set up doas&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -f  Set full name for user&lt;br /&gt;
 -g  Comma or space separated list of groups to add user to&lt;br /&gt;
 -k  ssh key or URL to ssh key (eg. https://gitlab.alpinelinux.org/user.keys)&lt;br /&gt;
     or &#039;none&#039; for no key&lt;br /&gt;
 -u  Unlock the user automatically (eg. creating the user non-interactively&lt;br /&gt;
     with an ssh key for login)&lt;br /&gt;
&lt;br /&gt;
If USERNAME is not specified user will be prompted.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
:: USERSSHKEY=&amp;quot;&amp;lt;em&amp;gt;PUBKEY&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;URL&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify the contents or url to ssh public key to use as user&#039;s login key.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-sshd|&amp;lt;code&amp;gt;setup-sshd&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: SSHDOPTS=&amp;quot;&amp;lt;em&amp;gt;SSHD&amp;lt;/em&amp;gt;&lt;br /&gt;
::: The choice of ssh daemon; one of openssh, dropbear, or none.&lt;br /&gt;
:: ROOTSSHKEY=&amp;quot;&amp;lt;em&amp;gt;PUBKEY&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;URL&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify the contents or url to ssh public key to use as root user&#039;s login key.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-xen-dom0|&amp;lt;code&amp;gt;setup-xen-dom0&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: XENDOM0OPTS=&amp;quot;&amp;lt;em&amp;gt;PACKAGES&amp;lt;/em&amp;gt;&lt;br /&gt;
::: Specify additional packages to install along with the xen package.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-disk|&amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: DISKOPTS=&amp;quot;&#039;&#039;setup-disk options&#039;&#039;&amp;quot;&lt;br /&gt;
::: Specify setup-disk options:&lt;br /&gt;
::: {{Cat|setup-disk -h|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
usage: setup-disk [-hLqrve] [-k kernelflavor] [-m MODE] [-o apkovl] [-s SWAPSIZE]&lt;br /&gt;
                  [-w FILE] [MOUNTPOINT | DISKDEV...]&lt;br /&gt;
&lt;br /&gt;
Install alpine on harddisk.&lt;br /&gt;
&lt;br /&gt;
If MOUNTPOINT is specified, then do a traditional disk install with MOUNTPOINT&lt;br /&gt;
as root.&lt;br /&gt;
&lt;br /&gt;
If DISKDEV is specified, then use the specified disk(s) without asking. If&lt;br /&gt;
multiple disks are specified then set them up in a RAID array. If there are&lt;br /&gt;
more than 2 disks, then use raid level 5 instead of raid level 1.&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -e  Encrypt disk&lt;br /&gt;
 -m  Use disk for MODE without asking, where MODE is either &#039;data&#039; or &#039;sys&#039;&lt;br /&gt;
 -o  Restore system from given apkovl file&lt;br /&gt;
 -k  Use kernelflavor instead of lts&lt;br /&gt;
 -L  Use LVM to manage partitions&lt;br /&gt;
 -q  Exit quietly if no disks are found&lt;br /&gt;
 -r  Enable software raid1 with single disk&lt;br /&gt;
 -s  Use SWAPSIZE MB instead of autodetecting swap size (Use 0 to disable swap)&lt;br /&gt;
 -v  Be more verbose about what is happening&lt;br /&gt;
 -w  Write selected install mode to FILE&lt;br /&gt;
&lt;br /&gt;
If BOOTLOADER is specified, the specified bootloader will be used.&lt;br /&gt;
If no bootloader is specified, the default bootloader is syslinux(extlinux)&lt;br /&gt;
except when EFI is detected or explicitly set by USE_EFI which will select grub.&lt;br /&gt;
Supported bootloaders are: grub, syslinux, zipl, raspberrypi-bootloader, u-boot, none&lt;br /&gt;
&lt;br /&gt;
If KERNELOPTS is specified, it will be appended to the kernel boot parameters.&lt;br /&gt;
Default is: quiet&lt;br /&gt;
&lt;br /&gt;
If DISKLABEL is specified, the specified partition label will be used.&lt;br /&gt;
if no partition label is specified, the default label will be dos&lt;br /&gt;
except when EFI is detected or explicitly set by USE_EFI which will select gpt.&lt;br /&gt;
Supported partition labels are: dos, gpt&lt;br /&gt;
&lt;br /&gt;
If BOOTFS, ROOTFS, VARFS are specified, then format a partition with specified&lt;br /&gt;
filesystem. If not specified, the default filesystem is ext4.&lt;br /&gt;
Supported filesystems for&lt;br /&gt;
  boot: ext2, ext3, ext4, btrfs, xfs, vfat(EFI)&lt;br /&gt;
  root: ext2, ext3, ext4, btrfs, xfs&lt;br /&gt;
   var: ext2, ext3, ext4, btrfs, xf&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
:: In addition to the environment variables described above, also relavent are:&lt;br /&gt;
:: BOOT_SIZE=&amp;quot;&amp;lt;em&amp;gt;SIZE_IN_MIB&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
:: SWAP_SIZE=&amp;quot;&amp;lt;em&amp;gt;SIZE_IN_MIB&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
:: ROOT_SIZE=&amp;quot;&amp;lt;em&amp;gt;SIZE_IN_MIB&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: If lvm is used, SWAP_SIZE and ROOT_SIZE may specified as percentage of volume group, for example:&lt;br /&gt;
::: ROOT_SIZE=&amp;quot;50%VG&amp;quot;&lt;br /&gt;
:: &lt;br /&gt;
* [[Alpine_setup_scripts#setup-lbu|&amp;lt;code&amp;gt;setup-lbu&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: LBUOPTS=&amp;quot;&amp;lt;em&amp;gt;MEDIA&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify option mountpoint under /media.&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_setup_scripts#setup-apkcache|&amp;lt;code&amp;gt;setup-apkcache&amp;lt;/code&amp;gt;]]&lt;br /&gt;
:: APKCACHEOPTS=&amp;quot;&amp;lt;em&amp;gt;DIR&amp;lt;/em&amp;gt;&amp;quot;&lt;br /&gt;
::: Specify directory to setup for apk caching.&lt;br /&gt;
&lt;br /&gt;
== Environment variables and setup-alpine ==&lt;br /&gt;
&lt;br /&gt;
Another way to achieve the same&lt;br /&gt;
thing is to set these variables in the environment, either exported or on the commandline.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fully non-interactive&#039;&#039;&#039; {{ic|setup-disk}}: The {{ic|setup-disk}} section still prompts to confirm whether to erase your target stated in the answerfile.   To avoid this, [[Alpine_configuration_management_scripts#Environment_Variables|&#039;&#039;&#039;use the following with caution&#039;&#039;&#039;]], as it is bound to &#039;&#039;&#039;&#039;&#039;immediately erase the target media&#039;&#039;&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;ERASE_DISKS=&amp;lt;/nowiki&amp;gt;&amp;lt;var&amp;gt;/path/to/targetmedia&amp;lt;/var&amp;gt; setup-alpine -f &amp;lt;var&amp;gt;/path/to/answerfile&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
It is not necessary to use an answerfile to get the same functionality.&lt;br /&gt;
{{Cmd|DISKOPTS{{=}}&amp;lt;q&amp;gt;-e -L -m sys /dev/sda&amp;lt;/q&amp;gt; ROOT_SIZE{{=}}&amp;lt;q&amp;gt;50&amp;amp;percnt;VG&amp;lt;/q&amp;gt; setup-alpine}}&lt;br /&gt;
The above command specifies to do a system disk install with lvm on encrypted partition, and that the root&lt;br /&gt;
logical volume should be 50% of the volume group.&lt;br /&gt;
&lt;br /&gt;
This method is probably not realistic for setting many variables, but for using just a few may be justified.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine configuration management scripts#Environment Variables|Environment Variables]]&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>PlumpPot</name></author>
	</entry>
</feed>