PXE: A boot mode. During the startup process, the terminal requires the server to allocate an IP address and then download a startup package to the local memory for execution using the TFTP protocol, the startup package completes the basic software settings of the terminal to guide the terminal operating system that is pre-installed on the server.
Kickstart: an unattended installation method. It works by recording typical parameters that require manual intervention during installation and generating a file named KS. cfg.
1. Install the required software package
Yum-y install httpd
Yum-y install syslinux
Yum-y install TFTP-Server
Yum-y install DHCP
Yum-y install system-config-kickstart
2. Configure DHCPD. conf
Vim/etc/hdcpd. conf
Ddns-Update-style interim;
Ignore client-updates;
Next-server 192.168.222.129; # IP address of the TFTP Server
Filename "pxelinux.0 ";
Subnet 192.168.222.0 netmask 255.255.255.0 {
Option routers 192.168.222.129;
Option subnet-mask limit 255.0;
Range dynamic-BOOTP 192.168.222.100 192.168.222.150;
Default-lease-time 21600;
Max-lease-time 43200;
}
3. Configure TFTP
Vim/etc/xinetd. d/TFTP
Service tftp
{
Socket_type = dgram
Protocol = UDP
Wait = Yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-S/var/lib/tftpboot
Disable = No
Per_source = 11
CPIs = 100 2
Flags = IPv4
}
4. Required Documents
Initrd. IMG: Image File
Vmlinuz: Kernel File
Pxelinux.0: PXE network boot file
Isolinux. cfg: information during automatic installation, which must be changed to default
1. Copy Related Files
Mount/dev/CDROM/mnt
CP-RF/mnt/*/var/www/html/
Mkdir/var/lib/tftpboot/pxelinux. cfg
CP/var/www/html/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/Default
CP/var/www/html/images/pxeboot/initrd. img/var/lib/tftpboot
CP/var/www/html/images/pxeboot/vmlinuz/var/lib/tftpboot/
2. Modify default
Vim/var/lib/tftpboot/pxelinux. cfg/Default
Default KS
Prompt 1
Timeout 30
Display boot. msg
Menu background splash.jpg
Menu title welcome to centos 6.5!
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 KS
Kernel vmlinuz
Append initrd = initrd. IMG noipv6 Ks = http: // 192.168.222.129/KS. cfg
Label Linux
Menu label ^ install or upgrade an existing system
Menu default
Kernel vmlinuz
Append initrd = initrd. img
Label VESA
Menu label install system with ^ basic video driver
Kernel vmlinuz
Append initrd = initrd. IMG xdriver = VESA nomodeset
Label rescue
Menu label ^ rescue installed system
Kernel vmlinuz
Append initrd = initrd. IMG rescue
Label local
Menu label boot from ^ local drive
Localboot 0 xFFFF
Label memtest86
Menu label ^ Memory Test
Kernel memtest
Append-
3. Modify ks. cfg.
Vim/var/www/html/KS. cfg
# Kickstart file automatically generated by Anaconda.
Install
Text
URL -- url = http: // 192.168.222.129/
Lang en_US.UTF-8
Keyboard us
Network -- device eth0 -- bootproto DHCP
Rootpw centos
Firewall -- disabled
Authconfig -- enableshadow -- enablemd5
SELinux -- disabled
Timezone -- UTC Asia/Shanghai
Bootloader -- location = MBR -- driveorder = SDA -- append = "rhgb crashkernel = auto quiet"
Zerombr Yes
Clearpart -- all -- initlabel
# Clearpart -- all -- drives = SDA -- initlabel
Part/-- fstype ext3 -- size = 10000 -- ondisk = SDA
Part swap -- grow -- size = 1024 -- ondisk = SDA
% Packages -- nobase
Vim
Wget
@ Core
% Post -- interpreter =/bin/bash
% End
Reboot
5. Start the test
/Etc/init. d/xinetd start
/Etc/init. d/DHCPD start
/Etc/init. d/httpd start
This article is from the "linuxdream" blog, please be sure to keep this source http://books.blog.51cto.com/2600359/1563388
Centos kickstart Unattended Installation System