Unattended Boot and Install: Difference between revisions
Line 12: | Line 12: | ||
* Automatic script execution (optional) | * Automatic script execution (optional) | ||
[http://www.sodface.com/repo/headless.apkovl.tar.gz Download a pre-built overlay here.] | [http://www.sodface.com/repo/headless.apkovl.tar.gz Download a pre-built overlay file here.] | ||
= Method 1: Proxy ARP = | = Method 1: Proxy ARP = |
Revision as of 23:51, 29 April 2022
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
Introduction
This wiki describes a modified version of the original method I posted for Headless installation on a Raspberry Pi. While the original version worked for other architectures, like x86_64, it was targeted at and posted in the Raspberry Pi section since that was my primary focus at the time. Revisions to that page by other authors removed the mention of x86_64 altogether so this version will be more generally written in the hopes that it will be easier to find and that it's applicability will be clearer.
Additionally, this version improves upon the original (in my opinion) by automatically logging in the root user and optionally running a shell script. This provides a means to perform unattended installations or other scripted tasks and does not require modification of the stock Alpine installation media / files.
The following functionality is provided:
- Automatic DHCP configuration of a network interface, either wired or wireless
- Automatic configuration of sshd with password-less root login enabled
- Automatic login of the root user on tty7
- Automatic script execution (optional)
Download a pre-built overlay file here.
Method 1: Proxy ARP
These steps result in a working solution where hosts on the wired side and hosts on the wireless side are all in the same ip network. There are no frills added, such as dhcp or automatic route entries for the wired hosts. Each wired host needs to have a manually configured IP address and an entry manually added to the bridge host's routing table.
Note: For your wired hosts, use IP addresses in the same IP range as the rest of your network but outside of the scope used by a local DHCP server, if applicable. You may need to reduce your DHCP scope to free up IP addresses for this purpose.
Configure the network interfaces on your bridge host:
Contents of /etc/network/interfaces
Notice that the wireless interface (wlan0) uses dhcp from the home network as usual and that an IP address is not used at all on the wired interface (eth0).
Enable and create a local start-up script to add route entries at boot:
# rc-update add local default # touch /etc/local.d/RouteAdd.start # chmod +x /etc/local.d/RouteAdd.start