Make the iso only bootable on UEFI
This commit is contained in:
parent
debfb498e3
commit
9cad0081b5
@ -1,9 +1,7 @@
|
|||||||
<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
|
<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
|
||||||
<%
|
<%
|
||||||
configdir="tmp/config_files/x86"
|
configdir="tmp/config_files/x86"
|
||||||
SYSLINUXDIR="usr/share/syslinux"
|
|
||||||
PXEBOOTDIR="images/pxeboot"
|
PXEBOOTDIR="images/pxeboot"
|
||||||
BOOTDIR="isolinux"
|
|
||||||
KERNELDIR=PXEBOOTDIR
|
KERNELDIR=PXEBOOTDIR
|
||||||
LIVEDIR="LiveOS"
|
LIVEDIR="LiveOS"
|
||||||
LORAXDIR="usr/share/lorax/"
|
LORAXDIR="usr/share/lorax/"
|
||||||
@ -29,24 +27,6 @@ mkdir ${LIVEDIR}
|
|||||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||||
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
|
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
|
||||||
|
|
||||||
## install bootloader and config files
|
|
||||||
mkdir ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/vesamenu.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/ldlinux.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/libcom32.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/libutil.c32 ${BOOTDIR}
|
|
||||||
install ${configdir}/isolinux.cfg ${BOOTDIR}
|
|
||||||
install ${configdir}/boot.msg ${BOOTDIR}
|
|
||||||
install ${configdir}/grub.conf ${BOOTDIR}
|
|
||||||
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
|
|
||||||
|
|
||||||
## configure bootloader
|
|
||||||
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=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
|
|
||||||
replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/isolinux.cfg
|
|
||||||
|
|
||||||
## install kernels
|
## install kernels
|
||||||
mkdir ${KERNELDIR}
|
mkdir ${KERNELDIR}
|
||||||
%for kernel in kernels:
|
%for kernel in kernels:
|
||||||
@ -59,8 +39,6 @@ mkdir ${KERNELDIR}
|
|||||||
%endif
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
|
|
||||||
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|
||||||
%if basearch == 'x86_64':
|
%if basearch == 'x86_64':
|
||||||
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
|
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
|
||||||
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
|
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
|
||||||
@ -83,7 +61,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
%>
|
%>
|
||||||
%for img, hybrid in images:
|
%for img, hybrid in images:
|
||||||
<%
|
<%
|
||||||
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
|
efiargs += " --efi-boot {0} {1}".format(img, hybrid)
|
||||||
efigraft += " {0}={1}/{0}".format(img,outroot)
|
efigraft += " {0}={1}/{0}".format(img,outroot)
|
||||||
%>
|
%>
|
||||||
treeinfo images-${basearch} ${img|basename} ${img}
|
treeinfo images-${basearch} ${img|basename} ${img}
|
||||||
@ -120,11 +98,8 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
## make boot.iso
|
## make boot.iso
|
||||||
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
|
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
|
||||||
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
|
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
|
||||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
|
||||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
|
||||||
${efiargs} -R -J -V '${isolabel}' \
|
${efiargs} -R -J -V '${isolabel}' \
|
||||||
-graft-points \
|
-graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
||||||
${efigraft} ${filegraft}
|
${efigraft} ${filegraft}
|
||||||
|
@ -64,7 +64,7 @@ installpkg glibc-all-langpacks
|
|||||||
installpkg grub2-efi-ia32-cdboot>=${GRUB2VER}
|
installpkg grub2-efi-ia32-cdboot>=${GRUB2VER}
|
||||||
%endif
|
%endif
|
||||||
%if basearch in ("i386", "x86_64"):
|
%if basearch in ("i386", "x86_64"):
|
||||||
installpkg biosdevname syslinux
|
installpkg biosdevname
|
||||||
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
|
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
|
||||||
installpkg grub2-tools-extra>=${GRUB2VER}
|
installpkg grub2-tools-extra>=${GRUB2VER}
|
||||||
%endif
|
%endif
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/>
|
<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/>
|
||||||
<%
|
<%
|
||||||
configdir="tmp/config_files/x86"
|
configdir="tmp/config_files/x86"
|
||||||
SYSLINUXDIR="usr/share/syslinux"
|
|
||||||
PXEBOOTDIR="images/pxeboot"
|
PXEBOOTDIR="images/pxeboot"
|
||||||
STAGE2IMG="images/install.img"
|
STAGE2IMG="images/install.img"
|
||||||
BOOTDIR="isolinux"
|
|
||||||
KERNELDIR=PXEBOOTDIR
|
KERNELDIR=PXEBOOTDIR
|
||||||
LORAXDIR="usr/share/lorax/"
|
LORAXDIR="usr/share/lorax/"
|
||||||
|
|
||||||
@ -29,23 +27,6 @@ mkdir images
|
|||||||
install ${runtime_img} ${STAGE2IMG}
|
install ${runtime_img} ${STAGE2IMG}
|
||||||
treeinfo stage2 mainimage images/${runtime_base}
|
treeinfo stage2 mainimage images/${runtime_base}
|
||||||
|
|
||||||
## install bootloader and config files
|
|
||||||
mkdir ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/vesamenu.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/ldlinux.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/libcom32.c32 ${BOOTDIR}
|
|
||||||
install ${SYSLINUXDIR}/libutil.c32 ${BOOTDIR}
|
|
||||||
install ${configdir}/isolinux.cfg ${BOOTDIR}
|
|
||||||
install ${configdir}/boot.msg ${BOOTDIR}
|
|
||||||
install ${configdir}/grub.conf ${BOOTDIR}
|
|
||||||
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
|
|
||||||
|
|
||||||
## configure bootloader
|
|
||||||
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@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
|
|
||||||
|
|
||||||
## install kernels
|
## install kernels
|
||||||
mkdir ${KERNELDIR}
|
mkdir ${KERNELDIR}
|
||||||
%for kernel in kernels:
|
%for kernel in kernels:
|
||||||
@ -60,8 +41,6 @@ mkdir ${KERNELDIR}
|
|||||||
%endif
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
|
|
||||||
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|
||||||
%if basearch == 'x86_64':
|
%if basearch == 'x86_64':
|
||||||
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
|
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
|
||||||
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
|
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
|
||||||
@ -84,7 +63,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
%>
|
%>
|
||||||
%for img, hybrid in images:
|
%for img, hybrid in images:
|
||||||
<%
|
<%
|
||||||
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
|
efiargs += " --efi-boot {0} {1}".format(img, hybrid)
|
||||||
efigraft += " {0}={1}/{0}".format(img,outroot)
|
efigraft += " {0}={1}/{0}".format(img,outroot)
|
||||||
%>
|
%>
|
||||||
treeinfo images-${basearch} ${img|basename} ${img}
|
treeinfo images-${basearch} ${img|basename} ${img}
|
||||||
@ -122,13 +101,10 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
## make boot.iso
|
## make boot.iso
|
||||||
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
|
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
|
||||||
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
|
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
|
||||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
|
||||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
|
||||||
${efiargs} -R -J -V '${isolabel}' \
|
${efiargs} -R -J -V '${isolabel}' \
|
||||||
-graft-points \
|
-graft-points \
|
||||||
.discinfo=${outroot}/.discinfo \
|
.discinfo=${outroot}/.discinfo \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${efigraft} ${filegraft}
|
${efigraft} ${filegraft}
|
||||||
treeinfo images-${basearch} boot.iso images/boot.iso
|
treeinfo images-${basearch} boot.iso images/boot.iso
|
||||||
|
Loading…
Reference in New Issue
Block a user