Create a kickstart for a CentOS Net install
EnglishLinuxTutorials
A small post in order to keep this somewhere.
In order to create an automatic install through kickstart, the steps are :
– Create a kickstart file (manually or via this tool : http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-redhat-config-kickstart.html) here is mine (I changed it to hide stuff) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
#platform=x86, AMD64, ou Intel EM64T #version=DEVEL # Firewall configuration firewall --enabled --ssh --service=ssh # Install OS instead of upgrade install # Use network installation url --url="http://mirror.centos.org/centos/6/os/x86_64" # Root password rootpw --iscrypted $1$12345678$xa712345678aBcDeFgHiJ/ # Network information network --bootproto=dhcp --device=eth0 --onboot=on # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text # System keyboard keyboard fr-latin9 # System language lang fr_FR # SELinux configuration selinux --enforcing # Do not configure the X Window System skipx # Installation logging level logging --level=info # Reboot after installation reboot # System timezone timezone --isUtc Europe/Paris # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel %packages @base gpm logwatch %end |
– Deploy it on the web,
– Extract the iso (for instance I used CentOS-6.0-x86_64-netinstall.iso),
– Enter inside the extracted directory,
– Change the isolinux/isolinux.cfg file inside ISO so it looks like this one :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
default linux prompt 0 timeout 0 display boot.msg menu background splash.jpg menu title Welcome to CentOS 6.0! menu color border 0 #ffffffff #00000000 menu color sel 7 #ffffffff #ff000000 menu color title 0 #ffffffff #00000000 menu color tabmsg 0 #ffffffff #00000000 menu color unsel 0 #ffffffff #00000000 menu color hotsel 0 #ff000000 #ffffffff menu color hotkey 7 #ffffffff #ff000000 menu color scrollbar 0 #ffffffff #00000000 label linux menu label ^Quidquid's CentOS 6 x86_64 Kisckstart NetInstall menu default kernel vmlinuz append initrd=initrd.img ks=http://[REPLACE WITH YOUR URL]/[TO]/[YOUR]/[KICKSTART FILE] text |
– rebuild ISO with this command :
1 |
mkisofs -o CentOS-6.0-x86_64-netinstall-kickstart.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T . |
– Use the newly created ISO to boot your server
That’s it…
Leave a comment