Skip to content

Instantly share code, notes, and snippets.

@andrzejressel
Created June 22, 2019 14:18
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 andrzejressel/fec452a9481356225617cefff2b3439f to your computer and use it in GitHub Desktop.
Save andrzejressel/fec452a9481356225617cefff2b3439f to your computer and use it in GitHub Desktop.
Deterministic cloud-init iso creation
#!/bin/bash
set -e
# Requirements:
# xorriso installed
# user-data and meta-data files in directory
# https://lists.gnu.org/archive/html/bug-xorriso/2015-06/msg00007.html
timestamp="2015060415363300"
xorriso -as mkisofs -o cloud-init.iso -volid cidata -joliet -rock user-data meta-data -- \
-volume_date c $timestamp \
-volume_date m $timestamp \
-volume_date x $timestamp \
-volume_date f $timestamp \
-alter_date b-c $timestamp / -- \
-alter_date_r c $timestamp / --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment