This page describe how to configure a server running Ubuntu 20.04 Server for UEFI netbooting Ubuntu 20.04 Desktop and preseed it for automatic installation using Debian preseed.
Quick way
Install Ubuntu 20.04 Server with a static ip address:
network: version: 2 ethernets: enp0s3: addresses: - "10.0.2.2/24" nameservers: addresses: - 10.0.2.1 dhcp4: false routes: - to: "default" via: "10.0.2.1"Define server’s host it the Ansible inventory:
[servers] tp-serverAdjust the content of the playbook
server-netboot.ymlto your need:- name: Setup netboot server hosts: tp-server gather_facts: yes roles: - role: ufrmath.computer_labs.server_netboot ntp_server: ntp1.jussieu.fr allowed_ips: [10.0.2.0/24, 10.0.3.0/24] vars: ansible_ssh_pass: test ansible_become_pass: testRun the playbook:
ansible-playbook -i hosts server-netboot.yml
To assign fixed ips based on the MAC addresses, the following file can be edited:
00:01:02:03:04:10,10.0.2.10,tp-10
00:01:02:03:04:e1,10.0.2.11,tp-11
Documentation
See the role ufrmath.computer_labs.server_netboot for more details.
More detailed explanations on UEFI netboot are located in the official Ubuntu documentation.
Details
The role first uses dnsmasq to serve required files for netboot over embedded TFTP server, in particular the grub bootloader. Then and an nginx server is used to serve the kernel, initrd, ISO image and preseed file. Finally, a Debian preseed is configured for automatic installation.
The main steps done automatically by the Ansible role are detailed in a “manual” way: