Skip to content

Instantly share code, notes, and snippets.

@YungSang
Last active August 29, 2015 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YungSang/a106a26a5fe682efb31d to your computer and use it in GitHub Desktop.
Save YungSang/a106a26a5fe682efb31d to your computer and use it in GitHub Desktop.
CoreOS Installer on Tiny Core Linux
#!/bin/sh
echo "=====> Setup utilities to install CoreOS"
tce-load -wi curl bash util-linux gnupg 2> /dev/null
sudo ln -s -f /usr/local/bin/gpg2 /usr/local/bin/gpg
echo "=====> Download CoreOS Install Script"
curl -OL https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
sed -e "s/--tmpdir//g" -i coreos-install
sed -e "s/--no-verbose//g" -i coreos-install
sed -e "s/--stdout/-c/g" -i coreos-install
chmod +x coreos-install
echo "=====> Set Password for the default user(core)"
PASSWD=$(openssl passwd -1)
cat <<EOF > cloud-config.yml
#cloud-config
users:
- name: core
passwd: ${PASSWD}
EOF
echo "=====> Install CoreOS"
sudo ./coreos-install -d /dev/sda -C stable 2> /dev/null
sudo mount /dev/sda6 /mnt
sudo cp -f cloud-config.yml /mnt/
sudo umount /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment