package-iso 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. set -e
  3. set -x
  4. source $(dirname $0)/version
  5. cd $(dirname $0)/..
  6. ARTIFACTS=$(pwd)/dist/artifacts
  7. CD=${BUILD}/cd
  8. rm -rf ${CD}/
  9. ISO=${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso
  10. mkdir -p ${CD}/boot/isolinux
  11. mkdir -p ${CD}/rancheros
  12. cp ${ARTIFACTS}/${INITRD} ${CD}/boot
  13. # TODO: these move to os-kernel
  14. pwd
  15. ls dist/artifacts/vmlinuz-${KERNEL_VERSION}
  16. cp ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ${CD}/boot/
  17. #TODO cp ${ARTIFACTS}/linuxmods-${KERNEL_VERSION} ${CD}/boot/
  18. # cfg files creation moved to package-installer
  19. DIST=$(pwd)/dist
  20. cp -r ${DIST}/boot/* ${CD}/boot/
  21. cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
  22. cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
  23. cp /usr/lib/syslinux/modules/bios/*.c32 ${CD}/boot/isolinux/
  24. # add the installer image to the iso for non-network / dev/test
  25. cp ${ARTIFACTS}/installer.tar ${CD}/rancheros/
  26. cp ${ARTIFACTS}/Dockerfile.${ARCH} ${CD}/rancheros/
  27. gzip ${CD}/rancheros/installer.tar
  28. cd ${CD} && xorriso \
  29. -as mkisofs \
  30. -l -J -R -V "${DISTRIB_ID}" \
  31. -no-emul-boot -boot-load-size 4 -boot-info-table \
  32. -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
  33. -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
  34. -o $ISO ${CD}
  35. cd $(dirname $ISO)