Hello World !
分类: LINUX
2012-07-19 19:12:24
不同版本的Linux其ks.cfg文件也不同…………….
X Windows System
[root@localhost ~]# rpm -qa|grep system-config-kicks
[root@localhost ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~]# cd /mnt
[root@localhost mnt]# cd Server/
[root@localhost Server]# rpm -ivh system-config-kickstart-2.6.19.9-2.el5.noarch.rpm
warning: system-config-kickstart-2.6.19.9-2.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:system-config-kickstart########################################### [100%]
[root@localhost Server]#cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo rhel-source.repo
[root@localhost yum.repos.d]# cp rhel-debuginfo.repo rhel-debuginfo.repo.bak
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo rhel-debuginfo.repo.bak rhel-source.repo
[root@localhost yum.repos.d]# vi rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
[root@localhost yum.repos.d]# system-config-kickstart
ks.cfg
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
zerombr yes
#Skip the key number
key --skip
# Use graphical install
graphical
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use CDROM installation media
cdrom
# Network information
network --bootproto=static --device=eth0 --ip=192.168.1.12 --netmask=255.255.255.0 --gateway=192.168.1.21 --hostname=lyn --onboot=on
# Reboot after installation
reboot
#Root password
rootpw root01
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone --isUtc Asia/Shanghai
# Install OS instead of upgrade
install
# Disk partitioning information
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part swap --bytes-per-inode=4096 --fstype="swap" --size=2048
part /var --bytes-per-inode=4096 --fstype="ext3" --size=10000
part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1
%packages
@base
[root@localhost mnt]# vi isolinux/isolinux.cfg
default linux ks=cdrom:/isolinux/ks.cfg
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -
Ks.cfg all packages
%packages
@base
@development-libs
@development-tools
@sound-and-video
@web-server
@x-software-development
@openfabrics-enterprise-distribution
@gnome-desktop
@base-x
@mysql
@printing
@gnome-software-development
@java-development
@kde-desktop
@legacy-software-development
@legacy-software-support
@editors
@mail-server
@chinese-support
@kde-software-development
@server-cfg
@text-internet
@system-tools
@admin-tools
@dialup
@legacy-network-server
@authoring-and-publishing
@graphics
@ruby
@smb-server
@network-server
@sql-server
@news-server
@java
@ftp-server
@engineering-and-scientific
@graphical-internet
@dns-server
@games
@office
Start system write the path of ks.cfg