以 ~/anaconda-ks.cfg 为模板,再做一些适当的修改
[root@localhost ~]# cp ~/anaconda-ks.cfg /var/ftp/ks.cfg [root@localhost ~]# vi /var/ftp/ks.cfg #version=DEVEL # System authorization information auth --enableshadow --passalgo=sha512 # Install OS instead of upgrade install # Use network installation url --url=ftp://192.168.100.147/pub # Use graphical install graphical # Run the Setup Agent on first boot firstboot --enable # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 --addsupport=zh_CN.UTF-8 # Network information network --bootproto=dhcp --device=eno16777736 --onboot=yes --ipv6=auto network --hostname=localhost.localdomain # Root password # root密码是: rootroot rootpw --iscrypted $6$7gdZF8XhDef10LyT$2uRiP4qFYaBBTgpggKU/BXKgMDJLWN/BriXXgBwyzkjaz9G9YP/xD08I1OJfgBcPMoURsE5inVIoX.J6aERmR0 # System services services --disabled="chronyd" # System timezone timezone Asia/Shanghai --isUtc --nontp # System bootloader configuration bootloader --location=mbr --boot-drive=sda autopart --type=lvm # Partition clearing information clearpart --none --initlabel %packages @^minimal @core %end %addon com_RedHat_kdump --disable --reserve-mb='auto' %end修改访问权限
[root@localhost ~]# ll /var/ftp/ks.cfg -rw-------. 1 root root 1083 Aug 8 16:39 /var/ftp/ks.cfg [root@localhost ~]# chmod +r /var/ftp/ks.cfg [root@localhost ~]# ll /var/ftp/ks.cfg -rw-r--r--. 1 root root 1083 Aug 8 16:39 /var/ftp/ks.cfg 6.5 启动tftp服务 [root@localhost ~]# systemctl start xinetd 6.6 测试tftp服务 [root@localhost ~]# ls anaconda-ks.cfg ks.cfg [root@localhost ~]# tftp 192.168.100.147 tftp> get vmlinuz tftp> quit [root@localhost ~]# ls anaconda-ks.cfg ks.cfg vmlinuz如果能成功拿到 vmlinuz 文件,则表示 tftp 服务器状态正常
6.7 设置开机自启动(可选) [root@localhost ~]# systemctl enable xinetd Created symlink from /etc/systemd/system/multi-user.target.wants/xinetd.service to /usr/lib/systemd/system/xinetd.service. 七、启动安装到这里已经配置完成了。
系统安装前,需要设置BIOS从网卡启动,安装完后马上改回去
八、注意事项注意dhcp冲突