Add -iso-level 3 when the install.img is > 4GiB

xorrisofs needs to use iso-level 3 when creating images with large
files. This adds tests to all the relevant templates, just like we used
to do for udf and mkisofs.
This commit is contained in:
Brian C. Lane 2019-03-28 08:34:30 -07:00
parent 613d91299d
commit 8a89edf7bf
8 changed files with 74 additions and 10 deletions

View File

@ -6,7 +6,15 @@ KERNELDIR=PXEBOOTDIR
STAGE2IMG="images/install.img"
LORAXDIR="usr/share/lorax/"
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir images
@ -67,7 +75,7 @@ mkdir ${KERNELDIR}
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' \
-graft-points \
.discinfo=${outroot}/.discinfo \

View File

@ -1,4 +1,4 @@
<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/>
<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, arch"/>
<%
configdir="tmp/config_files/uboot"
PXEBOOTDIR="images/pxeboot"
@ -12,7 +12,15 @@ LORAXDIR="usr/share/lorax/"
platforms = ""
delimiter = ''
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir images
@ -84,7 +92,7 @@ treeinfo ${basearch} platforms ${platforms}
%if exists("boot/efi/EFI/*/gcdarm.efi"):
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' \
-graft-points \
.discinfo=${outroot}/.discinfo \

View File

@ -12,7 +12,15 @@ def valid_label(ch):
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir ${LIVEDIR}
@ -73,7 +81,7 @@ mkdir ${KERNELDIR}
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' \
-graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \

View File

@ -12,7 +12,15 @@ LORAXDIR="usr/share/lorax/"
## with '_', which means we won't need any udev escapes.
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir ${LIVEDIR}
@ -72,7 +80,7 @@ replace @EXTRA@ '${extra_boot_args}' ${GRUBDIR}/grub.cfg
%endfor
## make boot.iso
runcmd xorrisofs -v -U -J -R \
runcmd xorrisofs -v -U -J -R ${isoargs} \
-o ${outroot}/images/boot.iso \
-r -l -sysid PPC \
-A "${product.name} ${product.version}" -V '${isolabel}' \

View File

@ -14,7 +14,15 @@ def valid_label(ch):
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir ${LIVEDIR}
@ -105,7 +113,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endfor
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
-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 \

View File

@ -12,7 +12,15 @@ def valid_label(ch):
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir images
@ -78,7 +86,7 @@ replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg
%endfor
## make boot.iso
runcmd xorrisofs -v -U -J -R \
runcmd xorrisofs -v -U -J -R ${isoargs} \
-o ${outroot}/images/boot.iso \
-r -l -sysid PPC \
-A "${product.name} ${product.version}" -V '${isolabel}' \

View File

@ -1,4 +1,4 @@
<%page args="kernels, runtime_img, runtime_base, basearch, outroot"/>
<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot"/>
<%
configdir="tmp/config_files/s390"
BOOTDIR="images"
@ -8,7 +8,15 @@ LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir images
@ -68,7 +76,7 @@ runcmd mk-s390-cdboot -i ${outroot}/${KERNELDIR}/kernel.img \
-o ${outroot}/${BOOTDIR}/cdboot.img
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
-b ${BOOTDIR}/cdboot.img -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -no-emul-boot \
-R -J -V '${isolabel}' -graft-points \

View File

@ -14,7 +14,15 @@ def valid_label(ch):
isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
import os
from os.path import basename
from pylorax.sysutils import joinpaths
# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
%>
mkdir images
@ -113,7 +121,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endfor
## make boot.iso
runcmd xorrisofs -o ${outroot}/images/boot.iso \
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
-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 \