Use a predictable ISO Volume Label (#732298)
New images find their root device by looking at the CDLABEL. Since pungi is building ISO images separately from lorax, if it uses a different ISO Volume Label we'll end up with unbootable images. This changes the volume labels to match what pungi uses, so both should boot OK.
This commit is contained in:
parent
9df3348a71
commit
f640a2faab
@ -36,7 +36,7 @@ ${make_efiboot("images/efidisk.img", include_kernel=True, disk=True)}
|
||||
replace @ROOT@ root=live:LABEL=ANACONDA ${eficonf}
|
||||
%else:
|
||||
## NOTE: this needs to match the boot.iso label (see x86.tmpl)
|
||||
replace @ROOT@ root=live:CDLABEL=${udev_escape(product.name)} ${eficonf}
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${eficonf}
|
||||
%endif
|
||||
%if efiarch == 'IA32':
|
||||
copy ${eficonf} ${EFIBOOTDIR}/BOOT.conf
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product"/>
|
||||
<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
BOOTDIR="ppc"
|
||||
@ -68,14 +68,14 @@ mkdir etc
|
||||
install ${configdir}/yaboot.conf.3264 etc/yaboot.conf
|
||||
replace @PRODUCT@ ${product.name} etc/yaboot.conf
|
||||
replace @VERSION@ ${product.version} etc/yaboot.conf
|
||||
replace @ROOT@ root=live:CDLABEL=PBOOT etc/yaboot.conf
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' etc/yaboot.conf
|
||||
%else:
|
||||
copy ${KERNELDIR}/yaboot.conf etc/yaboot.conf
|
||||
%endif
|
||||
|
||||
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
||||
${prepboot} -part -hfs -T -r -l -J \
|
||||
-A "${product.name} ${product.version}" -sysid PPC -V PBOOT \
|
||||
-A "${product.name} ${product.version}" -sysid PPC -V '${isolabel}' \
|
||||
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
||||
-hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \
|
||||
-map ${inroot}/${configdir}/mapping \
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product"/>
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
BOOTDIR="boot"
|
||||
@ -20,10 +20,10 @@ replace @PRODUCT@ ${product.name} ${BOOTDIR}/boot.msg
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${BOOTDIR}/initrd.img
|
||||
%endfor
|
||||
|
||||
replace @ROOT@ root=live:CDLABEL=PBOOT ${BOOTDIR}/silo.conf
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/silo.conf
|
||||
|
||||
runcmd mkisofs -R -J -T -G /${BOOTDIR}/isofs.b -B ... \
|
||||
-s /${BOOTDIR}/silo.conf -r -V "PBOOT" \
|
||||
-s /${BOOTDIR}/silo.conf -r -V '${isolabel}' \
|
||||
-A "${product.name} ${product.version}" \
|
||||
-x Fedora -x repodata \
|
||||
-sparc-label "${product.name} ${product.version} Boot Disc" \
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product"/>
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
SYSLINUXDIR="usr/share/syslinux"
|
||||
@ -21,7 +21,7 @@ install ${configdir}/grub.conf ${BOOTDIR}
|
||||
|
||||
replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
||||
replace @PRODUCT@ ${product.name} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
||||
replace @ROOT@ 'root=live:CDLABEL=${udev_escape(product.name)}' ${BOOTDIR}/isolinux.cfg
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
|
||||
|
||||
%if exists("boot/memtest*"):
|
||||
install boot/memtest* ${BOOTDIR}
|
||||
@ -64,7 +64,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
||||
${efiargs} -R -J -V '${product.name}' -T -graft-points \
|
||||
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
|
||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
||||
|
@ -142,12 +142,15 @@ class TreeBuilder(object):
|
||||
'''Builds the arch-specific boot images.
|
||||
inroot should be the installtree root (the newly-built runtime dir)'''
|
||||
def __init__(self, product, arch, inroot, outroot, runtime, templatedir=None):
|
||||
# NOTE: if you change isolabel, you need to change pungi to match, or
|
||||
# the pungi images won't boot.
|
||||
isolabel = "{0.name} {0.version} {1.basearch}".format(product, arch)
|
||||
# NOTE: if you pass an arg named "runtime" to a mako template it'll
|
||||
# clobber some mako internal variables - hence "runtime_img".
|
||||
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
||||
inroot=inroot, outroot=outroot,
|
||||
basearch=arch.basearch, libdir=arch.libdir,
|
||||
udev_escape=udev_escape)
|
||||
isolabel=isolabel, udev=udev_escape)
|
||||
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
|
||||
self._runner.defaults = self.vars
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user