Skip to content

Packer templates for creating Ubuntu Server images with Packer + QEMU + Autoinstall (cloud-init)

License

Notifications You must be signed in to change notification settings

meese-enterprises/packer-ubuntu-server-uefi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packer-ubuntu-server-uefi

Templates for creating Ubuntu Server images with Packer + QEMU + Autoinstall (cloud-init)

Currently supported images:

Name Version
Focal Fossa 20.04.6
Jammy Jellyfish 22.04.4
Noble Numbat 24.04

An accompanying blogpost is available here.

Usage

Use GNU-Make to perform validation / build images:

Validation

To validate cloud-init and ubuntu.pkr.hcl template perform:

make validate

To simply validate cloud-init against all distros:

make validate-cloudinit

To validate cloud-init configuration of a specific distro (focal, jammy, noble):

make validate-cloudinit-<distroname>

To simply validate ubuntu.pkr.hcl template against all distros:

make validate-packer

Build Images

To build Ubuntu 20.04 (Focal) image:

make build-focal

To build Ubuntu 22.04 (Jammy) image:

make build-jammy

To build Ubuntu 24.04 (Noble) image:

make build-noble

UEFI BootLoader Sequence Determination

See the late-commands in the user-data file. This is determined by installing efibootmgr on the live image and performing sudo efibootmgr. This lists what are the sequences and when should the image be booted.

NOTE: there seems to be compatibility issue between Ubuntu 24.04 and older Ubuntu LTS version in terms of output from the efibootmgr, namely capitalization. Hence each Cloud-Init user-data now is in a separate directory under the http directory in the repo.

About

Packer templates for creating Ubuntu Server images with Packer + QEMU + Autoinstall (cloud-init)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 69.6%
  • Makefile 27.1%
  • Dockerfile 3.3%