Skip to content

Instantly share code, notes, and snippets.

@immanuelpotter
Last active February 1, 2019 12:17
Show Gist options
  • Save immanuelpotter/f6f2067e3203a4e8dd002db90f114ea0 to your computer and use it in GitHub Desktop.
Save immanuelpotter/f6f2067e3203a4e8dd002db90f114ea0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Run this from directory above isolinux/
DEVICE="/dev/sdb" #TODO: make this more intelligent, rather than hardcoded
PATH="/path/to/original/iso"
BUILT_NAME="custom.iso"
BOOT_COMMAND_LABEL="custom-build"
gunzip -c ${PATH}/repodata/*comps.xml.gz > comps.xml && cd isolinux && createrepo -g ../comps.xml
cd .. && mkisofs -o $BUILT_NAME -b isolinux.bin -c boot.cat -no-emul-boot -V ${BOOT_COMMAND_LABEL} -boot-load-size 4
-boot-info-table -R -J -v -T isolinux/
# makes bootable from CD or USB
isohybrid $BUILT_NAME
sudo su -c "pv $BUILT_NAME | dd of=${DEVICE} bs=64k"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment