Booting Flatcar Linux via iPXE

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

A mininum of 3 GB of RAM is required to boot Flatcar 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 Linux iPXE boot script there are a few kernel options that may be useful but all are optional.

Choose a Channel

Flatcar 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 Linux 1981.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 flatcar.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 Linux 1967.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 flatcar.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 Linux are battle-tested within the Beta and Alpha channels before being promoted. The current version is Flatcar Linux 1911.4.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 flatcar.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 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 Linux should boot normally.

Update process

Since Flatcar 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 Linux can be completely installed on disk or run from RAM but store user data on disk. Read more in our Installing Flatcar Linux guide.

Adding a custom OEM

Similar to the OEM partition in Flatcar 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 Linux

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