Forked from kwilczynski/gist:90ffc7c393a77bd6c7a0bc9ca7bef610
Created
March 29, 2018 11:18
-
-
Save geekcui/0c584090b979be9cf259d5f4607a0a4b to your computer and use it in GitHub Desktop.
Install growpart on CentOS 6.8 to support growing partition on boot in EC2.
This file contains hidden or 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 | |
set -e | |
set -u | |
set -o pipefail | |
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
yum install -y \ | |
cloud-init cloud-utils-growpart \ | |
dracut-modules-growroot | |
# Update initramfs for all kernels ... | |
while read version; do | |
version=${version#*-} | |
dracut -f -H /boot/initramfs-${version}.img $version | |
done < <(rpm -qa kernel) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment