|
Kickstart:RH134-P20的示例kickstart:
- auth --usershadow --enablemd5
- url --url="http://192.168.0.254/pub/rhel6/dvd/"
- firewall --enabled --service=ssh
- firstboot --disable
- ignoredisk --only-use=sda
- keyboard --vckeymap=us --xlayouts='us','us'
- lang en_US.UTF-8
- logging --level=info
- network --bootproto=dhcp
- rootpw --plaintext rootredhat
- selinux --enforcing
- services --disabled="kdump,rhsmcertd" --enable="network,sshd,rsyslog,chronyd"
- timezone --utc Asia/Shanghai
- bootloader --location=mbr --boot-drive=sda
- zerombr
- clearpart --all --initlabel
- part / --fstype="xfs" --ondisk=sda --size=10000
- %packages
- @core
- chrony
- cloud-init
- dracut-config-generic
- dracut-norescue
- firewalld
- grub2
- kernel
- rsync
- tar
- -NetworkManager
- -plymouth
- %end
复制代码 改过的:
/kickstart/workstation.cfg
- <blockquote>#version=DEVEL
复制代码 改过/var/lib/tftboot/pxelinux.cfg/default:
- #default vesamenu.c32
- #prompt 1
- timeout 600
- default ws
- #display boot.msg
- label ws
- menu label Install GLS workstation
- kernel vmlinuz
- append ksdevice load_ramdisk=1 initrd=initrd.img network ks=http://192.168.0.254/workstation.cfg noipv6
复制代码 post节:
- %post
- KS_IP=$(ifconfig | head -n 2 | tail -n 1 | cut -c 14- | cut -d ' ' -f 1)
- KS_IF_DEV=$(ls /etc/sysconfig/network-scripts/ifcfg* | grep -v 'ifcfg-lo' | cut -f 3 -d '-')
- cat > /etc/sysconfig/network-scripts/ifcfg-${KS_IF_DEV} <<EOF
- DEVICE=$KS_IF_DEV
- IPADDR=$KS_IP
- NETMASK=255.255.255.0
- GATEWAY=192.168.0.254
- EOF
- %end
复制代码
|
|