Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Last active September 30, 2015 01:28
Show Gist options
  • Save ohadlevy/1700094 to your computer and use it in GitHub Desktop.
Save ohadlevy/1700094 to your computer and use it in GitHub Desktop.
curl http://foreman/unattended/script | bash
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
KERNEL="/boot/kernel"
INITRD="/boot/initrd.img"
wget -O "$KERNEL" "http://centos.syn.co.il/5/os/x86_64/images/pxeboot/vmlinuz"
wget -O "$INITRD" "http://centos.syn.co.il/5/os/x86_64/images/pxeboot/initrd.img"
grubby --add-kernel=$KERNEL --initrd=$INITRD --copy-default --title "CentOS 5.7" --make-default --args="ks=http://foreman/unattended/provision"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment