Installation on a headless host
This page documents an easy installation procedure for Alpine Linux on a headless host i.e a system without keyboard, mouse & display to interact with but otherwise available only through a network connection. Somebody has to insert the Install media and power up the headless host. This procedure applies to all platforms.
Headless bootstrap overlay file
The Headless bootstrap repo provides a ready-to-use overlay file to bootstrap a headless system.
While straightforward in default use-case, many optional settings and advanced modes are detailed on repo homepage (unattended installs scripting, secured logon, ssh keys configuration, gadget-modes, etc).
To Install Alpine Linux on a headless host, just add headless.apkovl.tar.gz overlay file as-is (along with optional config files) at the root of customizable boot device, or of a side media.
If using wifi networking, create a file wpa_supplicant.conf in the same location as follows:
Contents of wpa_supplicant.conf
Alternately, wpa_passphrase
utility from wpa_supplicant package can be used to create the encrypted version of the above file as follows:
$ wpa_passphrase 'mySSID' 'myPassPhrase' > wpa_supplicant.conf
The above encrypted version of the wpa_supplicant.conf file may be placed in the same location.
Boot the system with the above setup: usual Installation steps can then be performed remotely using ssh
To find the ip of your headless host, one may use the nmap
tool from nmap package as follows: $ nmap -v -sn 192.168.1.0/24
Alternative custom install media preparation steps
A Custom install media for a headless host can be created using a customizable boot device as per the below process.
- Booting the customizable boot device on some computer with a display and keyboard attached, or in a virtual machine, and doing an intermediate "diskless" setup of just the boot media (more details below), i.e. using the offical
setup-alpine
to configure the system's network, possibly for dhcp if needed, a ssh server, and a login user. - Choosing "disks=none" for now, yet, configure to store configs on the customizable boot device.
- Use
lbu commit
to store the configs as local backup. Then your completed setup, including its securely created own private keys, will readily get (re)loaded on every subsequent (headless) boot from your custom-build<hostname>.apkovl.tar.gz
stored on the customizable boot device.
See also
- Customizable boot device page
- Diskless page with information on apkovl
- Alpine local backup
- Bootstrap Alpine Linux on a headless system using pre-built
apkovl
overlay file.