因准备上ovirt虚拟化平台,最新版本4.0需要CentOS7,但机房所有服务器都是CentOS6,想到之前远程重装机房系统,于是按照惯例,用虚拟机先做测试。 现有操作系统:CentOS 6.8 x86_64 使用163镜像:http://mirrors.163.com/centos
先按照之前的步骤,下载vmlinuz和initrd.img,保存到/boot分区,并重命名为vmlinuz.pxe和initrd.img.pxe 1
2
3
| cd /boot
wget -O vmlinuz.pxe
wget -O initrd.img.pxe
|
修改grub.conf 1
| vi /boot/efi/EFI/centos/grub.conf
|
加入启动项 1
2
3
4
| title CentOS7
root (hd0,1)
kernel /vmlinuz.pxe vnc vncpassword=****** headless ip=xxx.xxx.xxx netmask=255.255.255.0 gateway=xxx.xxx.xxx dns=114.114.114.114 ksdevice=eth0 method=http://mirrors.163.com/centos/7/os/x86_64 lang=zh_CN keymap=us
initrd /initrd.img.pxe
|
保存配置后重启,发现报错,无法进入pxe安装
查了半天CentOS的坑爹文档,没鸟用。到RedHat官方查看,果然有: https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-anaconda-boot-options.html#sect-boot-options-installer
原来内核引导参数发生了变化,参考文档做修改,如下: 1
2
3
4
| title CentOS7 Install
root (hd0,1)
kernel /vmlinuz.pxe inst.repo=http://mirrors.163.com/centos/7/os/x86_64 inst.lang=zh_CN inst.keymap=us inst.headless ip=xxx.xxx.xxx.xxx::xxx.xxx.xxx.xxx:255.255.255.0:node.kmnzrj.cn:eth0:none nameserver=114.114.114.114 inst.vnc inst.vncpassword=****** ifname=eth0:XX:XX:XX:XX:XX:XX
initrd /initrd.img.pxe
|
其中几个参数说明一下: 1.原来的method指定安装源,参数名称修改为inst.repo 2.原来的lang,keymap,headless,vnc,vncpassword,前面加inst.xxx 3.原来的ip/netmask/gateway三个参数合并为一个 4.原来的dns参数修改为nameserver 5.因有多张网卡,使用ifname参数,通过mac地址指定设备名称 具体参数用法请参考RH官方文档。
修改后重启,OK,一切正常,使用VNC viewer连接,安装。
|