From e61ef8cfc69047ef7060ab0bf232ff6953d830ff Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 27 Oct 2020 14:03:58 -0700 Subject: [PATCH] Switch to using upstream mk-s390image for s390 cdboot.img creation mk-s390-cdboot has stopped working because the kernel outgrew the hard-coded offset it used when creating cdboot.img. IBM now has a script in s390utils that can do the same thing so use the upstream script instead. This drops mk-s390-cdboot script, switches the s390 templates to use mk-s390image from s390utils. It adds @ROOT@ to cdboot.prm, and sets inst.stage2 so that the installer image will be found when booting the iso. Resolves: rhbz#1903923 --- 80-rhel/config_files/s390/cdboot.prm | 2 +- 80-rhel/live/s390.tmpl | 7 ++++--- 80-rhel/s390.tmpl | 8 +++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/80-rhel/config_files/s390/cdboot.prm b/80-rhel/config_files/s390/cdboot.prm index d6744d0..80c034b 100644 --- a/80-rhel/config_files/s390/cdboot.prm +++ b/80-rhel/config_files/s390/cdboot.prm @@ -1 +1 @@ -ro +ro @ROOT@ diff --git a/80-rhel/live/s390.tmpl b/80-rhel/live/s390.tmpl index f0f96df..2e30bd2 100644 --- a/80-rhel/live/s390.tmpl +++ b/80-rhel/live/s390.tmpl @@ -6,6 +6,7 @@ KERNELDIR=BOOTDIR INITRD_ADDRESS="0x02000000" LIVEDIR="LiveOS" LORAXDIR="usr/share/lorax/" +MKS390IMAGE="/usr/bin/mk-s390image" # The assumption seems to be that there is only one s390 kernel, ever kernel = kernels[0] @@ -74,10 +75,10 @@ treeinfo images-${basearch} cdboot.prm ${BOOTDIR}/cdboot.prm %endfor ## Make a combined kernel+initrd image for the iso -runcmd mk-s390-cdboot -i ${outroot}/${KERNELDIR}/kernel.img \ +runcmd ${MKS390IMAGE} ${outroot}/${KERNELDIR}/kernel.img \ + ${outroot}/${BOOTDIR}/cdboot.img \ -r ${outroot}/${KERNELDIR}/initrd.img \ - -p ${outroot}/${BOOTDIR}/cdboot.prm \ - -o ${outroot}/${BOOTDIR}/cdboot.img + -p ${outroot}/${BOOTDIR}/cdboot.prm ## make boot.iso runcmd mkisofs -o ${outroot}/images/boot.iso \ diff --git a/80-rhel/s390.tmpl b/80-rhel/s390.tmpl index bddf522..6772bc1 100644 --- a/80-rhel/s390.tmpl +++ b/80-rhel/s390.tmpl @@ -5,6 +5,7 @@ BOOTDIR="images" KERNELDIR=BOOTDIR INITRD_ADDRESS="0x02000000" LORAXDIR="usr/share/lorax/" +MKS390IMAGE="/usr/bin/mk-s390image" # The assumption seems to be that there is only one s390 kernel, ever kernel = kernels[0] @@ -24,6 +25,7 @@ install ${configdir}/generic.ins . ## configure bootloader replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins +replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/cdboot.prm ## install kernel installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img @@ -61,10 +63,10 @@ treeinfo images-${basearch} generic.ins generic.ins %endfor ## Make a combined kernel+initrd image for the iso -runcmd mk-s390-cdboot -i ${outroot}/${KERNELDIR}/kernel.img \ +runcmd ${MKS390IMAGE} ${outroot}/${KERNELDIR}/kernel.img \ + ${outroot}/${BOOTDIR}/cdboot.img \ -r ${outroot}/${KERNELDIR}/initrd.img \ - -p ${outroot}/${BOOTDIR}/cdboot.prm \ - -o ${outroot}/${BOOTDIR}/cdboot.img + -p ${outroot}/${BOOTDIR}/cdboot.prm ## make boot.iso runcmd mkisofs -o ${outroot}/images/boot.iso \