Cobbler(配置文件)

天坑啊,这我都能踩,也没谁了。

在%packages模块,考虑到有可能装图形界面(Oracle),做了一个注释

%packages
...
#@gnome-desktop

然后就会在安装过程卡住,报错如下 怎么避免呢?

# @gnome-desktop

%per %post作用域都会有问题 感慨:这事断断续续试着解决了4、5次,配置文件、网卡、虚拟机等等等,都排查了一溜够,如今解决了,我只有一个字:哎。

Centos 7.3 x86_64 下的配置文件模板

Centos-7.3-x86_64.cfg

#Kickstart Configurator by BrandynX
#platform=x86, AMD64, or Intel EM64T

#System  language
lang en_US

#System keyboard
keyboard us

#Install OS instead of upgrade
install

#Use text mode install
text

#Sytem timezone
timezone Asia/Shanghai

#Use NFS installation Media
url --url=$tree

#Root password
rootpw --iscrypted $default_password_crypted

#Network information
$SNIPPET('network_config')
#network --bootproto=dhcp --device=eth0 --onboot=on

#System authorization infomation
auth  --useshadow  --enablemd5

#Firewall configuration
firewall --disabled

#SELinux configuration
selinux --disabled

# Reboot after installation
reboot

#System bootloader configuration
bootloader --location=mbr

#Clear the Master Boot Record
zerombr

#Partition clearing information
clearpart --all --initlabel

#Disk partitioning information
part /boot --fstype xfs --size 1024 --ondisk sda
#Oracle:part swap --size 16384 --ondisk sda
part swap --size 2048 --ondisk sda
part / --fstype xfs --size 1 --grow --ondisk sda


#Do not configure XWindows
skipx

%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end


#Package install information
%packages
@base
@core
@fonts
@performance tools
%end


%post
$yum_config_stanza
mkdir -p /app/scripts
mkdir -p /data/
wget -O /app/scripts/centos7_optimiz.sh http://192.168.0.238/centos7_optimiz.sh
chmod +x /app/scripts/centos7_optimiz.sh && /bin/sh /app/scripts/centos7_optimiz.sh
%end

Centos 6.8 x86_64 下的配置文件模板

Centos-6.8-x86_64.cfg

#Kickstart Configurator by BrandynX
#platform=x86, AMD64, or Intel EM64T

# System language
lang en_US

# System keyboard
keyboard us

# Install OS instead of upgrade
install

# Use graphical install
text
firstboot --disable

# System timezone
timezone  Asia/Shanghai

# Use network installation
url --url=$tree
#url --url="http://192.168.0.238/cobbler/ks_mirror/Centos-6.8-x86_64/"

# Root password 123qwe!@#
rootpw --iscrypted $default_password_crypted
#rootpw --iscrypted $1$DLTd6xbX$UOYR/gXuVkD2rxWtI4y/l/

# Network information
$SNIPPET('network_config')
#network  --bootproto=dhcp --device=eth0 --onboot=on

# System authorization information
auth  --useshadow  --passalgo=sha512

# Firewall configuration
firewall --disabled

# SELinux configuration
selinux --disabled

# Reboot after installation
reboot

# System bootloader configuration
bootloader --location=mbr

# Clear the Master Boot Record
zerombr

# Partition clearing information
clearpart --all --initlabel 

# Disk partitioning information
part /boot --fstype  ext4 --size 1024 --ondisk sda
#part swap --size 16384 --ondisk sda
part swap --size 2048 --ondisk sda
part / --fstype ext4 --size 1 --grow --ondisk sda


%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end

%packages
@base
@core
@fonts
@chinese-support
@performance tools

%post
$yum_config_stanza
mkdir -p /app/scripts
mkdir -p /data/
wget -O /app/scripts/centos6_optimiz.sh http://192.168.0.232/centos6_optimiz.sh
chmod +x /app/scripts/centos6_optimiz.sh && /bin/sh /app/scripts/centos6_optimiz.sh
%end

results matching ""

    No results matching ""