[spec] Publishing netboot artifacts

Abstract

Historically we have published the artifacts necessary to netboot the d-i-based server installer. We should publish them for the subiquity-based installer too.

Rationale

For releases 18.04 and prior, we provide reasonably convenient instructions and artifacts to netboot a machine into a server. We should do the same for later releases (and also provide instructions that work with UEFI!).

Specification

For 18.04, we provide an entry point (https://cdimage.ubuntu.com/netboot/bionic/) that leads a user to a tarball they can untar at the root directory of a tftp server such that a netbooting machine can be pointed at “/pxelinux.0” in this directory via BOOTP and end up in an installation environment.

We should provide a similar entry point for newer releases (and also make UEFI boot equally easy to set up). This will take the form of a set of files (and a convenience tarball containing them) that will be published in the same directory as the dailies. So the https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/ directory will contain a directory ‘netboot’ which will contain directories ‘amd64’, ‘arm64’ and so on. Untarring the supplied tarball into the root directory of a tftp server and configuring bootp as documented will result in a working netboot environment. It will be possible to untar tarballs for multiple architectures into one directory without conflicts.

The bootloader config will need to include a URL for the ISO for the installer. By default, we’ll point to the directory the netboot files were downloaded from, but we should make it as easy as possible for the user to override this (maybe by adding a specific file or something).

Every architecture needs a kernel (which will be called “$arch/linux”) and casperized initrd (which will be called “$arch/initrd” – except for s390x where these have different names to match user expectations, see below). Additional files are needed per-architecture (yes, this is a screenshot of a google doc, discourse’s table support is annoying):

artefact

We should configure the e.g. https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/netboot/amd64/ directory listing to contain or link to configuration snippets for at least dnsmasq and dhcpd.

The https://cdimage.ubuntu.com/netboot/jammy/ directory should link to https://cdimage.ubuntu.com/ubuntu-server/jammy/daily-live/current/netboot/$arch for each arch.

Implementation

Most of the implementation work for this will be making changes to lp:ubuntu-cdimage. It already copies most of the files we need around when making a live server ISO:

  • The kernel and initrd are produced by the livecd-rootfs build
  • The signed shim and grub binaries are in the cd-boot-images-amd64 and cd-boot-images-arm64 packages
  • pxelinux.0 is part of the pxelinux package so we can fish it out of there but we should add pxelinux.0 to cd-boot-images-amd64

We will probably need to write some code to generate the grub and pxelinux config files.

Possible future work

  • Include the hwe kernel and have bootloader configs that offer a choice between generic and hwe but boot generic after a short delay.
  • Make a UEFI bootable “micro.iso” that has shim, grub, grub.cfg, kernel, initrd and the grub.cfg has “ip=dhcp url=https://cdimage.ubuntu.com/path/to/full.iso”.
  • Add some top level URLs / redirects that make it easy to use efibootmgr to add a boot entry to network boot from ubuntu.com.
    • It’s not clear that this is possible, although it might well be. All the documentation about this sort of thing sucks.

Further Information

Some helpful links:

https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml

https://github.com/dannf/ubuntu-server-netboot

https://discourse.ubuntu.com/t/netbooting-the-live-server-installer/14510
https://discourse.ubuntu.com/t/netbooting-the-live-server-installer-on-ibm-power-ppc64el-with-petitboot
Interactive live server installation on IBM z/VM (s390x) (netbooting on s390x - non-PXE)

https://github.com/ibm-s390-linux/s390-tools/tree/master/netboot

https://c-nergy.be/blog/?p=13822

https://www.ibm.com/support/pages/sites/default/files/inline-files/SB10-7176-01.pdf

https://cpaelzer.github.io/blogs/004-s390x-kvm-pxe-on-ubuntu/

One day we may want to support booting via grub for amd64 BIOS rather than pxelinux.0 as we don’t use syslinux for anything else currently. But the network code in grub that would be used for this is not battle tested (to put it mildly).

Appendix – what we ship for 18.04 amd64

For bionic amd64 we ship at http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/:
image

The tl;dr is that you untar the netboot.tar.gz archive at the root directory your tftpd is serving from and then point the machine you want to netboot at “/pxelinux.0” on this tftp server via BOOTP.

4 Likes

Bah I can’t get discourse tables or images to do anything useful. Try this link for the table of filenames.

1 Like

Yes, please.

What are the chances of this being implemented? What do you need? How can I help?

I don’t use the grub part since we have our own ipxe-based PXE boot, but the d-i-ified initrd and kernel is quite central to our installation process.

A process that is failing with the latest machines from Dell since the kernel for 20.04 is too old (5.4.0-42) and the machines are not able to load drivers for the nic.

I am working on the implementation right now, so hopefully there will be something to test soon (for kinetic to start with). But note that this is still not a d-i based installer: d-i based installations are not coming back.

All of the artifacts that are going to be in the netboot tarball are already available, if not very conveniently (the kernel and initrd can be extracted from the ISO, the bootloader & grub bits are in various packages in the archive, etc).

2 Likes

Whats the official progress on this? I can see that for Ubuntu 23.04, there is a dedicated netboot folder and tarball which can easily be grabbed from http://releases.ubuntu.com/lunar/

In fact, I have already deployed have a working test machine using these netboot files.

Will the official documentation be updated to match and/or an announcement? I know projects like theforeman.org would be very interested in this.