digimer

Untitled

Mar 25th, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. # Kickstart for AN!CDB appliances.
  2.  
  3. #version=DEVEL
  4. install
  5. url --url=http://10.255.255.254/rhel6/x86_64/img/
  6. lang en_US.UTF-8
  7. keyboard us
  8.  
  9. # Reboot when the install is finished
  10. reboot
  11.  
  12. # My NICs!
  13. network --onboot yes --device eth0 --bootproto dhcp --noipv6
  14. network --onboot yes --device eth1 --bootproto dhcp --noipv6
  15. network --onboot yes --device eth2 --bootproto dhcp --noipv6
  16. network --onboot yes --device eth3 --bootproto dhcp --noipv6
  17. network --onboot yes --device eth4 --bootproto dhcp --noipv6 --hostname an-c05n01.alteeve.ca
  18. network --onboot yes --device eth5 --bootproto dhcp --noipv6
  19.  
  20. # Passwords are 'secret'
  21. rootpw --iscrypted $6$aXG79sRRNGQpo7HZ$EAuWZEafY7rMB611uW/MfJ4ODjPVGZ181PQAqkWha4YscoIHVv83kW9bBrMoUZhNRIPCJ4M4PrZ1lBqCq9kZx1
  22. user --name=alteeve --iscrypted --password=$6$aXG79sRRNGQpo7HZ$EAuWZEafY7rMB611uW/MfJ4ODjPVGZ181PQAqkWha4YscoIHVv83kW9bBrMoUZhNRIPCJ4M4PrZ1lBqCq9kZx1
  23. authconfig --enableshadow --passalgo=sha512
  24.  
  25. # I laugh in the face of security!
  26. firewall --disabled
  27. selinux --disabled
  28.  
  29. # Where am I again?
  30. timezone --utc America/Toronto
  31.  
  32. # Things to turn on/off
  33. services --disabled NetworkManager,iptables,iptables,ip6tables,kdump
  34. services --enabled network
  35.  
  36. # HDD config.
  37. # KVM VMs use /dev/vdXY
  38. bootloader --location=mbr --driveorder=sda --append="crashkernel="
  39. zerombr
  40. clearpart --initlabel --linux --drives=sda --all
  41. ignoredisk --only-use=sda
  42. bootloader --location=mbr --driveorder=sda --append=""
  43.  
  44. part /boot --fstype ext4 --size=512 --asprimary
  45. part swap --fstype swap --size=2048 --asprimary
  46. part / --fstype ext4 --size=40960 --asprimary
  47.  
  48. # Packes to (not) install
  49. %packages
  50. @core
  51. @development
  52. bridge-utils
  53. dmidecode
  54. openssh-clients
  55. perl
  56. rsync
  57. screen
  58. telnet
  59. vim
  60. wget
  61. %end
  62.  
  63. # Post stuff
  64. %post
  65. # As per: https://bugzilla.redhat.com/show_bug.cgi?id=472776, this removes
  66. # the graphical boot as it sometimes produces difficult to read boot screens.
  67. sed -i 's/ rhgb//g' /etc/default/grub
  68. sed -i 's/ quiet//g' /etc/default/grub
  69. grub2-mkconfig -o /etc/grub2.cfg
  70. sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf
  71. sed -i 's/id:5:initdefault/id:3:initdefault/g' /etc/inittab
  72.  
  73. ### Register - This isn't needed if the base_an-c05n01.tar file has the registration file in it (/etc/sysconfig/rhn)
  74. #rhnreg_ks --username "xxx" --password "yyy" --force --profilename "an-c05n01.alteeve.ca"
  75. #rhn-channel --add --user xxx --password yyy --channel=rhel-x86_64-server-rs-6
  76.  
  77. # Other stuff
  78. yum -y update
  79.  
  80. # Download the backup files and load them.
  81. cd ~
  82. wget -c http://10.255.255.254/rhel6/x86_64/files/base_an-c05n01.tar
  83. cp base_an-c05n01.tar /mnt/sysimage/root/
  84. /etc/init.d/network stop
  85. rm -f /etc/udev/rules.d/70-persistent-net.rules
  86. tar -xvf base_an-c05n01.tar -C /
  87. start_udev
  88. /etc/init.d/network start
  89. %end
Advertisement
Add Comment
Please, Sign In to add comment