Alpine setup scripts: Difference between revisions

From Alpine Linux
(→‎Documentation needed: setup-xen-dom0)
m (→‎setup-alpine: clarified grammar)
(40 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Draft}}
This page summarizes the low-level behavior of the {{Path|/sbin/setup-*}} scripts on the Alpine ISO (and in a normal Alpine install).
This page summarizes the low-level behavior of the {{Path|/sbin/setup-*}} scripts on the Alpine ISO (and in a normal Alpine install).


== setup-alpine ==
== setup-alpine ==


For a higher-level walkthrough (using the "sys" installmode), see [[Install to disk|Basic HDD install]].
This is a low-level administrator command, for a higher-level walkthrough please use the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine for new users install manuals]] (that use the "sys" install mode).
 
The [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine for new users install manuals]] page wiki also references this script, but is less technical.


This script accepts the following command-line switches (you can run <code>setup-alpine -h</code> to see a usage message).
This script accepts the following command-line switches (you can run <code>setup-alpine -h</code> to see a usage message).
Line 19: Line 19:


# <code>setup-keymap</code> [us us]
# <code>setup-keymap</code> [us us]
# <code>setup-hostname</code> [-n alpine-test]
# [[#setup-hostname|setup-hostname]] [-n alpine-test]
# [[#setup-interfaces|setup-interfaces]] [-i < interfaces-file]
# [[#setup-interfaces|setup-interfaces]] [-i < interfaces-file]
# <code>/etc/init.d/networking --quiet start &</code>
# <code>/etc/init.d/networking --quiet start &</code>
# if none of the networking interfaces were configured using dhcp, then: <code>setup-dns</code> [-d example.com -n "8.8.8.8 [...]"]
# if none of the networking interfaces were configured using dhcp, then: [[#setup-dns|setup-dns]] [-d example.com -n "8.8.8.8 [...]"]
# set the root password
# set the root password
# if not in quick mode, then: [[#setup-timezone|setup-timezone]] [-z UTC | -z America/New_York | -p EST+5]
# if not in quick mode, then: [[#setup-timezone|setup-timezone]] [-z UTC | -z America/New_York | -p EST+5]
Line 28: Line 28:
# add <code>networking</code> and <code>urandom</code> to the '''boot''' rc level, and <code>acpid</code> and <code>cron</code> to the '''default''' rc level, and start the '''boot''' and '''default''' rc services
# add <code>networking</code> and <code>urandom</code> to the '''boot''' rc level, and <code>acpid</code> and <code>cron</code> to the '''default''' rc level, and start the '''boot''' and '''default''' rc services
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and <code>hostname</code>, and update {{Path|/etc/hosts}}
# extract the fully-qualified domain name and hostname from {{Path|/etc/resolv.conf}} and <code>hostname</code>, and update {{Path|/etc/hosts}}
# [[#setup-proxy|setup-proxy]] [-q <nowiki>"http://webproxy:8080"</nowiki>], and activate proxy if it was configured
# <code>setup-apkrepos</code> [-r (to select a mirror randomly)]
# <code>setup-apkrepos</code> [-r (to select a mirror randomly)]
# if not in quick mode, then: <code>setup-sshd</code> [-c openssh | dropbear | none]
# if not in quick mode, then: [[#setup-sshd|setup-sshd]] [-c openssh | dropbear | none]
# if not in quick mode, then: <code>setup-ntp</code> [-c chrony | openntpd | none]
# if not in quick mode, then: <code>setup-ntp</code> [-c chrony | openntpd | busybox | none]
# if not in quick mode, then: <code>DEFAULT_DISK=none</code> [[#setup-disk|setup-disk]] <code>-q</code> [-m data /dev/sda]
# if not in quick mode, then: <code>DEFAULT_DISK=none</code> [[#setup-disk|setup-disk]] <code>-q</code> [-m data /dev/sda]
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-lbu</code> [/media/sdb1]
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-lbu</code> [/media/sdb1]
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-apkcache</code> [/media/sdb1/cache | none]
# if installation mode selected during setup-disk was "data" instead of "sys", then: <code>setup-apkcache</code> [/media/sdb1/cache | none]
== setup-hostname ==
:<code>setup-hostname</code> [-h] [-n hostname]
Options:
'''-h''' <var>Show help</var>
'''-n''' <var>Specify hostname</var>
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 '-' or is too long).
The script can be invoked manually or is called as part of the <code>setup-alpine</code> script.


== setup-interfaces ==
== setup-interfaces ==
Line 46: Line 60:
  iface eth0 inet dhcp
  iface eth0 inet dhcp
     hostname alpine-test
     hostname alpine-test
== setup-dns ==
:<code>setup-dns</code> [-h] [-d domain name] [-n name server]
Options:
'''-h''' <var>Show help</var>
'''-d''' <var>specify search domain name</var>
'''-n''' <var>name server IP</var>
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 <code>setup-dns</code> will allow interactive use of the script, or the options can be specified.
The information fed to this script is written to {{Path|/etc/resolv.conf}}
Example usage: {{Cmd|setup-dns -d example.org -n 8.8.8.8}}
Example {{Path|/etc/resolv.conf}}:
search example.org
nameserver 8.8.8.8
It can be run manually but is also invoked in the <code>setup-alpine</code> script unless interfaces are configured for DHCP.


== setup-timezone ==
== setup-timezone ==
Line 52: Line 91:
Can pre-select the timezone using either of these switches:
Can pre-select the timezone using either of these switches:


* '''-z''' <var>subfolder of</var> {{Path|/usr/share/zoneinfo}}
'''-z''' <var>subfolder of</var> {{Path|/usr/share/zoneinfo}}
* '''-p''' <var>POSIX TZ format</var>
 
'''-p''' <var>POSIX TZ format</var>
 
== setup-proxy ==
:<code>setup-proxy</code> [-hq] [PROXYURL]
 
Options:
 
'''-h''' <var>Show help</var>
 
'''-q''' <var>Quiet mode</var> prevents changes from taking effect until after reboot
 
This script requests the system proxy to use in the form <code>http://<proxyurl>:<port></code> for example:
<code>http://10.0.0.1:8080</code>
 
To set no system proxy use <code>none</code>.
This script exports the following environmental variables:
 
<code>http_proxy=$proxyurl</code>
 
<code>https_proxy=$proxyurl</code>
 
<code>ftp_proxy=$proxyurl</code>
 
where <code>$proxyurl</code> is the value input. 
If <code>none</code> was chosen then the value it is set to a blank value (and so no proxy is used).
 
== setup-sshd ==
 
:<code>setup-sshd</code> [-h] [-c choice of SSH daemon]
 
Options:
 
'''-h''' <var>Show help</var>
 
'''-c''' <var>SSH daemon</var> where SSH daemon can be one of the following:
 
<code>openssh</code> install the {{Pkg|openSSH}} daemon
 
<code>dropbear</code> install the {{Pkg|dropbear}} daemon
 
<code>none</code> Do not install an SSH daemon
 
Example usage: {{Cmd|setup-sshd -c dropbear}}
 
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 & client.
It can be run manually but is also invoked in the <code>setup-alpine</code> script.
 
== setup-apkrepos ==
:<code>setup-apkrepos</code> [-fhr] [REPO...]
 
Setup <code>apk</code> repositories.
 
options:
 
'''-f'''  <var>Detect and add fastest mirror</var>
 
'''-r'''  <var>Add a random mirror and do not prompt</var>
 
'''-1'''  <var>Add first mirror on the list (normally a CDN)</var>
 
This is run as part of the <code>setup-alpine</code> script.


== setup-disk ==
== setup-disk ==


:<code>DEFAULT_DISK=none setup-disk -q</code> [-m data | sys] [<var>mountpoint directory</var> | /dev/sda ...]
:<code>DEFAULT_DISK=none setup-disk -q</code> [-m data | sys] [<var>mountpoint directory</var> | /dev/sda ...]
In "sys" mode, it's an installer, it permanently installs Alpine on the disk, in "data" mode, it provides a larger and persistent /var volume.


This script accepts the following command-line switches:
This script accepts the following command-line switches:
Line 82: Line 184:


<code>ROOTFS</code>
<code>ROOTFS</code>
:Filesystem to use for the / volume; defaults to ext4. Only used if '''-m sys''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.
:Filesystem to use for the / volume; defaults to ext4. Only used if '''-m sys''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.


<code>BOOTFS</code>
<code>BOOTFS</code>
:Filesystem to use for the /boot volume; defaults to ext4. Only used if '''-m sys''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.
:Filesystem to use for the /boot volume; defaults to ext4. Only used if '''-m sys''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.


<code>VARFS</code>
<code>VARFS</code>
:Filesystem to use for the /var volume; defaults to ext4. Only used if '''-m data''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs.
:Filesystem to use for the /var volume; defaults to ext4. Only used if '''-m data''' is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.


<code>SYSROOT</code>
<code>SYSROOT</code>
:Mountpoint to use when creating volumes and doing traditional disk install ('''-m data'''). Defaults to {{Path|/mnt}}.
:Mountpoint to use when creating volumes and doing traditional disk install ('''-m sys'''). Defaults to {{Path|/mnt}}.


<code>MBR</code>
<code>MBR</code>
:Path of MBR binary code, defaults to {{Path|/usr/share/syslinux/mbr.bin}}.
:Path of MBR binary code, defaults to {{Path|/usr/share/syslinux/mbr.bin}}.
<code>BOOTLOADER</code>
:Bootloader to use, defaults to syslinux. Supported bootloaders are: grub syslinux zipl.
<code>DISKLABEL</code>
:Disklabel to use, defaults to dos. Supported disklabels are: dos gpt eckd.


<!-- Writes to /tmp/ovlfiles, /tmp/alpine-install-diskmode.out, and /tmp/sfdisk.out but that never seems to be used elsewhere. -->
<!-- Writes to /tmp/ovlfiles, /tmp/alpine-install-diskmode.out, and /tmp/sfdisk.out but that never seems to be used elsewhere. -->
Line 107: Line 215:


==== RAID ====
==== RAID ====
<code>setup-disk</code> will automatically build a RAID array if you supply the '''-r''' switch, or if you specify more than one device. The array will always be RAID1 (and --metadata=0.90) for the /boot volumes, but will be RAID5 for non-boot volumes when 3 or more devices are supplied.
<code>setup-disk</code> will automatically build a RAID array if you supply the '''-r''' 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.


If you instead want to build your RAID array manually, see [[Setting up a software raid1 array]]. Then format and mount the disks, and supply the root mountpoint to <code>setup-disk</code>.
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 <code>setup-disk</code>.


==== LVM ====
==== LVM ====
Line 117: Line 225:
* swap volume: '''lv_swap''' (only created when swap size > 0)
* swap volume: '''lv_swap''' (only created when swap size > 0)
* root volume: '''lv_root''' (only created when '''-m sys''' is specified or interactively selected)
* root volume: '''lv_root''' (only created when '''-m sys''' is specified or interactively selected)
* var volume: '''lv_var''' (only created when '''-m data''' is specified or interactively selected); also these volumes are currently always formatted as ext4.
* var volume: '''lv_var''' (only created when '''-m data''' is specified or interactively selected)


The '''lv_var''' or '''lv_root''' volumes are created to occupy all remaining space in the volume group.
The '''lv_var''' or '''lv_root''' volumes are created to occupy all remaining space in the volume group.
Line 147: Line 255:
  -L  Use LVM to manage partitions
  -L  Use LVM to manage partitions
  -q  Exit quietly if no disks are found
  -q  Exit quietly if no disks are found
  -r  Enable software raid1 with single disk
  -r  Enable software RAID1 with single disk
  -s  Use SWAPSIZE MB instead of $SWAP_SIZE MB for swap (Use 0 to disable swap)
  -s  Use SWAPSIZE MB instead of $SWAP_SIZE MB for swap (Use 0 to disable swap)
  -v  Be more verbose about what is happening
  -v  Be more verbose about what is happening
Line 179: Line 287:
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.
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.


For a higher-level walkthrough, see [[Installing_Alpine_on_USB#Creating_a_bootable_Alpine_Linux_USB_Stick_from_the_command_line|Creating a bootable Alpine Linux USB Stick from the command line]].
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]].


This script accepts the following arguments and command-line switches (you can run <code>setup-bootable -h</code> to see a usage message).
This script accepts the following arguments and command-line switches (you can run <code>setup-bootable -h</code> to see a usage message).
Line 209: Line 317:
Installs the following packages: <code>xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev</code>.
Installs the following packages: <code>xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev</code>.


Additional packages can be supplied as arguments to <code>setup-xorg-base</code>. You might need, for example, some of: <code>xf86-input-synaptics xf86-video-<var>something</var> xinit</code>.
Additional packages can be supplied as arguments to <code>setup-xorg-base</code>. You might need, for example, some of: <code>xf86-input-synaptics xf86-video-<var>something</var> xinit</code>. For Qemu, see [[Qemu#Using_Xorg_inside_Qemu|Qemu]]. For Intel GPUs, see [[Intel Video]].
 


== Documentation needed ==
== Documentation needed ==


=== setup-xen-dom0 ===
=== setup-xen-dom0 ===
=== setup-proxy ===


=== setup-gparted-desktop ===
=== setup-gparted-desktop ===
Line 234: Line 339:


See [[:Category:ACF|ACF pages]] for more information.
See [[:Category:ACF|ACF pages]] for more information.
=== setup-ntp ===
= =
* [https://beta.docs.alpinelinux.org/ beta.docs.alpinelinux.org]


[[Category:Installation]]
[[Category:Installation]]

Revision as of 17:30, 22 December 2019

This page summarizes the low-level behavior of the /sbin/setup-* scripts on the Alpine ISO (and in a normal Alpine install).

setup-alpine

This is a low-level administrator command, for a higher-level walkthrough please use the Alpine for new users install manuals (that use the "sys" install mode).

The Alpine for new users install manuals page wiki also references this script, but is less technical.

This script accepts the following command-line switches (you can run setup-alpine -h to see a usage message).

-a
Create an overlay file: this creates a temporary directory and saves its location in ROOT; however, the script doesn't export this variable so I think this feature isn't currently functional.

-c answerfile
Create a new "answerfile", with default choices. You can edit the file and then invoke setup-alpine -f answerfile.
-f answerfile
Use an existing "answerfile", which may override some or all of the interactive prompts.

-q
Run in "quick mode." See below for details.

The script'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 "answerfile".

  1. setup-keymap [us us]
  2. setup-hostname [-n alpine-test]
  3. setup-interfaces [-i < interfaces-file]
  4. /etc/init.d/networking --quiet start &
  5. if none of the networking interfaces were configured using dhcp, then: setup-dns [-d example.com -n "8.8.8.8 [...]"]
  6. set the root password
  7. if not in quick mode, then: setup-timezone [-z UTC | -z America/New_York | -p EST+5]
  8. enable the new hostname (/etc/init.d/hostname --quiet restart)
  9. add networking and urandom to the boot rc level, and acpid and cron to the default rc level, and start the boot and default rc services
  10. extract the fully-qualified domain name and hostname from /etc/resolv.conf and hostname, and update /etc/hosts
  11. setup-proxy [-q "http://webproxy:8080"], and activate proxy if it was configured
  12. setup-apkrepos [-r (to select a mirror randomly)]
  13. if not in quick mode, then: setup-sshd [-c openssh | dropbear | none]
  14. if not in quick mode, then: setup-ntp [-c chrony | openntpd | busybox | none]
  15. if not in quick mode, then: DEFAULT_DISK=none setup-disk -q [-m data /dev/sda]
  16. if installation mode selected during setup-disk was "data" instead of "sys", then: setup-lbu [/media/sdb1]
  17. if installation mode selected during setup-disk was "data" instead of "sys", then: setup-apkcache [/media/sdb1/cache | none]

setup-hostname

setup-hostname [-h] [-n hostname]

Options:

-h Show help

-n Specify hostname

This script allows quick and easy setup of the system hostname by writing it to /etc/hostname. The script prevents you from writing an invalid hostname (such as one that used invalid characters or starts with a '-' or is too long). The script can be invoked manually or is called as part of the setup-alpine script.

setup-interfaces

setup-interfaces [-i < interfaces-file]

Note that the contents of interfaces-file has to be supplied as stdin, rather than naming the file as an additional argument. The contents should have the format of /etc/network/interfaces, such as:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    hostname alpine-test

setup-dns

setup-dns [-h] [-d domain name] [-n name server]

Options:

-h Show help

-d specify search domain name

-n name server IP

The setup-dns script is stored in /sbin/setup-dns and allows quick and simple setup of DNS servers (and a DNS search domain if required). Simply running setup-dns will allow interactive use of the script, or the options can be specified.

The information fed to this script is written to /etc/resolv.conf

Example usage:

setup-dns -d example.org -n 8.8.8.8

Example /etc/resolv.conf:

search example.org
nameserver 8.8.8.8

It can be run manually but is also invoked in the setup-alpine script unless interfaces are configured for DHCP.

setup-timezone

setup-timezone [-z UTC | -z America/New_York | -p EST+5]

Can pre-select the timezone using either of these switches:

-z subfolder of /usr/share/zoneinfo

-p POSIX TZ format

setup-proxy

setup-proxy [-hq] [PROXYURL]

Options:

-h Show help

-q Quiet mode prevents changes from taking effect until after reboot

This script requests the system proxy to use in the form http://<proxyurl>:<port> for example: http://10.0.0.1:8080

To set no system proxy use none. This script exports the following environmental variables:

http_proxy=$proxyurl

https_proxy=$proxyurl

ftp_proxy=$proxyurl

where $proxyurl is the value input. If none was chosen then the value it is set to a blank value (and so no proxy is used).

setup-sshd

setup-sshd [-h] [-c choice of SSH daemon]

Options:

-h Show help

-c SSH daemon where SSH daemon can be one of the following:

openssh install the openSSH daemon

dropbear install the dropbear daemon

none Do not install an SSH daemon

Example usage:

setup-sshd -c dropbear

The setup-sshd script is stored in /sbin/setup-sshd and allows quick and simple setup of either the OpenSSH or Dropbear SSH daemon & client. It can be run manually but is also invoked in the setup-alpine script.

setup-apkrepos

setup-apkrepos [-fhr] [REPO...]

Setup apk repositories.

options:

-f Detect and add fastest mirror

-r Add a random mirror and do not prompt

-1 Add first mirror on the list (normally a CDN)

This is run as part of the setup-alpine script.

setup-disk

DEFAULT_DISK=none setup-disk -q [-m data | sys] [mountpoint directory | /dev/sda ...]

In "sys" mode, it's an installer, it permanently installs Alpine on the disk, in "data" mode, it provides a larger and persistent /var volume.

This script accepts the following command-line switches:

-k kernel flavor
-o apkovl file
Restore system from apkovl file
-m data | sys
Don't prompt for installation mode. With -m data, the supplied devices are formatted to use as a /var volume.

-r
Use RAID1 with a single disk (degraded mode)

-L
Create and use volumes in a LVM group

-s swap size in MB
Use 0 to disable swap

-q
Exit quietly if no disks are found

-v
Verbose mode

The script also honors the following environment variables:

BOOT_SIZE

Size of the boot partition in MB; defaults to 100. Only used if -m sys is specified or interactively selected.

SWAP_SIZE

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't be more than 1/3 the size of the smallest disk, and if less than 64 will just be 0. Only used if -m sys is specified or interactively selected.

ROOTFS

Filesystem to use for the / volume; defaults to ext4. Only used if -m sys is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.

BOOTFS

Filesystem to use for the /boot volume; defaults to ext4. Only used if -m sys is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.

VARFS

Filesystem to use for the /var volume; defaults to ext4. Only used if -m data is specified or interactively selected. Supported filesystems are: ext2 ext3 ext4 btrfs xfs.

SYSROOT

Mountpoint to use when creating volumes and doing traditional disk install (-m sys). Defaults to /mnt.

MBR

Path of MBR binary code, defaults to /usr/share/syslinux/mbr.bin.

BOOTLOADER

Bootloader to use, defaults to syslinux. Supported bootloaders are: grub syslinux zipl.

DISKLABEL

Disklabel to use, defaults to dos. Supported disklabels are: dos gpt eckd.


Partitioning

If you have complex partitioning needs, you can partition, format, and mount your volumes manually, then just supply the root mountpoint to setup-disk. Doing so implicitly behaves as though -m sys had also been specified.

See Setting up disks manually for more information.


RAID

setup-disk will automatically build a RAID array if you supply the -r switch, or if you specify more than one device. The array will always be RAID1 (and --metadata=0.90) for the /boot volumes, but will be RAID5 (and --metadata=1.2 for non-boot volumes when 3 or more devices are supplied.

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 setup-disk.

LVM

setup-disk will automatically build and use volumes in a LVM group if you supply the -L switch. The group and volumes created by the script will have the following names:

  • volume group: vg0
  • swap volume: lv_swap (only created when swap size > 0)
  • root volume: lv_root (only created when -m sys is specified or interactively selected)
  • var volume: lv_var (only created when -m data is specified or interactively selected)

The lv_var or lv_root volumes are created to occupy all remaining space in the volume group.

If you need to change any of these settings, you can use vgrename, lvrename, lvreduce or lvresize.

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 setup-disk.


setup-bootable

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

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.

For a higher-level walkthrough, see Creating a bootable Alpine Linux USB Stick from the command line.

This script accepts the following arguments and command-line switches (you can run setup-bootable -h to see a usage message).

setup-bootable source [dest]

The argument source can be a directory or an ISO (will be mounted to MNT or /mnt) or a URL (will be downloaded with WGET or wget). The argument dest can be a directory mountpoint, or will default to /media/usb if not supplied.

-k
Keep alpine_dev in syslinux.cfg; otherwise, replace with UUID.

-u
Upgrade mode: keep existing syslinux.cfg and don't run syslinux

-f
Overwrite syslinux.cfg even if -u was specified.

-s
Force the running of syslinux even if -u was specified.

-v
Verbose mode

The script will ensure that source and dest are available; will copy the contents of source to dest, ensuring first that there's enough space; and unless -u was specified, will make dest bootable.


setup-xorg-base

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

Installs the following packages: xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse xf86-input-keyboard udev.

Additional packages can be supplied as arguments to setup-xorg-base. You might need, for example, some of: xf86-input-synaptics xf86-video-something xinit. For Qemu, see Qemu. For Intel GPUs, see Intel Video.

Documentation needed

setup-xen-dom0

setup-gparted-desktop

Uses openbox.

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-mta

Uses ssmtp.

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

setup-acf

This is a standalone script; it's not invoked by setup-alpine but must be run manually.

This script was named setup-webconf before Alpine 1.9 beta 4.

See ACF pages for more information.

setup-ntp