Using an answerfile with setup-alpine: Difference between revisions
(Created page with "{{Tip|This page is a work in progress. It is currently being actively editted. I will remove this tip before the end of day.}} == Using An Answerfile with setup-alpine == To get an quick start with setup-alpine answerfiles, a starter answerfile can be generated with: {{Cmd|setup-alpine -c <var>PATH_TO_FILENAME</var>}} At the time of writing this, the previous command will result in output in the specified <var>FILE</var>: {{Cat|PATH_TO_FILENAME|<nowiki> # Example answer...") |
No edit summary |
||
Line 4: | Line 4: | ||
To get an quick start with setup-alpine answerfiles, a starter answerfile can be generated with: | To get an quick start with setup-alpine answerfiles, a starter answerfile can be generated with: | ||
{{Cmd|setup-alpine -c <var>PATH_TO_FILENAME</var>}} | {{Cmd|setup-alpine -c <var>PATH_TO_FILENAME</var>}} | ||
At the time of writing this, the previous command will result in output in the specified <var> | At the time of writing this, the previous command will result in output in the specified <var>PATH_TO_FILENAME</var>: | ||
{{Cat|PATH_TO_FILENAME|<nowiki> | {{Cat|PATH_TO_FILENAME|<nowiki> | ||
# Example answer file for setup-alpine script | # Example answer file for setup-alpine script | ||
Line 72: | Line 72: | ||
Be sure that the uncommented variables have valid values set to your preference. Once you are satisfied with the answerfile contents, this how to use it: | Be sure that the uncommented variables have valid values set to your preference. Once you are satisfied with the answerfile contents, this how to use it: | ||
{{Cmd|setup-alpine -f <var>PATH_TO_FILENAME</var>}} | {{Cmd|setup-alpine -f <var>PATH_TO_FILENAME</var>}} | ||
== Answerfile Variables == | |||
The variables in the answerfile originate from the other alpine-conf setup-* scripts that are called out to from setup-alpine. These are: | |||
* [[Alpine_setup_scripts#setup-keymap|<code>setup-keymap</code>]] | |||
:: KEYMAPOPTS | |||
* [[Alpine_setup_scripts#setup-hostname|<code>setup-hostname</code>]] | |||
:: HOSTNAMEOPTS | |||
* [[Alpine_setup_scripts#setup-devd|<code>setup-devd</code>]] | |||
:: DEVDOPTS | |||
* [[Alpine_setup_scripts#setup-interfaces|<code>setup-interfaces</code>]] | |||
:: INTERFACEOPTS | |||
* [[Alpine_setup_scripts#setup-dns|<code>setup-dns</code>]] | |||
:: DNSOPTS | |||
* [[Alpine_setup_scripts#setup-timezone|<code>setup-timezone</code>]] | |||
:: TIMEZONEOPTS | |||
* [[Alpine_setup_scripts#setup-proxy|<code>setup-proxy</code>]] | |||
:: PROXYOPTS | |||
* [[Alpine_setup_scripts#setup-ntp|<code>setup-ntp</code>]] | |||
:: NTPOPTS | |||
* [[Alpine_setup_scripts#setup-apkrepos|<code>setup-apkrepos</code>]] | |||
:: APKREPOSPTS | |||
* [[Alpine_setup_scripts#setup-user|<code>setup-user</code>]] | |||
:: USEROPTS | |||
:: USERSSHKEY | |||
* [[Alpine_setup_scripts#setup-sshd|<code>setup-sshd</code>]] | |||
:: SSHDOPTS | |||
:: ROOTSSHKEY | |||
* [[Alpine_setup_scripts#setup-xen-dom0|<code>setup-xen-dom0</code>]] | |||
:: XENDOM0OPTS | |||
* [[Alpine_setup_scripts#setup-disk|<code>setup-disk</code>]] | |||
:: DISKOPTS | |||
* [[Alpine_setup_scripts#setup-lbu|<code>setup-lbu</code>]] | |||
:: LBUOPTS | |||
* [[Alpine_setup_scripts#setup-apkcache|<code>setup-apkcache</code>]] | |||
:: APKCACHEOPTS |
Revision as of 19:14, 28 June 2025
Tip: This page is a work in progress. It is currently being actively editted. I will remove this tip before the end of day.
Using An Answerfile with setup-alpine
To get an quick start with setup-alpine answerfiles, a starter answerfile can be generated with:
setup-alpine -c PATH_TO_FILENAME
At the time of writing this, the previous command will result in output in the specified PATH_TO_FILENAME:
Contents of PATH_TO_FILENAME
# Example answer file for setup-alpine script
# If you don't want to use a certain option, then comment it out
# Use US layout with US variant
# KEYMAPOPTS="us us"
KEYMAPOPTS=none
# Set hostname to 'alpine'
HOSTNAMEOPTS=alpine
# Set device manager to mdev
DEVDOPTS=mdev
# Contents of /etc/network/interfaces
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine-test
"
# Search domain of example.com, Google public nameserver
# DNSOPTS="-d example.com 8.8.8.8"
# Set timezone to UTC
#TIMEZONEOPTS="UTC"
TIMEZONEOPTS=none
# set http/ftp proxy
#PROXYOPTS="http://webproxy:8080"
PROXYOPTS=none
# Add first mirror (CDN)
APKREPOSOPTS="-1"
# Create admin user
USEROPTS="-a -u -g audio,input,video,netdev juser"
#USERSSHKEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com"
#USERSSHKEY="https://example.com/juser.keys"
# Install Openssh
SSHDOPTS=openssh
#ROOTSSHKEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com"
#ROOTSSHKEY="https://example.com/juser.keys"
# Use openntpd
# NTPOPTS="openntpd"
NTPOPTS=none
# Use /dev/sda as a sys disk
# DISKOPTS="-m sys /dev/sda"
DISKOPTS=none
# Setup storage with label APKOVL for config storage
#LBUOPTS="LABEL=APKOVL"
LBUOPTS=none
#APKCACHEOPTS="/media/LABEL=APKOVL/cache"
APKCACHEOPTS=none
When using answerfile, be sure to edit the file's contents to your needs. Comment out variables you wish not to be set. Be sure that the uncommented variables have valid values set to your preference. Once you are satisfied with the answerfile contents, this how to use it:
setup-alpine -f PATH_TO_FILENAME
Answerfile Variables
The variables in the answerfile originate from the other alpine-conf setup-* scripts that are called out to from setup-alpine. These are:
- KEYMAPOPTS
- HOSTNAMEOPTS
- DEVDOPTS
- INTERFACEOPTS
- DNSOPTS
- TIMEZONEOPTS
- PROXYOPTS
- NTPOPTS
- APKREPOSPTS
- USEROPTS
- USERSSHKEY
- SSHDOPTS
- ROOTSSHKEY
- XENDOM0OPTS
- DISKOPTS
- LBUOPTS
- APKCACHEOPTS