Skip to content

Instantly share code, notes, and snippets.

@lttlrck
Created September 18, 2013 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lttlrck/6612148 to your computer and use it in GitHub Desktop.
Save lttlrck/6612148 to your computer and use it in GitHub Desktop.
Create a directory to mount your source.
mkdir /tmp/bootiso.
Loop mount the source ISO you are modifying. (Download from Red Hat / CentOS.)
mount -o loop /path/to/some.iso /tmp/bootiso
Create a working directory for your customized media.
mkdir /tmp/bootisoks
Copy the source media to the working directory.
cp -r /tmp/bootiso/* /tmp/bootisoks/
Unmount the source ISO and remove the directory.
umount /tmp/bootiso && rmdir /tmp/bootiso.
Change permissions on the working directory.
chmod -R u+w /tmp/bootisoks
Copy your Kickstart script which has been modified for the packages and %post to the working directory.
cp /path/to/someks.cfg /tmp/bootisoks/isolinux/ks.cfg
Copy any additional RPMs to the directory structure and update the metadata.
cp /path/to/*.rpm /tmp/bootisoks/Packages/.
cd /tmp/bootisoks/Packages && createrepo -dpo .. .
Create the new ISO file.
cd /tmp/bootisoks && mkisofs -o /tmp/boot.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T isolinux/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment