diskimage-builder/diskimage_builder/elements/rocky-container
Ian Wienand 99f10f9380 rockylinux : create machine-id early
Somewhere between the upstream container
rockylinux/rockylinux:8.6.20220515 and the latest release, systemd
started to be pre-installed in the container.

With <= 20220515 installing the kernel-core package would end up
pulling in systemd.  As part of the systemd package installation, the
/etc/machine-id file is created and populated.

The kernel package post-install steps install the kernel with
/bin/kernel-install; this is responsible for copying the kernel
binaries into /boot.  It does this based on the machine-id, and it
seems its failure case with a blank machine-id is to simply skip
copying the kernels into /boot.  To compound this problem, it seems
our bootloader installation doesn't notice that we don't have a kernel
installed, so we end up building an unbootable image.

Testing is/was showing us this; but as rocky is non-voting and this
occured at a random time (rather than in response to a dib change) I
think it slipped by us.

To work around this, create the machine-id early in the container.  We
already have paths that remove the machine-id from final images.

Change-Id: I07e8262102d4e76c861667a98ded9fc3f4f4b82d
2022-08-01 15:55:11 +10:00
..
containerfiles rockylinux : create machine-id early 2022-08-01 15:55:11 +10:00
environment.d Add new container element - Rocky Linux 2022-01-31 17:26:16 +00:00
test-elements/build-succeeds Add rocky support to the epel element 2022-02-21 14:38:30 -08:00
element-deps Add new container element - Rocky Linux 2022-01-31 17:26:16 +00:00
package-installs.yaml Add new container element - Rocky Linux 2022-01-31 17:26:16 +00:00
README.rst Add new container element - Rocky Linux 2022-01-31 17:26:16 +00:00

================
rocky-container
================

Create a minimal image based on Rocky Linux container image

This element sets the ``DISTRO_NAME`` var to 'rocky'. The release of
rocky to be installed can be controlled through the ``DIB_RELEASE``
variable, which defaults the latest supported release.