尝试自动装机,同时重点了解pxe过程。
Overview
PXE
- Preboot Execute Environment, supported by Intel.
- Booting in this mode, client gets it’s own ip and tftp server ip by DHCP.
- Fetch
pxelinux.0
from tftp server and then follow it. pxelinux.cfg
contains serveral menus recording booting process.
1 | default menu.c32 |
- Here we only have one item that means installing operating system by kickstart.
DHCP
- It’s easy to start a DHCP server, but here we need to configure a
next-server
which locate the tftps server. yum -y install dhcp
/etc/dhcp/dhcpd.conf
1 | # DHCP Server Configuration file. |
Tftp Server
- Trivial File Transfer Protocol, Port 69.
- We transfer
pxelinux.cfg
andnetworkboot/*
throughtftp
.
GUI
1 | yum groupinstall "X Window System" |
Kick Start
- Make a
ks.cfg
by desktop ui. - Config
- Root password
- Network
- Disk Parition
FTP and HTTP
- Using FTP or HTTP to supply
.iso
to clients. - FTP
- root directory:
/var/ftp/
- I found
/var/ftp/pub
had a special authority, read-only file is hidden in that direcotry. - We can use other path.
/var/ftp/centos
- root directory:
- HTTP
- root directory:
/var/www/html/
mount Centos7.iso /var/www/html/centos
- root directory:
Firewall
- Enable ports
- 69
- 4011
- Enabel services
- dhcp
- ftp
- http
1 | firewall-cmd --add-service=ftp --permanent |
Start Service
1 | systemctl start xinetd |
Problems
- Memory
- I recommend that the client(not installer) has more than 2GB memory.
- When using VMware to simulate, 1GB memory traps in trouble.