<?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=Monperrus</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=Monperrus"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Monperrus"/>
	<updated>2026-04-26T03:48:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_configuration_management_scripts&amp;diff=12987</id>
		<title>Alpine configuration management scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_configuration_management_scripts&amp;diff=12987"/>
		<updated>2016-10-03T06:29:36Z</updated>

		<summary type="html">&lt;p&gt;Monperrus: /* setup-disk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page summarizes the low-level behavior of the {{Path|/sbin/setup-*}} scripts on the Alpine ISO (and in a normal Alpine install).&lt;br /&gt;
&lt;br /&gt;
== setup-alpine ==&lt;br /&gt;
&lt;br /&gt;
For a higher-level walkthrough (using the &amp;quot;sys&amp;quot; installmode), see [[Install to disk|Basic HDD install]].&lt;br /&gt;
&lt;br /&gt;
This script accepts the following command-line switches (you can run &amp;lt;code&amp;gt;setup-alpine -h&amp;lt;/code&amp;gt; to see a usage message).&lt;br /&gt;
&lt;br /&gt;
{{Define|-a|Create an overlay file: this creates a temporary directory and saves its location in ROOT; however, the script doesn&#039;t export this variable so I think this feature isn&#039;t currently functional.}}&lt;br /&gt;
;-c &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&lt;br /&gt;
:Create a new &amp;quot;answerfile&amp;quot;, with default choices. You can edit the file and then invoke &amp;lt;code&amp;gt;setup-alpine -f &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;-f &amp;lt;var&amp;gt;answerfile&amp;lt;/var&amp;gt;&lt;br /&gt;
:Use an existing &amp;quot;answerfile&amp;quot;, which may override some or all of the interactive prompts.&lt;br /&gt;
{{Define|-q|Run in &amp;quot;quick mode.&amp;quot; See below for details.}}&lt;br /&gt;
&lt;br /&gt;
The script&#039;s behavior is to do the following, in order. Bracketed options represent extra configuration choices that can be supplied when running the auxiliary setup scripts manually, or by supplying an &amp;quot;answerfile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;setup-keymap&amp;lt;/code&amp;gt; [us us]&lt;br /&gt;
# [[#setup-hostname|setup-hostname]] [-n alpine-test]&lt;br /&gt;
# [[#setup-interfaces|setup-interfaces]] [-i &amp;lt; interfaces-file]&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/init.d/networking --quiet start &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
# if none of the networking interfaces were configured using dhcp, then: [[#setup-dns|setup-dns]] [-d example.com -n &amp;quot;8.8.8.8 [...]&amp;quot;]&lt;br /&gt;
# set the root password&lt;br /&gt;
# if not in quick mode, then: [[#setup-timezone|setup-timezone]] [-z UTC | -z America/New_York | -p EST+5]&lt;br /&gt;
# enable the new hostname (&amp;lt;code&amp;gt;/etc/init.d/hostname --quiet restart&amp;lt;/code&amp;gt;)&lt;br /&gt;
# add &amp;lt;code&amp;gt;networking&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;urandom&amp;lt;/code&amp;gt; to the &#039;&#039;&#039;boot&#039;&#039;&#039; rc level, and &amp;lt;code&amp;gt;acpid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cron&amp;lt;/code&amp;gt; to the &#039;&#039;&#039;default&#039;&#039;&#039; rc level, and start the &#039;&#039;&#039;boot&#039;&#039;&#039; and &#039;&#039;&#039;default&#039;&#039;&#039; rc services&lt;br /&gt;
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt;, and update {{Path|/etc/hosts}}&lt;br /&gt;
# [[#setup-proxy|setup-proxy]] [-q &amp;lt;nowiki&amp;gt;&amp;quot;http://webproxy:8080&amp;quot;&amp;lt;/nowiki&amp;gt;], and activate proxy if it was configured&lt;br /&gt;
# &amp;lt;code&amp;gt;setup-apkrepos&amp;lt;/code&amp;gt; [-r (to select a mirror randomly)]&lt;br /&gt;
# if not in quick mode, then: [[#setup-sshd|setup-sshd]] [-c openssh | dropbear | none]&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;setup-ntp&amp;lt;/code&amp;gt; [-c chrony | openntpd | busybox | none]&lt;br /&gt;
# if not in quick mode, then: &amp;lt;code&amp;gt;DEFAULT_DISK=none&amp;lt;/code&amp;gt; [[#setup-disk|setup-disk]] &amp;lt;code&amp;gt;-q&amp;lt;/code&amp;gt; [-m data /dev/sda]&lt;br /&gt;
# if installation mode selected during setup-disk was &amp;quot;data&amp;quot; instead of &amp;quot;sys&amp;quot;, then: &amp;lt;code&amp;gt;setup-lbu&amp;lt;/code&amp;gt; [/media/sdb1]&lt;br /&gt;
# if installation mode selected during setup-disk was &amp;quot;data&amp;quot; instead of &amp;quot;sys&amp;quot;, then: &amp;lt;code&amp;gt;setup-apkcache&amp;lt;/code&amp;gt; [/media/sdb1/cache | none]&lt;br /&gt;
&lt;br /&gt;
== setup-hostname ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-hostname&amp;lt;/code&amp;gt; [-h] [-n hostname]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-n&#039;&#039;&#039; &amp;lt;var&amp;gt;Specify hostname&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script allows quick and easy setup of the system hostname by writing it to {{Path|/etc/hostname}}.  The script prevents you from writing an invalid hostname (such as one that used invalid characters or starts with a &#039;-&#039; or is too long).&lt;br /&gt;
The script can be invoked manually or is called as part of the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
== setup-interfaces ==&lt;br /&gt;
{{Cmd|setup-interfaces [-i &amp;amp;lt; &amp;lt;var&amp;gt;interfaces-file&amp;lt;/var&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
Note that the contents of &amp;lt;var&amp;gt;interfaces-file&amp;lt;/var&amp;gt; has to be supplied as stdin, rather than naming the file as an additional argument. The contents should have the format of {{Path|/etc/network/interfaces}}, such as:&lt;br /&gt;
&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 &lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet dhcp&lt;br /&gt;
     hostname alpine-test&lt;br /&gt;
&lt;br /&gt;
== setup-dns ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-dns&amp;lt;/code&amp;gt; [-h] [-d domain name] [-n name server]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-d&#039;&#039;&#039; &amp;lt;var&amp;gt;specify search domain name&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-n&#039;&#039;&#039; &amp;lt;var&amp;gt;name server IP&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The setup-dns script is stored in {{Path|/sbin/setup-dns}} and allows quick and simple setup of DNS servers (and a DNS search domain if required).  Simply running &amp;lt;code&amp;gt;setup-dns&amp;lt;/code&amp;gt; will allow interactive use of the script, or the options can be specified.&lt;br /&gt;
&lt;br /&gt;
The information fed to this script is written to {{Path|/etc/resolv.conf}}&lt;br /&gt;
&lt;br /&gt;
Example usage: {{Cmd|setup-dns -d example.org -n 8.8.8.8}}&lt;br /&gt;
&lt;br /&gt;
Example {{Path|/etc/resolv.conf}}:&lt;br /&gt;
&lt;br /&gt;
 search example.org&lt;br /&gt;
 nameserver 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
It can be run manually but is also invoked in the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script unless interfaces are configured for DHCP.&lt;br /&gt;
&lt;br /&gt;
== setup-timezone ==&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-timezone&amp;lt;/code&amp;gt; [-z UTC | -z America/New_York | -p EST+5]&lt;br /&gt;
&lt;br /&gt;
Can pre-select the timezone using either of these switches:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-z&#039;&#039;&#039; &amp;lt;var&amp;gt;subfolder of&amp;lt;/var&amp;gt; {{Path|/usr/share/zoneinfo}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-p&#039;&#039;&#039; &amp;lt;var&amp;gt;POSIX TZ format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-proxy ==&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-proxy&amp;lt;/code&amp;gt; [-hq] [PROXYURL]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-q&#039;&#039;&#039; &amp;lt;var&amp;gt;Quiet mode&amp;lt;/var&amp;gt; prevents changes from taking effect until after reboot&lt;br /&gt;
&lt;br /&gt;
This script requests the system proxy to use in the form &amp;lt;code&amp;gt;http://&amp;lt;proxyurl&amp;gt;:&amp;lt;port&amp;gt;&amp;lt;/code&amp;gt; for example:&lt;br /&gt;
&amp;lt;code&amp;gt;http://10.0.0.1:8080&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set no system proxy use &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;.&lt;br /&gt;
This script exports the following environmental variables: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;http_proxy=$proxyurl&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;https_proxy=$proxyurl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ftp_proxy=$proxyurl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;$proxyurl&amp;lt;/code&amp;gt; is the value input.  &lt;br /&gt;
If &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt; was chosen then the value it is set to a blank value (and so no proxy is used).&lt;br /&gt;
&lt;br /&gt;
== setup-sshd ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-sshd&amp;lt;/code&amp;gt; [-h] [-c choice of SSH daemon]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-h&#039;&#039;&#039; &amp;lt;var&amp;gt;Show help&amp;lt;/var&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-c&#039;&#039;&#039; &amp;lt;var&amp;gt;SSH daemon&amp;lt;/var&amp;gt; where SSH daemon can be one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;openssh&amp;lt;/code&amp;gt; install the {{Pkg|openSSH}} daemon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dropbear&amp;lt;/code&amp;gt; install the {{Pkg|dropbear}} daemon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt; Do not install an SSH daemon&lt;br /&gt;
&lt;br /&gt;
Example usage: {{Cmd|setup-sshd -c dropbear}}&lt;br /&gt;
&lt;br /&gt;
The setup-sshd script is stored in {{Path|/sbin/setup-sshd}} and allows quick and simple setup of either the OpenSSH or Dropbear SSH daemon &amp;amp; client. &lt;br /&gt;
It can be run manually but is also invoked in the &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
== setup-disk ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;DEFAULT_DISK=none setup-disk -q&amp;lt;/code&amp;gt; [-m data | sys] [&amp;lt;var&amp;gt;mountpoint directory&amp;lt;/var&amp;gt; | /dev/sda ...]&lt;br /&gt;
&lt;br /&gt;
In &amp;quot;sys&amp;quot; mode, it&#039;s an installer, it permanently installs Alpine on the disk, in &amp;quot;data&amp;quot; mode, it provides a larger and persistent /var volume.&lt;br /&gt;
&lt;br /&gt;
This script accepts the following command-line switches:&lt;br /&gt;
&lt;br /&gt;
;-k &amp;lt;var&amp;gt;kernel flavor&amp;lt;/var&amp;gt;&lt;br /&gt;
;-o &amp;lt;var&amp;gt;apkovl file&amp;lt;/var&amp;gt;&lt;br /&gt;
:Restore system from &amp;lt;var&amp;gt;apkovl file&amp;lt;/var&amp;gt;&lt;br /&gt;
;-m data | sys&lt;br /&gt;
:Don&#039;t prompt for installation mode. With &#039;&#039;&#039;-m data&#039;&#039;&#039;, the supplied devices are formatted to use as a {{Path|/var}} volume.&lt;br /&gt;
{{Define|-r|Use RAID1 with a single disk (degraded mode)}}&lt;br /&gt;
{{Define|-L|Create and use volumes in a LVM group}}&lt;br /&gt;
;-s &amp;lt;var&amp;gt;swap size in MB&amp;lt;/var&amp;gt;&lt;br /&gt;
:Use 0 to disable swap&lt;br /&gt;
{{Define|-q|Exit quietly if no disks are found}}&lt;br /&gt;
{{Define|-v|Verbose mode}}&lt;br /&gt;
&lt;br /&gt;
The script also honors the following environment variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;BOOT_SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
:Size of the boot partition in MB; defaults to 100. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SWAP_SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
:Size of the swap volume in MB; set to 0 to disable swap. If not specified, will default to twice RAM, up to 4096, but won&#039;t be more than 1/3 the size of the smallest disk, and if less than 64 will just be 0. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ROOTFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the / volume; defaults to ext4. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;BOOTFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the /boot volume; defaults to ext4. Only used if &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;VARFS&amp;lt;/code&amp;gt;&lt;br /&gt;
:Filesystem to use for the /var volume; defaults to ext4. Only used if &#039;&#039;&#039;-m data&#039;&#039;&#039; is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SYSROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
:Mountpoint to use when creating volumes and doing traditional disk install (&#039;&#039;&#039;-m sys&#039;&#039;&#039;). Defaults to {{Path|/mnt}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MBR&amp;lt;/code&amp;gt;&lt;br /&gt;
:Path of MBR binary code, defaults to {{Path|/usr/share/syslinux/mbr.bin}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Writes to /tmp/ovlfiles, /tmp/alpine-install-diskmode.out, and /tmp/sfdisk.out but that never seems to be used elsewhere. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Partitioning ===&lt;br /&gt;
&lt;br /&gt;
If you have complex partitioning needs, you can partition, format, and mount your volumes manually, then just supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;. Doing so implicitly behaves as though &#039;&#039;&#039;-m sys&#039;&#039;&#039; had also been specified.&lt;br /&gt;
&lt;br /&gt;
See [[Setting up disks manually]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RAID ====&lt;br /&gt;
&amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; will automatically build a RAID array if you supply the &#039;&#039;&#039;-r&#039;&#039;&#039; switch, or if you specify more than one device. The array will always be [https://en.m.wikipedia.org/wiki/Standard_RAID_levels#RAID_1 RAID1] (and [https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#The_version-0.90_Superblock_Format --metadata=0.90]) for the /boot volumes, but will be [https://en.m.wikipedia.org/wiki/Standard_RAID_levels#RAID_5 RAID5] (and [https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#The_version-1_Superblock_Format --metadata=1.2] for non-boot volumes when 3 or more devices are supplied.&lt;br /&gt;
&lt;br /&gt;
If you instead want to build your RAID array manually, see [[Setting up a software RAID array]]. Then format and mount the disks, and supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== LVM ====&lt;br /&gt;
&amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; will automatically build and use volumes in a LVM group if you supply the &#039;&#039;&#039;-L&#039;&#039;&#039; switch. The group and volumes created by the script will have the following names:&lt;br /&gt;
&lt;br /&gt;
* volume group: &#039;&#039;&#039;vg0&#039;&#039;&#039;&lt;br /&gt;
* swap volume: &#039;&#039;&#039;lv_swap&#039;&#039;&#039; (only created when swap size &amp;gt; 0)&lt;br /&gt;
* root volume: &#039;&#039;&#039;lv_root&#039;&#039;&#039; (only created when &#039;&#039;&#039;-m sys&#039;&#039;&#039; is specified or interactively selected)&lt;br /&gt;
* var volume: &#039;&#039;&#039;lv_var&#039;&#039;&#039; (only created when &#039;&#039;&#039;-m data&#039;&#039;&#039; is specified or interactively selected)&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;lv_var&#039;&#039;&#039; or &#039;&#039;&#039;lv_root&#039;&#039;&#039; volumes are created to occupy all remaining space in the volume group.&lt;br /&gt;
&lt;br /&gt;
If you need to change any of these settings, you can use &amp;lt;code&amp;gt;vgrename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;lvrename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;lvreduce&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;lvresize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you instead want to build your LVM system manually, see [[Setting up Logical Volumes with LVM]]. Then format and mount the disks, and supply the root mountpoint to &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=Setup-Disk Usage=&lt;br /&gt;
&lt;br /&gt;
usage: setup-disk [-hqr] [-k kernelflavor] [-m MODE] [-o apkovl] [-s SWAPSIZE]&lt;br /&gt;
		  [MOUNTPOINT | DISKDEV...]&lt;br /&gt;
&lt;br /&gt;
Install alpine on harddisk.&lt;br /&gt;
&lt;br /&gt;
If MOUNTPOINT is specified, then do a traditional disk install with MOUNTPOINT&lt;br /&gt;
as root.&lt;br /&gt;
&lt;br /&gt;
If DISKDEV is specified, then use the specified disk(s) without asking. If&lt;br /&gt;
multiple disks are specified then set them up in a RAID array. If there are&lt;br /&gt;
mode than 2 disks, then use raid level 5 instead of raid level 1.&lt;br /&gt;
&lt;br /&gt;
options:&lt;br /&gt;
 -h  Show this help&lt;br /&gt;
 -m  Use disk for MODE without asking, where MODE is either &#039;data&#039; or &#039;root&#039;&lt;br /&gt;
 -o  Restore system from given apkovl file&lt;br /&gt;
 -k  Use kernelflavor instead of $KERNEL_FLAVOR&lt;br /&gt;
 -L  Use LVM to manage partitions&lt;br /&gt;
 -q  Exit quietly if no disks are found&lt;br /&gt;
 -r  Enable software RAID1 with single disk&lt;br /&gt;
 -s  Use SWAPSIZE MB instead of $SWAP_SIZE MB for swap (Use 0 to disable swap)&lt;br /&gt;
 -v  Be more verbose about what is happening&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disk Install Styles==&lt;br /&gt;
&lt;br /&gt;
You can select between &#039;sys&#039; or &#039;data&#039;.&lt;br /&gt;
&lt;br /&gt;
sys:&lt;br /&gt;
  This mode is a traditional disk install. The following partitions will be&lt;br /&gt;
  created on the disk: /boot, / (filesystem root) and swap.&lt;br /&gt;
    &lt;br /&gt;
  This mode may be used for development boxes, desktops, virtual servers, etc.&lt;br /&gt;
&lt;br /&gt;
data:&lt;br /&gt;
  This mode uses your disk(s) for data storage, not for the operating system.&lt;br /&gt;
  The system itself will run from tmpfs (RAM).&lt;br /&gt;
&lt;br /&gt;
  Use this mode if you only want to use the disk(s) for a mailspool, databases,&lt;br /&gt;
  logs, etc.&lt;br /&gt;
&lt;br /&gt;
none:&lt;br /&gt;
  Run without installing to disk.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-bootable ==&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
Its purpose is to create media that boots into tmpfs by copying the contents of an ISO onto a USB key, CF, or similar media.&lt;br /&gt;
&lt;br /&gt;
For a higher-level walkthrough, see [[Create a Bootable USB#Creating_a_bootable_Alpine_Linux_USB_Stick_from_the_command_line|Creating a bootable Alpine Linux USB Stick from the command line]].&lt;br /&gt;
&lt;br /&gt;
This script accepts the following arguments and command-line switches (you can run &amp;lt;code&amp;gt;setup-bootable -h&amp;lt;/code&amp;gt; to see a usage message).&lt;br /&gt;
&lt;br /&gt;
{{Cmd|setup-bootable &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
The argument &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; can be a directory or an ISO (will be mounted to &amp;lt;code&amp;gt;MNT&amp;lt;/code&amp;gt; or {{Path|/mnt}}) or a URL (will be downloaded with &amp;lt;code&amp;gt;WGET&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;). The argument &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; can be a directory mountpoint, or will default to {{Path|/media/usb}} if not supplied.&lt;br /&gt;
&lt;br /&gt;
{{Define|-k|Keep alpine_dev in {{Path|syslinux.cfg}}; otherwise, replace with UUID.}}&lt;br /&gt;
{{Define|-u|Upgrade mode: keep existing {{Path|syslinux.cfg}} and don&#039;t run &amp;lt;code&amp;gt;syslinux&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Define|-f|Overwrite {{Path|syslinux.cfg}} even if &#039;&#039;&#039;-u&#039;&#039;&#039; was specified.}}&lt;br /&gt;
{{Define|-s|Force the running of &amp;lt;code&amp;gt;syslinux&amp;lt;/code&amp;gt; even if &#039;&#039;&#039;-u&#039;&#039;&#039; was specified.}}&lt;br /&gt;
{{Define|-v|Verbose mode}}&lt;br /&gt;
&lt;br /&gt;
The script will ensure that &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; are available; will copy the contents of &amp;lt;var&amp;gt;source&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt;, ensuring first that there&#039;s enough space; and unless &#039;&#039;&#039;-u&#039;&#039;&#039; was specified, will make &amp;lt;var&amp;gt;dest&amp;lt;/var&amp;gt; bootable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== setup-cryptswap ==&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;setup-cryptswap&amp;lt;/code&amp;gt; [&amp;lt;var&amp;gt;partition&amp;lt;/var&amp;gt; | none]&lt;br /&gt;
&lt;br /&gt;
{{Todo|Does this script still work? At what stage can it be run: only after setup-alpine?}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== setup-xorg-base ==&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
Installs the following packages: &amp;lt;code&amp;gt;xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Additional packages can be supplied as arguments to &amp;lt;code&amp;gt;setup-xorg-base&amp;lt;/code&amp;gt;. You might need, for example, some of: &amp;lt;code&amp;gt;xf86-input-synaptics xf86-video-&amp;lt;var&amp;gt;something&amp;lt;/var&amp;gt; xinit&amp;lt;/code&amp;gt;. For Qemu, see [[Qemu#Using_Xorg_inside_Qemu|Qemu]]. For Intel GPUs, see [[Intel Video]].&lt;br /&gt;
&lt;br /&gt;
== Documentation needed ==&lt;br /&gt;
&lt;br /&gt;
=== setup-xen-dom0 ===&lt;br /&gt;
&lt;br /&gt;
=== setup-gparted-desktop ===&lt;br /&gt;
Uses openbox.&lt;br /&gt;
&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
=== setup-mta ===&lt;br /&gt;
Uses ssmtp.&lt;br /&gt;
&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
=== setup-acf ===&lt;br /&gt;
This is a standalone script; it&#039;s not invoked by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; but must be run manually.&lt;br /&gt;
&lt;br /&gt;
This script was named &amp;lt;code&amp;gt;setup-webconf&amp;lt;/code&amp;gt; before Alpine 1.9 beta 4.&lt;br /&gt;
&lt;br /&gt;
See [[:Category:ACF|ACF pages]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== setup-ntp ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Monperrus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12986</id>
		<title>How to make a custom ISO image</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12986"/>
		<updated>2016-10-02T19:30:21Z</updated>

		<summary type="html">&lt;p&gt;Monperrus: improves structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document explains how to build a custom ISO image using the alpine-iso scripts.&lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
&lt;br /&gt;
First make sure we have the needed tools&lt;br /&gt;
{{Cmd|apk add alpine-sdk xorriso syslinux}}&lt;br /&gt;
&lt;br /&gt;
Then create signing keys (-i installs them in /etc/apk/keys which is required for later)&lt;br /&gt;
{{Cmd|abuild-keygen -i}}&lt;br /&gt;
&lt;br /&gt;
Clone (or update) the [http://git.alpinelinux.org/cgit/alpine-iso.git/ alpine-iso git repository].&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/alpine-iso}}&lt;br /&gt;
&lt;br /&gt;
== Core Configuration ==&lt;br /&gt;
&lt;br /&gt;
The alpine-iso scripts is a simple makefile which you need to feed with a &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; file and a &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; we specify&lt;br /&gt;
&lt;br /&gt;
;ALPINE_NAME&lt;br /&gt;
:name of iso image&lt;br /&gt;
&lt;br /&gt;
;ALPINE_VERSION&lt;br /&gt;
:(optional) version string. Will default to todays date.&lt;br /&gt;
&lt;br /&gt;
;KERNEL_FLAVOR&lt;br /&gt;
:(optional) either &#039;&#039;grsec&#039;&#039;, &#039;&#039;vserver&#039;&#039; or &#039;&#039;pae&#039;&#039;. Will default to grsec.&lt;br /&gt;
&lt;br /&gt;
;MODLOOP_EXTRA&lt;br /&gt;
:(optional) Extra kernel module packages for the modloop image. For example: &#039;&#039;dahdi-linux-vserver&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;APK_REPOS&lt;br /&gt;
:(optional) Path to addidtional apk repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039; is just a plaintext list of packages that should be included in the ISO image. You should always add &#039;&#039;alpine-base&#039;&#039; in there or the CD might not be able to boot. The dependencies for the packages will automatically be pulled in.&lt;br /&gt;
&lt;br /&gt;
== A rescue CD example ==&lt;br /&gt;
As an example, let us make a rescue ISO image with packages needed for rescue operations. We call it &#039;&#039;alpine-rescue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We create the &#039;&#039;alpine-rescue.conf.mk&#039;&#039; as follows:&lt;br /&gt;
 ALPINE_NAME   := alpine-rescue&lt;br /&gt;
 KERNEL_FLAVOR := grsec&lt;br /&gt;
 MODLOOP_EXTRA :=&lt;br /&gt;
&lt;br /&gt;
If you are going to use a custom kernel, don&#039;t forget to specify KERNEL_FLAVOR_DEFAULT which will set the default kernel to boot.&lt;br /&gt;
&lt;br /&gt;
And then the &#039;&#039;alpine-rescue.packages&#039;&#039; as:&lt;br /&gt;
 alpine-base&lt;br /&gt;
 bkeymaps&lt;br /&gt;
 openssh&lt;br /&gt;
 e2fsprogs&lt;br /&gt;
 mdadm&lt;br /&gt;
 lvm2&lt;br /&gt;
 parted&lt;br /&gt;
 debootstrap&lt;br /&gt;
 ntfs-3g&lt;br /&gt;
&lt;br /&gt;
{{Tip| Make sure your public keys are placed in /etc/apk/keys/ (example: root-xxxxxxxx.rsa.pub):&lt;br /&gt;
{{Cmd|ls /etc/apk/keys/}}&lt;br /&gt;
&lt;br /&gt;
Learn apk-tools to find your home-built apk&#039;s:&lt;br /&gt;
{{Cmd|echo &amp;quot;~/.cache/abuild/&amp;quot; &amp;gt;&amp;gt; /etc/apk/repositories}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make sure the apk index is up to date (so apk finds the packages):&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
We create the ISO image by telling the makefile the profile name. The makefile target is &#039;&#039;iso&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are building inside an LXC guest, use fakeroot:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;fakeroot make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To generate the sha1 sum we use the &#039;&#039;sha1&#039;&#039; make target.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue sha1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Package lists ==&lt;br /&gt;
&lt;br /&gt;
Beside the plaintext package lists in the git repository, there are more documented package lists contributed by Alpine users. Those lists can be transformed into a plaintext to use with &amp;lt;tt&amp;gt;alpine-iso&amp;lt;/tt&amp;gt; list with the simple python-based &amp;lt;tt&amp;gt;[http://git.alpinelinux.org/cgit/fab/alpine-iso/tree/config-builder.py config-builder]&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
So far the lists below are available (check [[:Category:ISO|here]] for more.)&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_mini|Alpine Mini]]&lt;br /&gt;
* [[Alpine_rescue|Alpine Rescue]]&lt;br /&gt;
* [[Alpine_security|Alpine Security]]&lt;br /&gt;
* [[Alpine SCST]]&lt;br /&gt;
&lt;br /&gt;
== Live Disk Setup with APKOVL ==&lt;br /&gt;
&lt;br /&gt;
Once you have customized your custom ISO, you can now setup the live environment to operate outside of the standard installer as follows:&lt;br /&gt;
&lt;br /&gt;
* Generate an APKOVL file with [[Alpine_local_backup|lbu]], &amp;lt;code&amp;gt;lbu ci&amp;lt;/code&amp;gt;&lt;br /&gt;
* Alpine ISO requires the OVL Volume to be hosted on a web server. Put the APKOVL file on a webserver and identify the url. &lt;br /&gt;
* Uncomment the &amp;lt;code&amp;gt;APKOVL&amp;lt;/code&amp;gt; line in the alpine flavor of your choice and set it to the address of your ovl volume.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Any packages you add to /etc/apk/world of your lbu will automatically be installed onto the live system image.&lt;br /&gt;
* If you don&#039;t have a web server you can run busybox&#039;s httpd temporarily - &amp;lt;code&amp;gt;busybox -p 127.0.0.1:80&amp;lt;/code&amp;gt;&lt;br /&gt;
* In general, &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt; will only handle files in &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt;, to customize this further, you need to add additional files.&lt;br /&gt;
* If you want to make a customized installer, you need to create &amp;lt;code&amp;gt;.default_boot_services&amp;lt;/code&amp;gt; which will cause &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; to create the defaults for the live image.&lt;br /&gt;
&lt;br /&gt;
== Testing your ISO image ==&lt;br /&gt;
&lt;br /&gt;
[[Qemu#Live_mode| Qemu]] is useful for a quick test of your created ISO image.&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:ISO]]&lt;/div&gt;</summary>
		<author><name>Monperrus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12981</id>
		<title>How to make a custom ISO image</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12981"/>
		<updated>2016-10-02T13:42:14Z</updated>

		<summary type="html">&lt;p&gt;Monperrus: add a missing step&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document explains how to build a custom ISO image using the alpine-iso scripts.&lt;br /&gt;
&lt;br /&gt;
First make sure we have the needed tools&lt;br /&gt;
{{Cmd|apk add alpine-sdk xorriso syslinux}}&lt;br /&gt;
&lt;br /&gt;
Then create signing keys (-i installs them in /etc/apk/keys which is required for later)&lt;br /&gt;
{{Cmd|abuild-keygen -i}}&lt;br /&gt;
&lt;br /&gt;
Clone (or update) the [http://git.alpinelinux.org/cgit/alpine-iso.git/ alpine-iso git repository].&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/alpine-iso}}&lt;br /&gt;
&lt;br /&gt;
The alpine-iso scripts is a simple makefile which you need to feed with a &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; file and a &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; we specify&lt;br /&gt;
&lt;br /&gt;
;ALPINE_NAME&lt;br /&gt;
:name of iso image&lt;br /&gt;
&lt;br /&gt;
;ALPINE_VERSION&lt;br /&gt;
:(optional) version string. Will default to todays date.&lt;br /&gt;
&lt;br /&gt;
;KERNEL_FLAVOR&lt;br /&gt;
:(optional) either &#039;&#039;grsec&#039;&#039;, &#039;&#039;vserver&#039;&#039; or &#039;&#039;pae&#039;&#039;. Will default to grsec.&lt;br /&gt;
&lt;br /&gt;
;MODLOOP_EXTRA&lt;br /&gt;
:(optional) Extra kernel module packages for the modloop image. For example: &#039;&#039;dahdi-linux-vserver&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;APK_REPOS&lt;br /&gt;
:(optional) Path to addidtional apk repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039; is just a plaintext list of packages that should be included in the ISO image. You should always add &#039;&#039;alpine-base&#039;&#039; in there or the CD might not be able to boot. The dependencies for the packages will automatically be pulled in.&lt;br /&gt;
&lt;br /&gt;
== A rescue CD example ==&lt;br /&gt;
As an example, let us make a rescue ISO image with packages needed for rescue operations. We call it &#039;&#039;alpine-rescue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We create the &#039;&#039;alpine-rescue.conf.mk&#039;&#039; as follows:&lt;br /&gt;
 ALPINE_NAME   := alpine-rescue&lt;br /&gt;
 KERNEL_FLAVOR := grsec&lt;br /&gt;
 MODLOOP_EXTRA :=&lt;br /&gt;
&lt;br /&gt;
If you are going to use a custom kernel, don&#039;t forget to specify KERNEL_FLAVOR_DEFAULT which will set the default kernel to boot.&lt;br /&gt;
&lt;br /&gt;
And then the &#039;&#039;alpine-rescue.packages&#039;&#039; as:&lt;br /&gt;
 alpine-base&lt;br /&gt;
 bkeymaps&lt;br /&gt;
 openssh&lt;br /&gt;
 e2fsprogs&lt;br /&gt;
 mdadm&lt;br /&gt;
 lvm2&lt;br /&gt;
 parted&lt;br /&gt;
 debootstrap&lt;br /&gt;
 ntfs-3g&lt;br /&gt;
&lt;br /&gt;
{{Tip| Make sure your public keys are placed in /etc/apk/keys/ (example: root-xxxxxxxx.rsa.pub):&lt;br /&gt;
{{Cmd|ls /etc/apk/keys/}}&lt;br /&gt;
&lt;br /&gt;
Learn apk-tools to find your home-built apk&#039;s:&lt;br /&gt;
{{Cmd|echo &amp;quot;~/.cache/abuild/&amp;quot; &amp;gt;&amp;gt; /etc/apk/repositories}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make sure the apk index is up to date (so apk finds the packages):&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
We create the ISO image by telling the makefile the profile name. The makefile target is &#039;&#039;iso&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are building inside an LXC guest, use fakeroot:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;fakeroot make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To generate the sha1 sum we use the &#039;&#039;sha1&#039;&#039; make target.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue sha1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Package lists ==&lt;br /&gt;
&lt;br /&gt;
Beside the plaintext package lists in the git repository, there are more documented package lists contributed by Alpine users. Those lists can be transformed into a plaintext to use with &amp;lt;tt&amp;gt;alpine-iso&amp;lt;/tt&amp;gt; list with the simple python-based &amp;lt;tt&amp;gt;[http://git.alpinelinux.org/cgit/fab/alpine-iso/tree/config-builder.py config-builder]&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
So far the lists below are available (check [[:Category:ISO|here]] for more.)&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_mini|Alpine Mini]]&lt;br /&gt;
* [[Alpine_rescue|Alpine Rescue]]&lt;br /&gt;
* [[Alpine_security|Alpine Security]]&lt;br /&gt;
* [[Alpine SCST]]&lt;br /&gt;
&lt;br /&gt;
== Live Disk ==&lt;br /&gt;
&lt;br /&gt;
Once you have customized your custom ISO, you can now setup the live environment to operate outside of the standard installer as follows:&lt;br /&gt;
&lt;br /&gt;
* Generate an APKOVL file with [[Alpine_local_backup|lbu]], &amp;lt;code&amp;gt;lbu ci&amp;lt;/code&amp;gt;&lt;br /&gt;
* Alpine ISO requires the OVL Volume to be hosted on a web server. Put the APKOVL file on a webserver and identify the url. &lt;br /&gt;
* Uncomment the &amp;lt;code&amp;gt;APKOVL&amp;lt;/code&amp;gt; line in the alpine flavor of your choice and set it to the address of your ovl volume.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Any packages you add to /etc/apk/world of your lbu will automatically be installed onto the live system image.&lt;br /&gt;
* If you don&#039;t have a web server you can run busybox&#039;s httpd temporarily - &amp;lt;code&amp;gt;busybox -p 127.0.0.1:80&amp;lt;/code&amp;gt;&lt;br /&gt;
* In general, &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt; will only handle files in &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt;, to customize this further, you need to add additional files.&lt;br /&gt;
* If you want to make a customized installer, you need to create &amp;lt;code&amp;gt;.default_boot_services&amp;lt;/code&amp;gt; which will cause &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; to create the defaults for the live image.&lt;br /&gt;
&lt;br /&gt;
== Testing your ISO image ==&lt;br /&gt;
&lt;br /&gt;
[[Qemu#Live_mode| Qemu]] is useful for a quick test of your created ISO image.&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:ISO]]&lt;/div&gt;</summary>
		<author><name>Monperrus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12972</id>
		<title>How to make a custom ISO image</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12972"/>
		<updated>2016-10-01T10:08:50Z</updated>

		<summary type="html">&lt;p&gt;Monperrus: xorriso syslinux are required when using APKOVL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document explains how to build a custom ISO image using the alpine-iso scripts.&lt;br /&gt;
&lt;br /&gt;
First make sure we have the needed tools&lt;br /&gt;
{{Cmd|apk add alpine-sdk xorriso syslinux}}&lt;br /&gt;
&lt;br /&gt;
Then we clone (or update) the [http://git.alpinelinux.org/cgit/alpine-iso.git/ alpine-iso git repository].&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/alpine-iso}}&lt;br /&gt;
&lt;br /&gt;
The alpine-iso scripts is a simple makefile which you need to feed with a &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; file and a &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; we specify&lt;br /&gt;
&lt;br /&gt;
;ALPINE_NAME&lt;br /&gt;
:name of iso image&lt;br /&gt;
&lt;br /&gt;
;ALPINE_VERSION&lt;br /&gt;
:(optional) version string. Will default to todays date.&lt;br /&gt;
&lt;br /&gt;
;KERNEL_FLAVOR&lt;br /&gt;
:(optional) either &#039;&#039;grsec&#039;&#039;, &#039;&#039;vserver&#039;&#039; or &#039;&#039;pae&#039;&#039;. Will default to grsec.&lt;br /&gt;
&lt;br /&gt;
;MODLOOP_EXTRA&lt;br /&gt;
:(optional) Extra kernel module packages for the modloop image. For example: &#039;&#039;dahdi-linux-vserver&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;APK_REPOS&lt;br /&gt;
:(optional) Path to addidtional apk repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039; is just a plaintext list of packages that should be included in the ISO image. You should always add &#039;&#039;alpine-base&#039;&#039; in there or the CD might not be able to boot. The dependencies for the packages will automatically be pulled in.&lt;br /&gt;
&lt;br /&gt;
== A rescue CD example ==&lt;br /&gt;
As an example, let us make a rescue ISO image with packages needed for rescue operations. We call it &#039;&#039;alpine-rescue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We create the &#039;&#039;alpine-rescue.conf.mk&#039;&#039; as follows:&lt;br /&gt;
 ALPINE_NAME   := alpine-rescue&lt;br /&gt;
 KERNEL_FLAVOR := grsec&lt;br /&gt;
 MODLOOP_EXTRA :=&lt;br /&gt;
&lt;br /&gt;
If you are going to use a custom kernel, don&#039;t forget to specify KERNEL_FLAVOR_DEFAULT which will set the default kernel to boot.&lt;br /&gt;
&lt;br /&gt;
And then the &#039;&#039;alpine-rescue.packages&#039;&#039; as:&lt;br /&gt;
 alpine-base&lt;br /&gt;
 bkeymaps&lt;br /&gt;
 openssh&lt;br /&gt;
 e2fsprogs&lt;br /&gt;
 mdadm&lt;br /&gt;
 lvm2&lt;br /&gt;
 parted&lt;br /&gt;
 debootstrap&lt;br /&gt;
 ntfs-3g&lt;br /&gt;
&lt;br /&gt;
{{Tip| Make sure your public keys are placed in /etc/apk/keys/ (example: root-xxxxxxxx.rsa.pub):&lt;br /&gt;
{{Cmd|ls /etc/apk/keys/}}&lt;br /&gt;
&lt;br /&gt;
Learn apk-tools to find your home-built apk&#039;s:&lt;br /&gt;
{{Cmd|echo &amp;quot;~/.cache/abuild/&amp;quot; &amp;gt;&amp;gt; /etc/apk/repositories}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make sure the apk index is up to date (so apk finds the packages):&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
We create the ISO image by telling the makefile the profile name. The makefile target is &#039;&#039;iso&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are building inside an LXC guest, use fakeroot:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;fakeroot make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To generate the sha1 sum we use the &#039;&#039;sha1&#039;&#039; make target.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue sha1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Package lists ==&lt;br /&gt;
&lt;br /&gt;
Beside the plaintext package lists in the git repository, there are more documented package lists contributed by Alpine users. Those lists can be transformed into a plaintext to use with &amp;lt;tt&amp;gt;alpine-iso&amp;lt;/tt&amp;gt; list with the simple python-based &amp;lt;tt&amp;gt;[http://git.alpinelinux.org/cgit/fab/alpine-iso/tree/config-builder.py config-builder]&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
So far the lists below are available (check [[:Category:ISO|here]] for more.)&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_mini|Alpine Mini]]&lt;br /&gt;
* [[Alpine_rescue|Alpine Rescue]]&lt;br /&gt;
* [[Alpine_security|Alpine Security]]&lt;br /&gt;
* [[Alpine SCST]]&lt;br /&gt;
&lt;br /&gt;
== Live Disk ==&lt;br /&gt;
&lt;br /&gt;
Once you have customized your custom ISO, you can now setup the live environment to operate outside of the standard installer as follows:&lt;br /&gt;
&lt;br /&gt;
* Generate an APKOVL file with [[Alpine_local_backup|lbu]], &amp;lt;code&amp;gt;lbu ci&amp;lt;/code&amp;gt;&lt;br /&gt;
* Alpine ISO requires the OVL Volume to be hosted on a web server. Put the APKOVL file on a webserver and identify the url. &lt;br /&gt;
* Uncomment the &amp;lt;code&amp;gt;APKOVL&amp;lt;/code&amp;gt; line in the alpine flavor of your choice and set it to the address of your ovl volume.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Any packages you add to /etc/apk/world of your lbu will automatically be installed onto the live system image.&lt;br /&gt;
* If you don&#039;t have a web server you can run busybox&#039;s httpd temporarily - &amp;lt;code&amp;gt;busybox -p 127.0.0.1:80&amp;lt;/code&amp;gt;&lt;br /&gt;
* In general, &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt; will only handle files in &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt;, to customize this further, you need to add additional files.&lt;br /&gt;
* If you want to make a customized installer, you need to create &amp;lt;code&amp;gt;.default_boot_services&amp;lt;/code&amp;gt; which will cause &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; to create the defaults for the live image.&lt;br /&gt;
&lt;br /&gt;
== Testing your ISO image ==&lt;br /&gt;
&lt;br /&gt;
[[Qemu#Live_mode| Qemu]] is useful for a quick test of your created ISO image.&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:ISO]]&lt;/div&gt;</summary>
		<author><name>Monperrus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12971</id>
		<title>How to make a custom ISO image</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=How_to_make_a_custom_ISO_image&amp;diff=12971"/>
		<updated>2016-10-01T08:01:55Z</updated>

		<summary type="html">&lt;p&gt;Monperrus: /* Live Disk */ clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document explains how to build a custom ISO image using the alpine-iso scripts.&lt;br /&gt;
&lt;br /&gt;
First make sure we have the needed tools&lt;br /&gt;
{{Cmd|apk add alpine-sdk}}&lt;br /&gt;
&lt;br /&gt;
Then we clone (or update) the [http://git.alpinelinux.org/cgit/alpine-iso.git/ alpine-iso git repository].&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/alpine-iso}}&lt;br /&gt;
&lt;br /&gt;
The alpine-iso scripts is a simple makefile which you need to feed with a &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; file and a &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&amp;lt;name&amp;gt;.conf.mk&#039;&#039; we specify&lt;br /&gt;
&lt;br /&gt;
;ALPINE_NAME&lt;br /&gt;
:name of iso image&lt;br /&gt;
&lt;br /&gt;
;ALPINE_VERSION&lt;br /&gt;
:(optional) version string. Will default to todays date.&lt;br /&gt;
&lt;br /&gt;
;KERNEL_FLAVOR&lt;br /&gt;
:(optional) either &#039;&#039;grsec&#039;&#039;, &#039;&#039;vserver&#039;&#039; or &#039;&#039;pae&#039;&#039;. Will default to grsec.&lt;br /&gt;
&lt;br /&gt;
;MODLOOP_EXTRA&lt;br /&gt;
:(optional) Extra kernel module packages for the modloop image. For example: &#039;&#039;dahdi-linux-vserver&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;APK_REPOS&lt;br /&gt;
:(optional) Path to addidtional apk repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&amp;lt;name&amp;gt;.packages&#039;&#039; is just a plaintext list of packages that should be included in the ISO image. You should always add &#039;&#039;alpine-base&#039;&#039; in there or the CD might not be able to boot. The dependencies for the packages will automatically be pulled in.&lt;br /&gt;
&lt;br /&gt;
== A rescue CD example ==&lt;br /&gt;
As an example, let us make a rescue ISO image with packages needed for rescue operations. We call it &#039;&#039;alpine-rescue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We create the &#039;&#039;alpine-rescue.conf.mk&#039;&#039; as follows:&lt;br /&gt;
 ALPINE_NAME   := alpine-rescue&lt;br /&gt;
 KERNEL_FLAVOR := grsec&lt;br /&gt;
 MODLOOP_EXTRA :=&lt;br /&gt;
&lt;br /&gt;
If you are going to use a custom kernel, don&#039;t forget to specify KERNEL_FLAVOR_DEFAULT which will set the default kernel to boot.&lt;br /&gt;
&lt;br /&gt;
And then the &#039;&#039;alpine-rescue.packages&#039;&#039; as:&lt;br /&gt;
 alpine-base&lt;br /&gt;
 bkeymaps&lt;br /&gt;
 openssh&lt;br /&gt;
 e2fsprogs&lt;br /&gt;
 mdadm&lt;br /&gt;
 lvm2&lt;br /&gt;
 parted&lt;br /&gt;
 debootstrap&lt;br /&gt;
 ntfs-3g&lt;br /&gt;
&lt;br /&gt;
{{Tip| Make sure your public keys are placed in /etc/apk/keys/ (example: root-xxxxxxxx.rsa.pub):&lt;br /&gt;
{{Cmd|ls /etc/apk/keys/}}&lt;br /&gt;
&lt;br /&gt;
Learn apk-tools to find your home-built apk&#039;s:&lt;br /&gt;
{{Cmd|echo &amp;quot;~/.cache/abuild/&amp;quot; &amp;gt;&amp;gt; /etc/apk/repositories}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make sure the apk index is up to date (so apk finds the packages):&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
We create the ISO image by telling the makefile the profile name. The makefile target is &#039;&#039;iso&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are building inside an LXC guest, use fakeroot:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;fakeroot make PROFILE=alpine-rescue iso&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To generate the sha1 sum we use the &#039;&#039;sha1&#039;&#039; make target.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;make PROFILE=alpine-rescue sha1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Package lists ==&lt;br /&gt;
&lt;br /&gt;
Beside the plaintext package lists in the git repository, there are more documented package lists contributed by Alpine users. Those lists can be transformed into a plaintext to use with &amp;lt;tt&amp;gt;alpine-iso&amp;lt;/tt&amp;gt; list with the simple python-based &amp;lt;tt&amp;gt;[http://git.alpinelinux.org/cgit/fab/alpine-iso/tree/config-builder.py config-builder]&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
So far the lists below are available (check [[:Category:ISO|here]] for more.)&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_mini|Alpine Mini]]&lt;br /&gt;
* [[Alpine_rescue|Alpine Rescue]]&lt;br /&gt;
* [[Alpine_security|Alpine Security]]&lt;br /&gt;
* [[Alpine SCST]]&lt;br /&gt;
&lt;br /&gt;
== Live Disk ==&lt;br /&gt;
&lt;br /&gt;
Once you have customized your custom ISO, you can now setup the live environment to operate outside of the standard installer as follows:&lt;br /&gt;
&lt;br /&gt;
* Generate an APKOVL file with [[Alpine_local_backup|lbu]], &amp;lt;code&amp;gt;lbu ci&amp;lt;/code&amp;gt;&lt;br /&gt;
* Alpine ISO requires the OVL Volume to be hosted on a web server. Put the APKOVL file on a webserver and identify the url. &lt;br /&gt;
* Uncomment the &amp;lt;code&amp;gt;APKOVL&amp;lt;/code&amp;gt; line in the alpine flavor of your choice and set it to the address of your ovl volume.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Any packages you add to /etc/apk/world of your lbu will automatically be installed onto the live system image.&lt;br /&gt;
* If you don&#039;t have a web server you can run busybox&#039;s httpd temporarily - &amp;lt;code&amp;gt;busybox -p 127.0.0.1:80&amp;lt;/code&amp;gt;&lt;br /&gt;
* In general, &amp;lt;code&amp;gt;lbu&amp;lt;/code&amp;gt; will only handle files in &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt;, to customize this further, you need to add additional files.&lt;br /&gt;
* If you want to make a customized installer, you need to create &amp;lt;code&amp;gt;.default_boot_services&amp;lt;/code&amp;gt; which will cause &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; to create the defaults for the live image.&lt;br /&gt;
&lt;br /&gt;
== Testing your ISO image ==&lt;br /&gt;
&lt;br /&gt;
[[Qemu#Live_mode| Qemu]] is useful for a quick test of your created ISO image.&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:ISO]]&lt;/div&gt;</summary>
		<author><name>Monperrus</name></author>
	</entry>
</feed>