You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/bash
-
- # build the iso
- . config || exit 0
-
- set -x
- set -e
-
- # copy kernel if changed
- if [ ${FS}/initrd.img -nt ${ISO}/casper/initrd.lz ] ; then
- sudo cp ${FS}/vmlinuz ${ISO}/casper/vmlinuz
- sudo sh -c "zcat ${FS}/initrd.img | lzma > ${ISO}/casper/initrd.lz"
- fi
-
- # manifests
- sudo chmod +w ${ISO}/casper/filesystem.manifest
- sudo chroot ${FS} dpkg-query -W --showformat='${Package} ${Version}\n' \
- | sudo tee ${ISO}/casper/filesystem.manifest >/dev/null
-
- # squashfs
- sudo rm -f ${ISO}/casper/filesystem.squashfs
- sudo mksquashfs ${FS} ${ISO}/casper/filesystem.squashfs
- printf $(sudo du -sx --block-size=1 ${FS} | cut -f1) \
- | sudo tee ${ISO}/casper/filesystem.size
-
- # md5sums
- cd ${ISO}
- sudo rm -f md5sum.txt
- sudo find . -type f -print0 \
- | sudo xargs -0 md5sum \
- | grep -v isolinux/boot.cat \
- | sudo tee md5sum.txt >/dev/null
- cd ..
-
- # build CD
- cd ${ISO}
- REALOUT=$(realpath ${OUTPUT})
- sudo xorriso -as mkisofs \
- -D -r -V "NilmDBuntu" -cache-inodes -J -l \
- -input-charset utf-8 -o ${REALOUT} \
- -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table \
- -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
- .
- cd ..
- sudo chown jim:jim ${REALOUT}
|