f640a2faab
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.
50 lines
1.8 KiB
Cheetah
50 lines
1.8 KiB
Cheetah
<%page args="configdir, KERNELDIR, efiarch"/>
|
|
<%
|
|
EFIBOOTDIR="EFI/BOOT"
|
|
APPLE_EFI_ICON="/usr/share/pixmaps/bootloader/fedora.icns"
|
|
%>
|
|
|
|
mkdir ${EFIBOOTDIR}
|
|
install boot/efi/EFI/redhat/grub.efi ${EFIBOOTDIR}/BOOT${efiarch}.efi
|
|
install boot/grub/splash.xpm.gz ${EFIBOOTDIR}
|
|
|
|
## actually make the EFI images
|
|
${make_efiboot("images/efiboot.img")}
|
|
${make_efiboot("images/macboot.img", imgtype="apple")}
|
|
${make_efiboot("images/efidisk.img", include_kernel=True, disk=True)}
|
|
|
|
## This is kinda gross, but then... so's EFI.
|
|
<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">
|
|
<%
|
|
kdir = EFIBOOTDIR if include_kernel else KERNELDIR
|
|
eficonf = "%s/BOOT%s.conf" % (EFIBOOTDIR, efiarch)
|
|
args = "--label=ANACONDA"
|
|
if disk: args += " --disk"
|
|
if imgtype == "apple": args += " --apple --icon=%s" % APPLE_EFI_ICON
|
|
%>
|
|
%if include_kernel:
|
|
copy ${KERNELDIR}/vmlinuz ${EFIBOOTDIR}
|
|
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
|
|
%endif
|
|
install ${configdir}/grub.conf ${eficonf}
|
|
replace @PRODUCT@ ${product.name} ${eficonf}
|
|
replace @VERSION@ ${product.version} ${eficonf}
|
|
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
|
|
replace @INITRDPATH@ /${kdir}/initrd.img ${eficonf}
|
|
replace @SPLASHPATH@ /EFI/BOOT/splash.xpm.gz ${eficonf}
|
|
%if disk:
|
|
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=${isolabel|udev}' ${eficonf}
|
|
%endif
|
|
%if efiarch == 'IA32':
|
|
copy ${eficonf} ${EFIBOOTDIR}/BOOT.conf
|
|
%endif
|
|
runcmd mkefiboot ${args} ${outroot}/${EFIBOOTDIR} ${outroot}/${img}
|
|
%if include_kernel:
|
|
remove ${EFIBOOTDIR}/vmlinuz
|
|
remove ${EFIBOOTDIR}/initrd.img
|
|
%endif
|
|
</%def>
|