yum install -y wget
cd /boot
wget http://mirrors.163.com/centos/6.9/os/x86_64/images/pxeboot/initrd.img
wget http://mirrors.163.com/centos/6.9/os/x86_64/images/pxeboot/vmlinuz
vi /boot/grup/grup.conf
add
title CentOS reinstall
root (hd0,0)
kernel /vmlinuz headless hostname=localhost ip=192.168.0.104 noipv6 netmask=255.255.255.0 gateway=192.168.0.1 dns=114.114.114.114 ksdevice=eth0 method=http://mirrors.163.com/centos/6.9/os/x86_64/ lang=en_US keymap=us
#kernel /vmlinuz vnc vncpassword=123456 headless hostname=localhost ip=192.168.0.104 noipv6 netmask=255.255.255.0 gateway=192.168.0.1 dns=114.114.114.114 ksdevice=eth0 method=http://mirrors.163.com/centos/6.9/os/x86_64/ lang=en_US keymap=us
initrd /initrd.img