给定一个网络架构图

wKioL1TCAizAi4uTAAHNhQdlBbg920.jpg

对于安装过程中有问题的可以互相交流,本人折腾了好几天了
1.安装DHCP、tftp、HTTP。

   [root@test ~]# yum install dhcp tftp-server httpd xinetd

2.修改DHCP、tftp、HTTP配置文件

   [root@test ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
    cp: overwrite ‘/etc/dhcp/dhcpd.conf’? y

   修改后DHCP文件内容如下:

   wKiom1TCBL_hhAs-AARH2VcFaiU202.jpg

   启动DHCP服务

wKiom1TCBRSRG-iGAAWH1D9ol8I188.jpg

    安装syslinux生成pxelinux.0,[root@test ~]# yum install syslinux

   

    配置tftp服务

    [root@test ~]# rpm -ql tftp-server
    /etc/xinetd.d/tftp
    /usr/lib/systemd/system/tftp.service
    /usr/lib/systemd/system/tftp.socket
    /usr/sbin/in.tftpd
    /usr/share/doc/tftp-server-5.2
    /usr/share/doc/tftp-server-5.2/CHANGES
    /usr/share/doc/tftp-server-5.2/README
    /usr/share/doc/tftp-server-5.2/README.security
    /usr/share/man/man8/in.tftpd.8.gz
    /usr/share/man/man8/tftpd.8.gz
    /var/lib/tftpboot

    wKioL1TCB6GSKuodAAaRqhiyvVo603.jpg



wKiom1TCBwSidzOLAAIjQuvhomQ431.jpg


wKioL1TCCPODyye_AAIovW6UHmU992.jpg


wKioL1TCCsGDnTh2AAC3AwfjyRE986.jpg


wKiom1TCClySrz7QAAKH6STniRA461.jpg


wKioL1TCC8uhKEeBAAGhFx_GQrc471.jpg


    配置HTTP服务

wKioL1TCDpLgxxoFAAY8PZ0l3RU614.jpg

    修改配置后,重启一下HTTP

    [root@test conf.d]# systemctl restart httpd.service

    关闭selinux,iptables

wKiom1TCDyfhT5k-AACfVkX3IGA128.jpg


wKiom1TCEAHzSg39AAUijKPxOBk897.jpg


     ks文件也是通过anaconda-ks.cfg修改过来的,内容如下:ks文件的设置可查看文档Red_Hat_Enterprise_Linux-7-Installation_Guide-en-US.pdf,里面有详细的配置过程

wKioL1TCEdjC1TFvAAO10Ru9mtA723.jpg


wKiom1TCEQ_Q_n5EAAJejsFcNEI442.jpg

    此时设定客户机用网络启动,出现如下界面

wKiom1TEcH3iaaJtAACXuEif7G8203.jpg


wKioL1TEcVjQOn6-AAA859nlrk0242.jpg


wKiom1TEcH3SUWrpAAD8Kw6ui0w327.jpg


wKioL1TEcVmxx4s1AAHP9XoJeRU218.jpg

       上面显示Error因为在ks文件中写了两个nework,修改过后如下

wKioL1TEclWhE5dvAAEg4uzk6wE942.jpg

        在这里等一下后,按上下移动键就会显示如下:

wKioL1TEcVnx8qxbAABHZmCfYnA023.jpg


wKiom1TEcH6AzurZAAIKSEYDjFU653.jpg

    出现以上情况的原因是由于在/var/lib/tftpboot/pxelinux.cfg目录下的default文件中在

menu linux

....

...

append ... inst.stage2=...ks=..   把stage2=..都删除

wKiom1TEc4XQVWScAAF79mGtP_M058.jpg

     安装好后会自动重启的(此时在BIOS调整一下启动顺序即可了),记住也可以设定为安装好后关机。

     启动后,登录界面,登录后如下   网卡也获取到了ip地址

wKiom1TEdFSjEmnjAAH_EOAUNdE494.jpg

wKioL1lTd8Ww75DMAACMTbctzWs954.png

ValueError: new value non-existent xfs filesystem is not valid as a default fs type

Pane is dead

由于引用的CentOS-7-x86_64-NetInstall-1511.iso这个ISO包比较老,更新后使用老的CentOS-7-x86_64-NetInstall-1511.iso通过网络安装新的系统时,存在异常

可以通过替换http://mirrors.aliyun.com/centos/7/os/x86_64/isolinux/{vmlinuz,initrd.img}文件,重新执行即可,就是下载新的vmlinuz,initrd.img替换后就OK了

提供一个ks.cfg的完整内容
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="http://mirrors.aliyun.com/centos/7/os/x86_64/"
# Use graphical install
#graphical
text
# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=eno16777728 --ipv6=auto --activate --hostname=c7ks

firewall --disabled
selinux --disabled

# Root password
rootpw --iscrypted $6$pbOvzICwsWYgm4nU$FNh23fV8tv9jcWE3oe36VcvqeYkVsSxTDI6IS/uTul5Zp4f3BCHzbF0Xl2aogZ48hxEnLpSIVwYTbZ2Dh12oy/
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc --nontp
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part pv.195 --fstype="lvmpv" --ondisk=sda --size=59280
part /boot --fstype="xfs" --ondisk=sda --size=244
volgroup centos --pesize=4096 pv.195
logvol swap  --fstype="swap" --size=2048 --name=swap --vgname=centos
logvol /home  --fstype="xfs" --size=28610 --name=home --vgname=centos
logvol /  --fstype="xfs" --size=28610 --name=root --vgname=centos

reboot
%packages
@core
iptraf
vim
openssh-server
ntp

%end

#%addon com_redhat_kdump --enable --reserve-mb='auto'

#%end

参考

http://www.rendoumi.com/valueerror-new-value-non-existent-xfs-filesystem-is-not-valid-as-a-default-fs-type/

由于磁盘没有格式化,使用上面的ks进行自动安装时,报下面的异常

storage configuration failed: Unable to allocate requested partition schema.
.....
Not enough space in file systems for the current software selection. An additional 1069.52MiB is
needed.
...

wKioL1lU58PDm6sNAABMiBkPS2E787.png解决方法:

只要把ks.cfg文件下面内容改为
# Partition clearing information
clearpart --none --initlabel

# Partition clearing information
clearpart --all --initlabel

即可