(五)PXE技术篇--ks.cfg 文件的生成

设置 kickstart 就是设置对即将安装的新系统的配置, 客户端会读取 ks.cfg文件, 根据里面的配置来安装新系统linux

安装
yum -y install pykickstart
(五)PXE技术篇--ks.cfg 文件的生成vim

yum -y install system-config-kickstart
(五)PXE技术篇--ks.cfg 文件的生成centos

system-config-kickstart (配置文件设置)
注:这里须要图形界面,如已安装,打startx开启图形界面,没安装过的话,百度一下(安装图形用户界面)
(五)PXE技术篇--ks.cfg 文件的生成
设置,语言,密码等ide

(五)PXE技术篇--ks.cfg 文件的生成
安装方式,选NFS url

(五)PXE技术篇--ks.cfg 文件的生成
分区,跟据自已须要设置centos7

(五)PXE技术篇--ks.cfg 文件的生成
选择安装包,这里有个问题,
如显示这个提示:Packageselection is disabled due to problems downloading package information3d

这是由于centos7中的kickstart须要使用本身的包仓库,这时咱们只须要在/etc/yum.repo.d/目录下编辑一个名叫develop的仓库就能够。code

个人解决方法是:vim /etc/yum.repo.d/development.repoorm

[development]server

name=development

baseurl=file:///mnt/

gpgcheck=0

也能够把下载的光盘镜像挂载到/mnt目录(mount /dev/cdrom /mnt),这时的baseurl能够这样写:

baseurl=file:///mnt/

(五)PXE技术篇--ks.cfg 文件的生成
安装完后要执行的脚本,注意要绝对路径

点击保存以后, 将生成的文件保存到 /var/ftp 下

下面是完整的文件

platform=x86, AMD64, or Intel EM64T
version=DEVEL
unsupported_hardware
Install OS instead of upgrade
install
Keyboard layouts
keyboard 'us'
Root password
rootpw --iscrypted $1$u1guE31O$RIFM1fqMkCJX/Rp5mlvlg.
System language
lang zh_CN
System authorization information
auth  --useshadow  --passalgo=sha512
Use graphical install
graphical
firstboot --disable
SELinux configuration
selinux --disabled

Use NFS installation media
nfs --server=172.25.10.110 --dir=/var/ftp/pub/Centos6/
Firewall configuration
firewall --disabled
Network information
network  --bootproto=dhcp --device=eth0
Reboot after installation
reboot
System timezone
timezone Africa/Lusaka
System bootloader configuration
bootloader --location=mbr
Clear the Master Boot Record
zerombr
Partition clearing information
clearpart --all
Disk partitioning information
part /boot --fstype="ext4" --size=200
part swap --fstype="swap" --size=2000
part / --fstype="ext4" --grow --size=1

%packages --nobase 
@core
相关文章
相关标签/搜索