From 71f516f68de9291dd34cebb2b1e0d43ba79b274f Mon Sep 17 00:00:00 2001 From: "elston.lewis" Date: Mon, 29 Apr 2024 10:39:24 +0200 Subject: [PATCH] Added Ubuntu24.04 --- Jenkinsfile | 5 +++++ README.md | 1 + scripts/base/ubuntu2404.sh | 10 ++++++++++ scripts/linux/boot.sh | 2 +- scripts/linux/cloud-init.sh | 2 +- 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 scripts/base/ubuntu2404.sh diff --git a/Jenkinsfile b/Jenkinsfile index 12ee3bb..cc6e30e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,6 +56,11 @@ switch(OS) { script_base = "ubuntu2204" break + case "Ubuntu 24.04": + base_name = "Ubuntu-24.04" + script_base = "ubuntu2404" + break + case "Debian 12": base_name = "Debian-12" script_base = "debian12" diff --git a/README.md b/README.md index 3805873..698d303 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ The following Linux scripts are provided and can be used in `SCRIPT_BASE`: * rhel9csp (RedHat Enterprise Linux 9) * ubuntu2004 (Ubuntu 20.04) * ubuntu2204 (Ubuntu 22.04) + * ubuntu2404 (Ubuntu 24.04) * debian11 (Debian 11) * debian12 (Debian 12) * arch (ArchLinux) diff --git a/scripts/base/ubuntu2404.sh b/scripts/base/ubuntu2404.sh new file mode 100644 index 0000000..e3e20d5 --- /dev/null +++ b/scripts/base/ubuntu2404.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +#### BASIC IMAGE +yum install -y wget qemu-img sg3_utils libgcrypt +cd /tmp +wget -q https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img +wget -q https://cloud-images.ubuntu.com/releases/24.04/release/MD5SUMS +if [[ $(md5sum -c MD5SUMS 2>&1 | grep -c OK) < 1 ]]; then exit 1; fi +qemu-img convert ./*.img -O raw /dev/sda diff --git a/scripts/linux/boot.sh b/scripts/linux/boot.sh index 93bef01..b958562 100644 --- a/scripts/linux/boot.sh +++ b/scripts/linux/boot.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -if [[ "$1" == "ubuntu20"* ]] || [[ "$1" == "ubuntu22"* ]]; then +if [[ "$1" == "ubuntu20"* ]] || [[ "$1" == "ubuntu22"* ]] || [[ "$1" == "ubuntu24"* ]]; then # Fix for network interfaces not picked up sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="acpi_irq_isa=10 net.ifnames=0"/g' /mnt/etc/default/grub chroot /mnt/ update-grub diff --git a/scripts/linux/cloud-init.sh b/scripts/linux/cloud-init.sh index dc6168a..29e4cac 100644 --- a/scripts/linux/cloud-init.sh +++ b/scripts/linux/cloud-init.sh @@ -3,7 +3,7 @@ set -e cp /tmp/cloudinit/*.cfg /mnt/etc/cloud/cloud.cfg.d/ -if [[ "$1" == "ubuntu2204" ]] || [[ "$1" == "rocky9" ]]; then +if [[ "$1" == "ubuntu2204" ]] || [[ "$1" == "ubuntu2404" ]] || [[ "$1" == "rocky9" ]]; then #Add FNI Hotplug support cp /tmp/cloudinit-specific/06_hotplug.cfg /mnt/etc/cloud/cloud.cfg.d/ fi