Steps
1, mount/dev/sr0/media/
2, the installation of the required software
Install and configure the TFTP service
Yum install TFTP tftp-server vsftpd dhcp syslinux nfs-utils
service tftp
{
Disable = no
socket_type = dgram
protocol = UDP
Wait = yes
user = root
Server =/usr/sbin/in.tftpd
Server_args =-s/var/lib/tftpboot
Per_source = one
cps = 2
Flags = IPv4
}
Configure DHCP
# dhcpd.conf # #
Sample configuration file for ISC dhcpd
#
allow booting;
Allow BOOTP;
# A slightly different configuration for A internal subnet.
Subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.60;
Option Domain-name-servers Kangchangwei;
Option Domain-name "Kangchangwei";
option routers 192.168.1.1;
Default-lease-time;
Max-lease-time 7200;
FileName "pxelinux.0";
Next-server 192.168.1.101;
}
The above IP can be modified according to your own network
3, copy the required startup files
Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot
Cp/mnt/images/pxeboot/initrd.img/var/lib/tftpboot
cp/media/images/pxeboot/initrd.img/var/lib/tftpboot/
cp/media/images/pxeboot/vmlinuz/var/lib/tftpboot/
mkdir/var/lib/tftpboot/pxelinux.cfg
cp/media/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/ Default
Edit
vim/var/lib/tftpboot/pxelinux.cfg/default
Default Linux #default vesamenu.c32 prompt 1 timeout display boot.msg menu background splash.jpg menu title welcom
E to CentOS 6.5! Menu Color Border 0 #ffffffff #00000000 menu Color sel 7 #ffffffff #ff000000 Menu color title 0 #ffffffff #00000000 Menu C Olor tabmsg 0 #ffffffff #00000000 menu color Unsel 0 #ffffffff #00000000 menu color Hotsel 0 #ff000000 #ffffffff Menu Colo R Hotkey 7 #ffffffff #ff000000 menu color scrollbar 0 #ffffffff #00000000 label Linux menu label ^install or upgrade an Existing system menu default kernel vmlinuz append initrd=initrd.img ks=ftp://192.168.1.101/pub/ks.cfg label VESA Men U label Install system with ^basic driver kernel vmlinuz append initrd=initrd.img xdriver=vesa nomodeset label Res Cue menu label ^rescue installed system kernel vmlinuz append initrd=initrd.img Rescue label local menu label Boot fro M ^local Drive localboot 0xffff label memtest86 menu label ^memory Test kernel memtest-
4. Shared CD
Vim/etc/export
/media * (Ro,sync)
Start the NFS service
[ROOT@KCW ~]#/etc/init.d/rpcbind Restart
stop rpcbind: [OK]
starting rpcbind: [ OK]
[ROOT@KCW ~]#/etc/ Init.d/nfs Restart
shut down the NFS daemon: [OK]
shut down NFS mountd: [OK]
turn off NFS Services: [OK]
shutting Down RPC IDMAPD: [OK]
start NFS Service: [OK]
start NFS mountd: [OK]
start the NFS daemon: [OK]
Starting RPC IDMAPD: [OK]
View NFS Output
[ROOT@KCW ~]# showmount-e localhost
Export list for localhost:
/media *
Build ks.cfg File Installation Tool
[ROOT@KCW ~]# Yum Install System-config-kickstart
And then run
To modify the page to get its own installed client
I omit here.
There's a good ks.cfg here.
The contents are as follows:
#platform =x86, AMD64, or Intel em64t #version =devel key--skip # Firewall configuration Firewall--disabled # Install OS Instead of upgrade install # Use Network installation NFS--server=192.168.1.101--dir=/media # Root Password ROOTPW--isc
Rypted $1$9elloihk$po.nfjnd/6k88z3ciivpc. # Network Information Network--bootproto=dhcp--device=eth0--onboot=on # System Authorization Information auth---useshad ow--passalgo=md5 # Use text mode install text # system keyboard keyboard US # system language lang zh_cn # SELinux config
Uration SELinux--disabled # Don't configure the X Window System skipx # Installation logging level logging--level=info # Reboot after installation Reboot # system timezone TimeZone Asia/shanghai # system bootloader Configuration Bootloader- -LOCATION=MBR # Clear the Master Boot record ZEROMBR # Partition clearing information clearpart--all # Disk Partitioning
Information part swap--size 2048 part/boot--size-part pv.01--size 30000 Volgroup vol0-pv.01Logvol/--vgname=vol0--size=25000--name=root #logvol/home--vgname=vol0--size=500--name=home%post #wget ftp://192 .168.1.101/pub/yum.repo-p/etc/yum.repos.d/%packages @ Desktop @ Console Internet Tools @ Desktop Platform @ Development Tools @ General Purpose Desktop @ graphical administration Tools @ Internet Browser @ Network File system client @ Printi
ng client @ X Window System @ Chinese Support
Note that my root code is redhat.
When I partition this, the LVM partition can be modified to suit your needs.
and put ks.cfg in your vsftpd directory that you can access by default.
That
[ROOT@KCW ~]# cd/var/ftp/pub/
[ROOT@KCW pub]# ls
ks.cfg
[ROOT@KCW pub]# pwd]
/var/ftp/pub
Note that the first test of your file can not access to open IE
Input Ftp://192.168.1.101/pub/ks.cfg
See if you can see the content!
Reboot DHCP vsftpd Xine xinetd NFS
Then taiwan the computer boot settings from the NIC boot to see if it can start successfully and install automatically
This is my block. Default 600 seconds automatic installation
Boot to boot: press ENTER to install