From df59351bf17e7c6a0b46be12e5275f76c4ccdeed Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 5 Oct 2022 21:45:09 +0200 Subject: [PATCH] penguin: Make fedora/rockylinux to boot (#181) * :penguin: Add fedora and rockylinux * :penguin: Add tools to fedora/rh images * :robot: Add tests to circleci * :robot: Configure the CPU required for running rhel on vms * Enable ttys * :robot: Disable tests on fedora/rockylinux QEMU TCG doesn't support AVX: https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level#recommendations_for_rhel_9 * :robot: Don't release rockylinux/fedora --- Earthfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index 8e534f5..1d7a25c 100644 --- a/Earthfile +++ b/Earthfile @@ -164,6 +164,8 @@ framework: IF [ "$FLAVOR" == "ubuntu-rolling" ] ARG TOOLKIT_IMG="ubuntu" + ELSE IF [ "$FLAVOR" == "rockylinux" ] + ARG TOOLKIT_IMG="fedora" ELSE IF [ "$FLAVOR" != "ubuntu" ] && [ "$FLAVOR" != "opensuse" ] && [ "$FLAVOR" != "fedora" ] ARG TOOLKIT_IMG="opensuse" ELSE @@ -173,7 +175,7 @@ framework: RUN luet install -y --system-target /framework \ system/elemental-toolkit-$TOOLKIT_IMG - IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "alpine-arm-rpi" ] + IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "alpine-arm-rpi" ] RUN luet install -y --system-target /framework \ distro-kernels/opensuse distro-initrd/opensuse END @@ -250,6 +252,15 @@ docker: # Regenerate initrd if necessary IF [ "$FLAVOR" = "opensuse" ] || [ "$FLAVOR" = "opensuse-arm-rpi" ] || [ "$FLAVOR" = "tumbleweed-arm-rpi" ] RUN mkinitrd + ELSE IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] + RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \ + ln -sf "${kernel#/boot/}" /boot/vmlinuz + RUN kernel=$(ls /lib/modules | head -n1) && \ + dracut -v -N -f "/boot/initrd-${kernel}" "${kernel}" && \ + ln -sf "initrd-${kernel}" /boot/initrd + RUN kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" + # https://github.com/kairos-io/elemental-cli/blob/23ca64435fedb9f521c95e798d2c98d2714c53bd/pkg/elemental/elemental.go#L553 + RUN rm -rf /boot/initramfs-* ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-rolling" ] RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \ ln -sf "${kernel#/boot/}" /boot/vmlinuz