Skip to main content

ubuntu-server-netboot

This utility generates a netboot directory tree from an Ubuntu Server Live ISO image, an image based on the subiquity installer. The tree contents are similar to the contents of the netboot.tar.gz file that debian-installer builds provide. Example:

$ ./ubuntu-server-netboot --url http://releases.ubuntu.com/focal/ubuntu-20.04.2-live-server-amd64.iso
INFO: Downloading http://releases.ubuntu.com/focal/ubuntu-20.04.2-live-server-amd64.iso
INFO: Attempting to download http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/uefi/grub2-amd64/current/grubx64.efi.signed
INFO: Netboot generation complete: /tmp/tmpo54145m2/ubuntu-installer

The --url parameter is used for 2 reasons:

  1. ubuntu-server-netboot will download the image at runtime to extract the necessary files from it.
  2. Subiquity-based installs need to download an image at install-time. ubuntu-server-netboot will generate configuration files that point the installer to this URL.

If you have a local copy of the ISO, you can point to it with the --iso parameter to avoid having ubuntu-server-netboot download an extra copy. Just be sure that --iso and --url point to the same version of the ISO.

Optionally, you can place --autoinstall-url to tell the netbooting process to enable subiquity automation. See our autoinstall example and [the autoinstall and Automated Server Installs Introduction of Ubuntu Server guide](Automated Server Installs Introduction) for more details.

You can also add additional kernel command line arguments (e.g. "console=ttyS0") to the generated configuration files using the --extra-args parameter.

Usage of the Generated Files

Copy the files generated under the interim folder /tmp/tmpxxx/ubuntu-installer/ to your tftp root folder for netboot, for example /srv/tftp or /var/lib/tftpboot. You may check your tftpd configuration of the root directory, for instance, tftpd-hpa is /etc/default/tftpd-hpa. Let's copy:

$ sudo cp -r /tmp/tmpxxx/ubuntu-installer/* /srv/tftp

Then your netboot server is ready to go if the corresponding DHCP is set up.

Troubleshooting

For more details on setting up a PXE environment for x86 systems using a legacy BIOS, see this discourse post.

For more details on setting up a PXE environment for UEFI-based systems, see this discourse post.

Dependencies

Today ubuntu-server-netboot needs to run on Ubuntu or another Debian derivative with the following packages installed:

  • genisoimage
  • mtools
  • python3-distro-info
  • pxelinux (x86-only)
  • syslinux-common (x86-only)

This script is tested with Ubuntu 18.04 ("bionic beaver") and above.

Contribution and Development

Please report bugs to this github issue tracker. The github templates including "Issue" and "Pull requests" are originally forked from this "cookiecutter" templates for python.

Place pytest to cover the basic test sets.

Metadata

Release files for ubuntu-server-netboot 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ubuntu-server-netboot 0.1.1
File Size Uploaded Provenance
ubuntu-server-netboot-0.1.1.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ubuntu-server-netboot 0.1.1
File Interpreter ABI Platform
ubuntu_server_netboot-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / ubuntu-server-netboot-0.1.1.tar.gz

Download URL ubuntu-server-netboot-0.1.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3adf17ceba0f8a051dbf2d78c81c5a375df9d4cf53747ca480b34e3312a5dbec
BLAKE2b-256 checksum
How to use checksums
08b561dd6913eef3ac41864264056e3c5cc7bd4233b6c815a442c882a44daa94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.9 Linux/5.4.0-73-generic

Release files / ubuntu_server_netboot-0.1.1-py3-none-any.whl

Download URL ubuntu_server_netboot-0.1.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba1a3c7e2a1f6d23d66b28d98fa326758f4ee8813d76ab7d5724b86747fa4bfa
BLAKE2b-256 checksum
How to use checksums
1fe9ce510b599ba4c52d3bc9b3034bedb6f8dd0d6ddd3964234738edd9e2da6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.9 Linux/5.4.0-73-generic

Security for ubuntu-server-netboot 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page