Skip to content

Instantly share code, notes, and snippets.

View mikesmithgh's full-sized avatar
:shipit:

Mike mikesmithgh

:shipit:
View GitHub Profile
@mikesmithgh
mikesmithgh / centos7-chroot.sh
Last active August 22, 2022 17:20 — forked from snixon/centos8-chroot.sh
Build a CentOS7 AWS AMI in a chroot with GPT partitioning scheme
#!/bin/bash -ex
# Build a new Centos7 install on EBS volume in a chroot
# Run from RHEL7 or CentOS7 instance - eg: ami-0c322300a1dd5dc79 in us-east-1 (RHEL 7 official image)
# Script expects a second EBS volume, I add them as /dev/sdf in the console
# When the script completes, turn the second EBS volume into your new AMI through the console.
# Adjust the section below to match the device names you're using. Defaults are for an m5.large
# m5 series requires the updated device names