[neon/infrastructure/pangea-data] imager: add support for noble for kernel and initrd rename gumph

Jonathan Riddell null at kde.org
Tue Aug 27 14:19:53 BST 2024


Git commit 6b0e372d54daa1760467ecc70ff749d9b841b506 by Jonathan Riddell.
Committed on 27/08/2024 at 13:19.
Pushed by jriddell into branch 'master'.

add support for noble for kernel and initrd rename gumph

M  +28   -0    imager/ubuntu-defaults-image

https://invent.kde.org/neon/infrastructure/pangea-data/-/commit/6b0e372d54daa1760467ecc70ff749d9b841b506

diff --git a/imager/ubuntu-defaults-image b/imager/ubuntu-defaults-image
index 02b6b0b..e80f4ed 100755
--- a/imager/ubuntu-defaults-image
+++ b/imager/ubuntu-defaults-image
@@ -397,6 +397,34 @@ elif [ "$VERSION_CODENAME" = "jammy" ] && [ "$ARCH" = "amd64" ]; then
 rm binary/casper/initrd.img-5.15.0*
 rm binary/casper/vmlinuz-5.15.0*
 
+ls -lah binary/
+ls -lah binary/casper
+if [ ! -e binary/casper/initrd ]; then
+    echo "\$0: Renaming initramfs to initrd..."
+    mv -v binary/casper/initrd.img-* binary/casper/initrd
+fi
+if [ ! -e binary/casper/vmlinuz ]; then
+    echo "\$0: Renaming kernel to vmlinuz..."
+    # This will go wrong if there's ever more than one vmlinuz-* after
+    # excluding *.efi.signed.  We can deal with that if and when it arises.
+    for x in binary/casper/vmlinuz-*; do
+	case \$x in
+	    *.efi.signed)
+		;;
+	    *)
+		mv \$x binary/casper/vmlinuz
+		if [ -e "\$x.efi.signed" ]; then
+		    mv \$x.efi.signed binary/casper/vmlinuz.efi
+		fi
+		;;
+	esac
+    done
+fi
+EOF
+elif [ "$VERSION_CODENAME" = "noble" ] && [ "$ARCH" = "amd64" ]; then
+  cat <<EOF > config/hooks/000-rename-kernel.binary
+#!/bin/sh -ex
+
 ls -lah binary/
 ls -lah binary/casper
 if [ ! -e binary/casper/initrd ]; then


More information about the Neon-commits mailing list