一、下载启动文件
#wget http://mirrors.aliyun.com/centos/7/os/x86_64/images/pxeboot/initrd.img -O /boot/initrd.img.remote #wget http://mirrors.aliyun.com/centos/7/os/x86_64/images/pxeboot/vmlinuz -O /boot/vmlinuz.remote
二、配置grub2
#vim /etc/grub.d/40_custom
追加:
menuentry "remote reinstall" { set root=(hd0,1) linux /vmlinuz.remote repo=http://mirrors.aliyun.com/centos/7/os/x86_64/ vnc vncpassword=password ip=192.168.100.51 netmask=255.255.255.0 gateway=192.168.100.1 nameserver=223.5.5.5 noselinux headless xfs panic=60 initrd /initrd.img.remote}
注意: 将ip地址、nameserver、vncpasswod、及repo改为你自己的 其中密码最少6位
#vim /etc/default/grub
追加:
GRUB_DEFAULT="remote reinstall"
更改好执行
#grub2-mkconfig --output=/boot/grub2/grub.cfg
执行后完成后无报错后执行
#reboot
三、vnc连接进行安装
使用vnc客户端连接你配置的ip 输入你配置的密码
例如本文中:
vnc客户端连接 192.168.100.51:1
如图:
mac系统 Finder → 远程连接服务器 → vnc://192.168.100.51:5901/
如图:
参考:
centos6 远程重装见: