Create UDF iso when stage2 is >= 4GiB (#1312158)
Some images are becoming REALLY large. When a file is >= 4GiB we need to pass -allow-limited-size to mkisofs to tell it to make a UDF image. Note that the manpage says that this may result in it not booting on all systems.
This commit is contained in:
parent
3d740cb4de
commit
66241f7cd7
@ -7,6 +7,16 @@ STAGE2IMG="images/install.img"
|
|||||||
LORAXDIR="usr/share/lorax/"
|
LORAXDIR="usr/share/lorax/"
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir images
|
mkdir images
|
||||||
install ${runtime_img} ${STAGE2IMG}
|
install ${runtime_img} ${STAGE2IMG}
|
||||||
treeinfo stage2 mainimage ${STAGE2IMG}
|
treeinfo stage2 mainimage ${STAGE2IMG}
|
||||||
@ -54,7 +64,8 @@ mkdir ${KERNELDIR}
|
|||||||
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
||||||
## make boot.iso
|
## make boot.iso
|
||||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||||
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
|
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \
|
||||||
|
-graft-points \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
||||||
${efigraft} ${imggraft}
|
${efigraft} ${imggraft}
|
||||||
|
@ -20,6 +20,16 @@ prepboot = ""
|
|||||||
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir ${LIVEDIR}
|
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
|
||||||
@ -95,7 +105,8 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
|||||||
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
||||||
-hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \
|
-hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \
|
||||||
-map ${inroot}/${configdir}/mapping \
|
-map ${inroot}/${configdir}/mapping \
|
||||||
-no-desktop -allow-multidot -graft-points \
|
-no-desktop -allow-multidot ${udfargs} \
|
||||||
|
-graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
||||||
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
||||||
|
@ -15,6 +15,16 @@ def valid_label(ch):
|
|||||||
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
|
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir ${LIVEDIR}
|
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
|
||||||
@ -87,7 +97,8 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
||||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
||||||
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
|
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \
|
||||||
|
-graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
||||||
|
@ -23,6 +23,16 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
|||||||
rootarg = ""
|
rootarg = ""
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir images
|
mkdir images
|
||||||
install ${runtime_img} ${STAGE2IMG}
|
install ${runtime_img} ${STAGE2IMG}
|
||||||
treeinfo stage2 mainimage ${STAGE2IMG}
|
treeinfo stage2 mainimage ${STAGE2IMG}
|
||||||
@ -105,7 +115,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
|||||||
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
||||||
-hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \
|
-hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \
|
||||||
-map ${inroot}/${configdir}/mapping \
|
-map ${inroot}/${configdir}/mapping \
|
||||||
-no-desktop -allow-multidot -graft-points \
|
-no-desktop -allow-multidot ${udfargs} -graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
||||||
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
||||||
|
@ -16,6 +16,16 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
|||||||
rootarg = ""
|
rootarg = ""
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir images
|
mkdir images
|
||||||
install ${runtime_img} ${STAGE2IMG}
|
install ${runtime_img} ${STAGE2IMG}
|
||||||
treeinfo stage2 mainimage ${STAGE2IMG}
|
treeinfo stage2 mainimage ${STAGE2IMG}
|
||||||
@ -82,7 +92,7 @@ runcmd mkisofs -v -U -J -R -T \
|
|||||||
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \
|
||||||
-hfs-volid ${product.version} \
|
-hfs-volid ${product.version} \
|
||||||
-chrp-boot -map ${inroot}/${configdir}/mapping \
|
-chrp-boot -map ${inroot}/${configdir}/mapping \
|
||||||
-no-desktop -allow-multidot -graft-points \
|
-no-desktop -allow-multidot ${udfargs} -graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
|
||||||
|
@ -15,6 +15,16 @@ def valid_label(ch):
|
|||||||
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
|
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
## Test ${runtime_img} to see if udf is needed
|
||||||
|
<%
|
||||||
|
import os
|
||||||
|
from pylorax.sysutils import joinpaths
|
||||||
|
if os.stat(joinpaths(outroot, runtime_img)).st_size >= 4*1024**3:
|
||||||
|
udfargs = "-allow-limited-size"
|
||||||
|
else:
|
||||||
|
udfargs = ""
|
||||||
|
%>
|
||||||
|
|
||||||
mkdir images
|
mkdir images
|
||||||
install ${runtime_img} ${STAGE2IMG}
|
install ${runtime_img} ${STAGE2IMG}
|
||||||
treeinfo stage2 mainimage images/${runtime_base}
|
treeinfo stage2 mainimage images/${runtime_base}
|
||||||
@ -96,7 +106,8 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
||||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
||||||
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
|
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \
|
||||||
|
-graft-points \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
|
Loading…
Reference in New Issue
Block a user