cobbler安装ubuntu17.04操作系统 ks方式
准备ks文件
[root@localhost ~]# vim /var/lib/cobbler/kickstarts/ubuntu17.cfg
#Generated by Kickstart Configurator
#platform=x86
#System language
lang en_US
#Language modules to install
langsupport zh_CN --default=en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone --utc Asia/Shanghai
#Root password
rootpw --iscrypted $1$2HsQo2x9$.W88TweSDVSMGQ/D8ycVA.
#Initial user
user ubuntu --fullname "ubuntu" --iscrypted --password $1$9fv5P8A7$PIrqAtridY2eLPgbU.xkW1
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url $tree
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype xfs --size 1024
part swap --size 4096
part / --fstype xfs --size 1 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=ens33
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
#install pakges
%packages
@ Base
openssh-client
openssh-server
vim
wget
make
gcc
zip
libsensors4
net-tools
指定ks文件
[root@localhost ~]# cobbler profile edit --name=Ubuntu-17-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ubuntu17.cfg
[root@localhost ~]# cobbler sync
编辑default文件
更改部分ubuntu17的内容
[root@localhost ~]# vim /var/lib/tftpboot/pxelinux.cfg/default
..........
LABEL Ubuntu-17-x86_64
kernel /images/Ubuntu-17-x86_64/linux
MENU LABEL Ubuntu-17-x86_64
append initrd=/images/Ubuntu-17-x86_64/initrd.gz ksdevice=bootif lang= kssendmac text ks=http://192.168.32.10/cblr/svc/op/ks/profile/Ubuntu-17-x86_64 hostname=Ubuntu
ipappend 2
.............
注意:此处不能使用cobbler sync更新与同步
之后通过PXE引导安装操作系统,观察。