Amazon Linux 2 and 2023
2 and 2023 for users
image-garden finds the newest Amazon Linux 2 and 2023 KVM images with a small program that reads Amazon's SHA256SUMS list, on x86_64 (Amazon Linux 2 with BIOS) and aarch64 (Fedora's EDK2 and -cpu neoverse-n1); Amazon Linux 2 powers off by hand after provisioning, and guests have an amazonlinux user.
On the map: systems
▶ Watch this deck — 6 scenes, ~5 min
Worth seeing first
- The support matrix — where Amazon Linux sits among the other families
01 Amazon Linux outside Amazon
Four systems: amazonlinux-cloud-2 and amazonlinux-cloud-2023, each on x86_64 and aarch64, from cdn.amazonlinux.com.
If your software runs on AWS, sooner or later it meets Amazon Linux, Amazon's own distribution. It's worth testing there before you pay for an instance, and you can: Amazon publishes it as images for KVM too, and image-garden uses those. There are two generations. Amazon Linux 2 is the older one, and Amazon Linux 2023 its successor. Each runs on x86_64 and 64-bit Arm, which makes four systems, such as amazonlinux-cloud-2023.x86_64. Unlike ubuntu-cloud-24.04.x86_64, none of them has a fixed URL. This deck shows how image-garden finds them, how they boot, what their first boot does differently, and what to keep in mind.
Details and sources
Details
data/amazonlinux.inihasGroup=amazonlinux,Variant=cloudand four sections:amazonlinux-cloud-2andamazonlinux-cloud-2023, each.x86_64and.aarch64, all withURLPrograminstead ofURL(amazonlinux.ini:4-42).- The images come from Amazon's KVM directories,
https://cdn.amazonlinux.com/os-images/latest/kvm/and…/kvm-arm64/for 2,https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/and…/kvm-arm64/for 2023. - The README: versions 2 and 2023 on x86_64 and aarch64, with
neoverse-n1for aarch64 (README.md:621-625). ubuntu-cloud-24.04.x86_64names its image with a fixedURL(ubuntu.ini:237-242).- That Amazon Linux is AWS's own distribution and that 2023 succeeds 2 is Amazon's description (derived, not in the source).
Read more
02 The URL is found at build time
The first make fetches Amazon's SHA256SUMS list with curl, and awk prints the KVM image's URL; the same list checks the download. The version in the URL goes into the cached name, such as amazonlinux-cloud-2023-2023.12.20261120.0.x86_64.qcow2.
Amazon puts a version number in every file name, and a new build replaces the old one as it's published, so a URL written down today would go stale. So image-garden finds the URL itself, the first time you build the system: curl fetches Amazon's SHA256SUMS list for that generation and architecture, and awk prints the URL of the one KVM qcow2 file it names. The same list then checks the download. And the version in that URL goes into the cached file's name, so the image is saved as amazonlinux-cloud-2023, then the version, then the architecture.
Details and sources
Details
- The program fetches Amazon's
SHA256SUMSlist with curl, and awk prints the first KVM qcow2 for the architecture; the same list checks the download, and the version becomes part of the cached name (amazonlinux.ini:26-33). - The names on the slide are what Amazon's lists held on 21 November 2026:
al2023-kvm-2023.12.20261120.0-kernel-6.1-x86_64.xfs.gpt.qcow2andamzn2-kvm-2.0.20261120.0-x86_64.xfs.gpt.qcow2("run"), and the local name the template gives the first. - Downloads are cached in
$GARDEN_DL_DIR/amazonlinux/.
for contributors
In the data
- Amazon Linux 2023 on x86_64:
URLProgram=$(CURL) https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/SHA256SUMS | awk '$$2 ~ /^al2023-kvm-[^ ]*-x86_64\.xfs\.gpt\.qcow2$$/ { print "https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/"$$2; exit }', withURLPattern,LocalFilenameTemplate=amazonlinux-cloud-2023-@1.x86_64.qcow2andSHA256SUMSpointing at the same list (amazonlinux.ini:26-33). The other three sections differ only in directory, prefix (amzn2-kvm-for 2) and architecture (arm64in Amazon's names). - make runs the program as the recipe of the system's
.urlfile (rulegen.py:526-530); the.filenamerule appliesURLPatternandLocalFilenameTemplate(rulegen.py:546-591); the download is checked withdownload-with-sha256sumsagainstSHA256SUMS(rulegen.py:496-517), which looks up the local name and falls back to the URL's basename (image-garden:508-515).
Read more
- URLProgram and local file names: the same mechanism, followed with Gentoo.
- Downloading and checking images.
03 How they boot
amazonlinux-cloud-2.x86_64 boots with BIOS, the rest with UEFI. Both aarch64 systems use Fedora's EDK2 and -cpu neoverse-n1.
On x86_64, Amazon Linux 2 boots the old way, so QEMU's own BIOS starts it, while 2023 boots with UEFI. On 64-bit Arm both use UEFI, but not the EDK2 your distribution ships: their boot loaders predate what newer EDK2 enforces, so they're on the list that boots with Fedora's build. Arm needs one more change. image-garden sets the CPU model for both aarch64 systems to neoverse-n1 instead of max, and with that they boot. QEMU emulates that model happily on an x86 host. On a 64-bit Arm host, your CPU has to be recent enough to offer it. A Raspberry Pi 5's isn't, so there you'd run these two emulated, on an x86_64 machine.
Details and sources
Details
amazonlinux-cloud-2.x86_64hasBoot=bios; the other threeBoot=efi(amazonlinux.ini:8-42). Withbios, the.runscript has no firmware files and QEMU uses its default BIOS (sys-boot; SeaBIOS is derived).amazonlinux-cloud-2andamazonlinux-cloud-2023are inGARDEN_AARCH64_FEDORA_EDK2_SYSTEMS, the aarch64 systems "whose shim or grub predate what newer EDK2 enforces" (mk/010-qemu-aarch64.mk:114-145).mk/050-amazonlinux-2.mksetsQEMU_CPU_AARCH64=neoverse-n1for the.qcow2and.runof both aarch64 systems (mk/050-amazonlinux-2.mk:10-11); the default ismax(mk/010-qemu-aarch64.mk:5). The commit that added it, 3477e1a, says it "fixes booting for both" and "requires sufficiently new ARM CPU if used natively".- image-garden's CI: "Amazon Linux on aarch64, emulated on x86_64" (.gitlab-ci.yml:907-917); commit 422add9 moved it there to emulate "more recent ARM instruction set than is supported on Raspberry Pi 5". The slide's advice for a Raspberry Pi 5 host is derived from that commit.
Read more
04 A first boot with one more line
AMAZONLINUX_2_CLOUD_INIT_USER_DATA_TEMPLATE adds shutdown --poweroff now; 2023 uses the common template. Users root/root and amazonlinux/amazonlinux.
Every other system switches itself off after the provisioning boot with cloud-init's power state module. Amazon Linux 2's cloud-init doesn't support it, so without help that boot would never end. So a small make file defines a template just for group amazonlinux, release 2: the common template, plus shutdown --poweroff now at the end of runcmd. Amazon Linux 2023 uses the common template. Either way you get root and a user called amazonlinux, each with its own name as password, not the ec2-user you may know from AWS. And as on the other RPM families, yum and dnf don't go through pkgproxy.
Details and sources
Details
- "Amazon Linux 2 does not support the power_state module so power off by hand":
AMAZONLINUX_2_CLOUD_INIT_USER_DATA_TEMPLATEis$(BASE_CLOUD_INIT_USER_DATA_TEMPLATE)plus- shutdown --poweroff now(mk/050-amazonlinux-2.mk:4-8). The picker tries the group-and-release name first (mk/010-qemu.mk:285-298); for 2023 there is none, so the common template applies. - The common template asks cloud-init to power off with
power_state(mk/010-qemu.mk:187-195). - Users:
root/rootandamazonlinux/amazonlinuxwith passwordless sudo; the group is the user's name (rulegen.py:467, mk/010-qemu.mk:200-211). Host namesamazonlinux-2andamazonlinux-2023.ec2-useris the default user of Amazon's images on EC2, which ausers:list withoutdefaultdoes not create (derived). - pkgproxy: the
snapsetup script andGOPROXY, no script for yum or dnf (mk/010-qemu.mk:127-180). - Known discrepancy: Quirk templates start from the base template. Amazon Linux 2's template builds on
BASE_CLOUD_INIT_USER_DATA_TEMPLATE, so a project that redefinesCLOUD_INIT_USER_DATA_TEMPLATEin.image-garden.mkchanges every system but Amazon Linux 2 (and Gentoo); defineAMAZONLINUX_2_CLOUD_INIT_USER_DATA_TEMPLATEtoo, keeping its shutdown line.
05 Worth knowing before you test
Amazon Linux 2 has an announced end of support; 2023 is based on Fedora and uses dnf. The build found first is kept until a makefile changes. On Arm hosts, neoverse-n1 needs a recent CPU.
A few things set Amazon Linux apart. Amazon Linux 2 is the older generation, and Amazon has announced an end of support for it. New builds still appeared when this deck was written, but plan your move to 2023. The two differ inside, too: 2 uses yum and 2023 uses dnf, and 2023 is based on Fedora. image-garden keeps the build it found until a makefile changes or you clear the cache, so two machines can test different builds under the same system name. And on a 64-bit Arm host, remember the CPU model: if your CPU can't offer neoverse-n1, run these systems emulated.
Details and sources
Details
- Amazon's announced end of support for Amazon Linux 2, the package managers (yum on 2, dnf on 2023) and 2023's Fedora base are Amazon's own descriptions (derived, not in the source). Amazon's list still named a new Amazon Linux 2 build,
amzn2-kvm-2.0.20261120.0, on 21 November 2026 ("run"). - The
.urlfile depends only on the makefiles, so the program runs again only whenimage-garden.mkor.image-garden.mkchanges or the file is removed (rulegen.py:526-530); see when upstream moves on. QEMU_ACCEL_MACHINE_PROPis read by the.runscript; its default is,accel=kvm:tcgwhen QEMU supports KVM (README.md:943-945, mk/010-qemu-aarch64.mk:34-63). With,accel=tcgQEMU emulates the CPU. The provisioning boot reads it from the environment as well (mk/010-qemu-aarch64.mk:15).
06 Where to go from here
Next: how the URL is found, per-distro quirks, Enterprise Linux, UEFI firmware, the six architectures, the users and the support matrix.
So Amazon Linux is four systems found by a program, a CPU model of their own on Arm, and one extra line to switch Amazon Linux 2 off. From here, a deck for contributors explains, step by step, how the URL and the local name are found, and the quirks deck sets the power-off beside the other per-distribution changes. The Enterprise Linux deck covers the RHEL family, and the firmware deck Fedora's EDK2. The architecture deck shows the Arm machine and its CPU options, the users deck the users, and the support matrix every family side by side.
Details and sources
Read more
Basis of the statements on this page
The tables are read from data/amazonlinux.ini, mk/050-amazonlinux-2.mk, mk/010-qemu-aarch64.mk, mk/010-qemu.mk and rulegen.py at the commit in garden.commit ("code"). The current file names were fetched from Amazon's SHA256SUMS lists on 21 November 2026 ("run"). Amazon Linux's support dates, package managers and default user are Amazon's own descriptions ("derived").
The four systems
| System | Arch | Boot | Image directory | Amazon's file name | Local file name | CPU | aarch64 firmware | Section |
|---|---|---|---|---|---|---|---|---|
amazonlinux-cloud-2.x86_64 | x86_64 | bios | https://cdn.amazonlinux.com/os-images/latest/kvm/ | amzn2-kvm-VERSION-x86_64.xfs.gpt.qcow2 | amazonlinux-cloud-2-VERSION.x86_64.qcow2 | max | — | amazonlinux.ini:8-15 |
amazonlinux-cloud-2.aarch64 | aarch64 | efi | https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/ | amzn2-kvm-VERSION-arm64.xfs.gpt.qcow2 | amazonlinux-cloud-2-VERSION.aarch64.qcow2 | neoverse-n1 | Fedora's EDK2 | amazonlinux.ini:17-24 |
amazonlinux-cloud-2023.x86_64 | x86_64 | efi | https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/ | al2023-kvm-VERSION-kernel-K-x86_64.xfs.gpt.qcow2 | amazonlinux-cloud-2023-VERSION.x86_64.qcow2 | max | — | amazonlinux.ini:26-33 |
amazonlinux-cloud-2023.aarch64 | aarch64 | efi | https://cdn.amazonlinux.com/al2023/os-images/latest/kvm-arm64/ | al2023-kvm-VERSION-kernel-K-arm64.xfs.gpt.qcow2 | amazonlinux-cloud-2023-VERSION.aarch64.qcow2 | neoverse-n1 | Fedora's EDK2 | amazonlinux.ini:35-42 |
- Checksum source:
SHA256SUMSin the image directory, the same list theURLProgramreads;HASH NAMElines (rulegen.py:496-517). - On 21 November 2026 the lists named
amzn2-kvm-2.0.20261120.0-x86_64.xfs.gpt.qcow2andal2023-kvm-2023.12.20261120.0-kernel-6.1-x86_64.xfs.gpt.qcow2. - A new build is found when the
.urlfile is made again: after a change toimage-garden.mkor.image-garden.mk, or once it is deleted. Older builds stay in$GARDEN_DL_DIR/amazonlinux/until removed (bt-urlprogram).
First boot
- Template:
AMAZONLINUX_2_CLOUD_INIT_USER_DATA_TEMPLATEfor release 2, the base template plus- shutdown --poweroff now(mk/050-amazonlinux-2.mk:4-8); the common template for 2023. - Users:
root/rootandamazonlinux/amazonlinuxwith passwordless sudo, notec2-user(mk/010-qemu.mk:200-211). Host namesamazonlinux-2andamazonlinux-2023. - pkgproxy: the
snapsetup script andGOPROXYonly; yum and dnf are not proxied (mk/010-qemu.mk:127-180).
QEMU on aarch64
QEMU_CPU_AARCH64=neoverse-n1for both aarch64 systems'.qcow2and.run(mk/050-amazonlinux-2.mk:10-11).- Fedora's EDK2 from
GARDEN_AARCH64_FEDORA_EDK2_SYSTEMS(mk/010-qemu-aarch64.mk:134-145). - To emulate on an Arm host whose CPU lacks the model:
QEMU_ACCEL_MACHINE_PROP=,accel=tcg(README.md:943-945).
Roads from here
SYSTEMS · distributions
- AlmaLinux, CentOS Stream, Oracle Linux and Rocky Linux — AlmaLinux, CentOS Stream, Oracle Linux and Rocky Linux, the RHEL family
- The support matrix — every family and architecture side by side
ARCHITECTURES · machines and firmware
- UEFI firmware per system — Fedora's EDK2, which both aarch64 systems boot with
- Six architectures, six QEMU machines — the aarch64 machine and CPU options behind neoverse-n1
FIRST BOOT · cloud-init changes
- What differs per distribution — Amazon Linux 2's power-off template beside the other per-distribution changes
- The users every system gets — the root and amazonlinux users and their passwords
BUILD TIME · data and rules
- URLProgram and local file names — for contributors, how the URL and the cached name are found, step by step