Booting Flatcar Container Linux via iPXE

These instructions will walk you through booting Flatcar Container Linux via iPXE on real or virtual hardware. By default, this will run Flatcar Container Linux completely out of RAM. Flatcar Container Linux can also be installed to disk.

A minimum of 3 GB of RAM is required to boot Flatcar Container Linux via PXE.

Configuring iPXE

iPXE can be used on any platform that can boot an ISO image. This includes many cloud providers and physical hardware.

To illustrate iPXE in action we will use qemu-kvm in this guide.

Setting up iPXE boot script

When configuring the Flatcar Container Linux iPXE boot script there are a few kernel options that may be useful but all are optional.

Choose a Channel

Flatcar Container Linux is designed to be updated automatically with different schedules per channel. You can disable this feature, although we don't recommend it. Read the release notes for specific features and bug fixes.

Setting up the Boot Script

The Alpha channel closely tracks master and is released frequently. The newest versions of system libraries and utilities will be available for testing. The current version is Flatcar Container Linux 2345.0.0.

iPXE downloads a boot script from a publicly available URL. You will need to host this URL somewhere public and replace the example SSH key with your own. You can also run a custom iPXE server.

#!ipxe

set base-url http://alpha.release.flatcar-linux.net/amd64-usr/current
kernel ${base-url}/flatcar_production_pxe.vmlinuz initrd=flatcar_production_pxe_image.cpio.gz flatcar.first_boot=1 ignition.config.url=https://example.com/pxe-config.ign
initrd ${base-url}/flatcar_production_pxe_image.cpio.gz
boot

The Beta channel consists of promoted Alpha releases. The current version is Flatcar Container Linux 2331.1.0.

iPXE downloads a boot script from a publicly available URL. You will need to host this URL somewhere public and replace the example SSH key with your own. You can also run a custom iPXE server.

#!ipxe

set base-url http://beta.release.flatcar-linux.net/amd64-usr/current
kernel ${base-url}/flatcar_production_pxe.vmlinuz initrd=flatcar_production_pxe_image.cpio.gz flatcar.first_boot=1 ignition.config.url=https://example.com/pxe-config.ign
initrd ${base-url}/flatcar_production_pxe_image.cpio.gz
boot

The Edge channel includes bleeding-edge features with the newest versions of the Linux kernel, systemd and other core packages. Can be highly unstable. The current version is Flatcar Container Linux 2303.99.1.

iPXE downloads a boot script from a publicly available URL. You will need to host this URL somewhere public and replace the example SSH key with your own. You can also run a custom iPXE server.

#!ipxe

set base-url http://edge.release.flatcar-linux.net/amd64-usr/current
kernel ${base-url}/flatcar_production_pxe.vmlinuz initrd=flatcar_production_pxe_image.cpio.gz flatcar.first_boot=1 ignition.config.url=https://example.com/pxe-config.ign
initrd ${base-url}/flatcar_production_pxe_image.cpio.gz
boot

The Stable channel should be used by production clusters. Versions of Flatcar Container Linux are battle-tested within the Beta and Alpha channels before being promoted. The current version is Flatcar Container Linux 2303.3.0.

iPXE downloads a boot script from a publicly available URL. You will need to host this URL somewhere public and replace the example SSH key with your own. You can also run a custom iPXE server.

#!ipxe

set base-url http://stable.release.flatcar-linux.net/amd64-usr/current
kernel ${base-url}/flatcar_production_pxe.vmlinuz initrd=flatcar_production_pxe_image.cpio.gz flatcar.first_boot=1 ignition.config.url=https://example.com/pxe-config.ign
initrd ${base-url}/flatcar_production_pxe_image.cpio.gz
boot

An easy place to host this boot script is on http://pastie.org. Be sure to reference the "raw" version of script, which is accessed by clicking on the clipboard in the top right.

Booting iPXE

First, download and boot the iPXE image. We will use qemu-kvm in this guide but use whatever process you normally use for booting an ISO on your platform.

wget http://boot.ipxe.org/ipxe.iso
qemu-kvm -m 1024 ipxe.iso --curses

Next press Ctrl+B to get to the iPXE prompt and type in the following commands:

iPXE> dhcp
iPXE> chain http://${YOUR_BOOT_URL}

Immediately iPXE should download your boot script URL and start grabbing the images from the Flatcar Container Linux storage site:

${YOUR_BOOT_URL}... ok
http://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe.vmlinuz... 98%

After a few moments of downloading Flatcar Container Linux should boot normally.

Update process

Since Flatcar Container Linux's upgrade process requires a disk, this image does not have the option to update itself. Instead, the box simply needs to be rebooted and will be running the latest version, assuming that the image served by the PXE server is regularly updated.

Installation

Flatcar Container Linux can be completely installed on disk or run from RAM but store user data on disk. Read more in our Installing Flatcar Container Linux guide.

Adding a custom OEM

Similar to the OEM partition in Flatcar Container Linux disk images, iPXE images can be customized with an Ignition config bundled in the initramfs. You can view the instructions on the PXE docs.

Using Flatcar Container Linux

Now that you have a machine booted it is time to play around. Check out the Flatcar Container Linux Quickstart guide or dig into more specific topics.