Add option to build netboot files and disk image size

This commit is contained in:
Ettore Di Giacinto
2022-11-07 22:02:32 +00:00
parent ebbd1c9a1a
commit 7ae1f7105a
6 changed files with 62 additions and 14 deletions

View File

@@ -3,20 +3,20 @@
ISO=$1
OUTPUT_NAME=$2
VERSION=$3
ARTIFACT_NAME=$(basename $OUTPUT_NAME)
isoinfo -x /rootfs.squashfs -R -i $ISO > $OUTPUT_NAME.squashfs
isoinfo -x /boot/kernel -R -i $ISO > $OUTPUT_NAME-kernel
isoinfo -x /boot/initrd -R -i $ISO > $OUTPUT_NAME-initrd
RELEASE_URL=${RELEASE_URL:-https://github.com/kairos-io/kairos/releases/download}
URL=${URL:-https://github.com/kairos-io/kairos/releases/download}
cat > $OUTPUT_NAME.ipxe << EOF
#!ipxe
set url ${RELEASE_URL}/
set kernel $OUTPUT_NAME-kernel
set initrd $OUTPUT_NAME-initrd
set rootfs $OUTPUT_NAME.squashfs
set url ${URL}/
set kernel $ARTIFACT_NAME-kernel
set initrd $ARTIFACT_NAME-initrd
set rootfs $ARTIFACT_NAME.squashfs
# set config https://example.com/machine-config
# set cmdline extra.values=1
kernel \${url}/\${kernel} initrd=\${initrd} ip=dhcp rd.cos.disable root=live:\${url}/\${rootfs} netboot nodepair.enable config_url=\${config} console=tty1 console=ttyS0 \${cmdline}