KickStart工作流程

KickStart工作流程_第1张图片

1.DHCP

[root@kallen ~]# cat /etc/dhcp/dhcpd.conf 
ddns-update-style interim;
ignore client-updates;
subnet 172.16.1.0 netmask 255.255.255.0{
    option routers 172.16.1.1;
    option subnet-mask 255.255.255.0;
filename "pxelinux.0";
    next-server 172.16.1.228;
    option domain-name-servers 172.16.1.228;
    option time-offset -18000;
    range dynamic-bootp 172.16.1.22 172.16.1.24;
default-lease-time 21600;
}

2.TFTP

[root@kallen ~]# cd /var/lib/tftpboot/
.
├── initrd.img
├── pxelinux.0
├── pxelinux.cfg
│   └── default
└── vmlinuz 
[root@kallen ~]# cd /var/lib/tftpboot/pxelinux.cfg/default
default linux
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.5!
menu color border 0#ffffffff #00000000
menu color sel 7#ffffffff #ff000000
menu color title 0#ffffffff #00000000
menu color tabmsg 0#ffffffff #00000000
menu color unsel 0#ffffffff #00000000
menu color hotsel 0#ff000000 #ffffffff
menu color hotkey 7#ffffffff #ff000000
menu color scrollbar 0#ffffffff #00000000

label linux
  menu label ^Install or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=ftp://172.16.1.228/ks.cfg

label vesa
  menu label Install system with ^basic video driver
  kernel vmlinuz

label rescue
  menu label ^Rescue installed system
  kernel vmlinuz
  append initrd=initrd.img rescue

label local
  menu label Boot from ^local drive
  localboot 0xffff

label memtest86
  menu label ^Memory test
  kernel memtest
  append -

3.FTP

[root@kallen ~]# cd /var/ftp
├── ks.cfg
└── pub
    └──ISOFILES
# Kickstart file automatically generated by anaconda.
# version=DEVEL
# Kallen Ding, Oct 14 2015

install
text

url --url="ftp://172.16.1.228/pub"

lang en_US.UTF-8
keyboard us
key --skip
network --onboot yes --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted $6$eYdahrmP/JJc4KUt$/.cUy9mYdb.UGnZTEFUzHvk0FQ8w0ELAN0I
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone --utc Asia/Shanghai

zerombr yes
bootloader --location=mbr --driveorder=sda

# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work

clearpart --all --initlabel

# Partion for virtual machine.
# Kallen Ding, Oct 15 2015
# part /boot --fstype=ext4 --size=200
# part /var --fstype=ext4 --size=10000
# part / --fstype=ext4 --size=10000
# part swap --size=2048
# part /data --fstype=ext4 --size=10000

# Partion for APP Server
part /boot --fstype=ext4 --size=200
part / --fstype=ext4 --size=20000
part /var --fstype=ext4 --size=30000
part swap --size=16384
part /tvapp --fstype=ext4 --size=200000
part /data --fstype=ext4 --size=1--grow

%packages
@base
@chinese-support
@client-mgmt-tools
@compat-libraries
@console-internet
@core
@debugging
@development
@directory-client
@directory-server
@hardware-monitoring
@java-platform
@large-systems
@legacy-unix
@mysql-client
@mysql
@network-file-system-client
@network-tools
@php
@performance
@perl-runtime
@print-client
@server-platform
@server-policy
@system-admin-tools
@web-server
@web-servlet
pax
python-dmidecode
oddjob
sgpio
device-mapper-persistent-data
systemtap-client
systemtap-sdt-devel
libstdc++-docs
gcc-gnat
expect
perltidy
cmake
imake
ksc
kdewebdev
rpmdevtools
compat-gcc-34
systemtap-server
gcc-java
jpackage-utils
bzr
mercurial
chrpath
gcc-objc
rpmlint
gcc-objc++
samba-winbind
certmonger
pam_krb5
krb5-workstation
telnet-server
telnet
tcp_wrappers
tftp
perl-DBD-MySQL
perl-DBD-SQLite
pexpect
expect
crypto-utils
certmonger
perl-CGI
%end

reboot

你可能感兴趣的:(Linux)