This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script on a running Linux OS that you want to be put into an image file. | |
# Ensure that the system you run this on is less than 10GB in size if you wish to | |
# deploy the image file to AWS EC2. | |
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script. | |
# -https://gist.github.com/249915 | |
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"} | |
imageMountPoint=${2:-'/mnt/image'} | |
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'} |