Chinaunix首页 | 论坛 | 博客
  • 博客访问: 225070
  • 博文数量: 41
  • 博客积分: 1470
  • 博客等级: 准尉
  • 技术积分: 370
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-25 11:15
文章分类

全部博文(41)

文章存档

2011年(41)

分类: LINUX

2011-04-19 11:31:46

使用Kickstart文件进行安装包括如下的4个步骤:
第一步:创建Kickstart文件
第二步:配置安装路径或介质,使Kickstart文件能有效运行
第三步:启动安装
第四步:在安装过程中,引导指向Kickstart文件进行安装。

一、创建一个Kichstart文件
1、安装system-config-kickstart工具包
system-config-kickstart是一个生成Kickstart文件的图形工具,但是,其支持的参数有限,
因此,通过图形工具生成相应的Kickstart文件后,应根据需要再在该文件基础上进行补充修改。
[root@desktop8 ~]# yum install system-config-kickstart
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package system-config-kickstart.noarch 0:2.8.6.2-1.el6 set to be updated
--> Processing Dependency: pykickstart >= 0.96 for package: system-config-kickstart-2.8.6.2-1.el6.noarch
--> Processing Dependency: anaconda >= 11.4.0.42-1 for package: system-config-kickstart-2.8.6.2-1.el6.noarch
--> Processing Dependency: system-config-language for package: system-config-kickstart-2.8.6.2-1.el6.noarch
--> Running transaction check
---> Package anaconda.x86_64 0:13.21.82-1.el6 set to be updated
--> Processing Dependency: syslinux >= 3.73 for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: python-pyblock >= 0.45-2 for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: fcoe-utils >= 1.0.12-3.20100323git for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: python-cryptsetup >= 0.0.6 for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: createrepo >= 0.4.7 for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: pyparted >= 3.0 for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: isomd5sum for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: anaconda-yum-plugins for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: python-nss for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: makebootfat for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: tigervnc-server for package: anaconda-13.21.82-1.el6.x86_64
--> Processing Dependency: squashfs-tools for package: anaconda-13.21.82-1.el6.x86_64
---> Package pykickstart.noarch 0:1.74.1-1.el6 set to be updated
---> Package system-config-language.noarch 0:1.3.4-5.el6 set to be updated
--> Running transaction check
---> Package anaconda-yum-plugins.noarch 1:1.0-5.1.el6 set to be updated
---> Package createrepo.noarch 0:0.9.8-4.el6 set to be updated
--> Processing Dependency: python-deltarpm for package: createrepo-0.9.8-4.el6.noarch
--> Processing Dependency: deltarpm for package: createrepo-0.9.8-4.el6.noarch
---> Package fcoe-utils.x86_64 0:1.0.14-9.el6 set to be updated
--> Processing Dependency: libhbalinux >= 1.0.9 for package: fcoe-utils-1.0.14-9.el6.x86_64
--> Processing Dependency: device-mapper-multipath for package: fcoe-utils-1.0.14-9.el6.x86_64
--> Processing Dependency: lldpad for package: fcoe-utils-1.0.14-9.el6.x86_64
--> Processing Dependency: libHBAAPI.so.2()(64bit) for package: fcoe-utils-1.0.14-9.el6.x86_64
---> Package isomd5sum.x86_64 1:1.0.6-1.el6 set to be updated
---> Package makebootfat.x86_64 0:1.4-10.el6 set to be updated
---> Package pyparted.x86_64 0:3.4-2.el6 set to be updated
---> Package python-cryptsetup.x86_64 0:0.0.11-1.el6 set to be updated
---> Package python-nss.x86_64 0:0.8-3.el6 set to be updated
---> Package python-pyblock.x86_64 0:0.48-1.el6 set to be updated
---> Package squashfs-tools.x86_64 0:4.0-3.el6 set to be updated
---> Package syslinux.x86_64 0:3.86-1.1.el6 set to be updated
--> Processing Dependency: perl(Digest::SHA1) for package: syslinux-3.86-1.1.el6.x86_64
--> Processing Dependency: perl(Crypt::PasswdMD5) for package: syslinux-3.86-1.1.el6.x86_64
---> Package tigervnc-server.x86_64 0:1.0.90-0.10.20100115svn3945.el6 set to be updated
--> Processing Dependency: xorg-x11-fonts-misc for package: tigervnc-server-1.0.90-0.10.20100115svn3945.el6.x86_64
--> Running transaction check
---> Package deltarpm.x86_64 0:3.5-0.5.20090913git.el6 set to be updated
---> Package device-mapper-multipath.x86_64 0:0.4.9-31.el6 set to be updated
--> Processing Dependency: device-mapper-multipath-libs = 0.4.9-31.el6 for package: device-mapper-multipath-0.4.9-31.el6.x86_64
--> Processing Dependency: libmultipath.so()(64bit) for package: device-mapper-multipath-0.4.9-31.el6.x86_64
---> Package libhbaapi.x86_64 0:2.2-10.el6 set to be updated
---> Package libhbalinux.x86_64 0:1.0.10-1.el6 set to be updated
---> Package lldpad.x86_64 0:0.9.38-3.el6 set to be updated
--> Processing Dependency: libconfig.so.8()(64bit) for package: lldpad-0.9.38-3.el6.x86_64
---> Package perl-Crypt-PasswdMD5.noarch 0:1.3-6.el6 set to be updated
---> Package perl-Digest-SHA1.x86_64 0:2.12-2.el6 set to be updated
---> Package python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6 set to be updated
---> Package xorg-x11-fonts-misc.noarch 0:7.2-9.1.el6 set to be updated
--> Running transaction check
---> Package device-mapper-multipath-libs.x86_64 0:0.4.9-31.el6 set to be updated
---> Package libconfig.x86_64 0:1.3.2-1.1.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package                      Arch   Version                         Repository
                                                                           Size
================================================================================
Installing:
 system-config-kickstart      noarch 2.8.6.2-1.el6                   base 924 k
Installing for dependencies:
 anaconda                     x86_64 13.21.82-1.el6                  base 3.0 M
 anaconda-yum-plugins         noarch 1:1.0-5.1.el6                   base  12 k
 createrepo                   noarch 0.9.8-4.el6                     base  81 k
 deltarpm                     x86_64 3.5-0.5.20090913git.el6         base  71 k
 device-mapper-multipath      x86_64 0.4.9-31.el6                    base  79 k
 device-mapper-multipath-libs x86_64 0.4.9-31.el6                    base 130 k
 fcoe-utils                   x86_64 1.0.14-9.el6                    base  83 k
 isomd5sum                    x86_64 1:1.0.6-1.el6                   base  24 k
 libconfig                    x86_64 1.3.2-1.1.el6                   base  50 k
 libhbaapi                    x86_64 2.2-10.el6                      base  15 k
 libhbalinux                  x86_64 1.0.10-1.el6                    base  31 k
 lldpad                       x86_64 0.9.38-3.el6                    base 139 k
 makebootfat                  x86_64 1.4-10.el6                      base  42 k
 perl-Crypt-PasswdMD5         noarch 1.3-6.el6                       base  11 k
 perl-Digest-SHA1             x86_64 2.12-2.el6                      base  49 k
 pykickstart                  noarch 1.74.1-1.el6                    base 269 k
 pyparted                     x86_64 3.4-2.el6                       base 184 k
 python-cryptsetup            x86_64 0.0.11-1.el6                    base  22 k
 python-deltarpm              x86_64 3.5-0.5.20090913git.el6         base  27 k
 python-nss                   x86_64 0.8-3.el6                       base 284 k
 python-pyblock               x86_64 0.48-1.el6                      base  67 k
 squashfs-tools               x86_64 4.0-3.el6                       base  80 k
 syslinux                     x86_64 3.86-1.1.el6                    base 928 k
 system-config-language       noarch 1.3.4-5.el6                     base 142 k
 tigervnc-server              x86_64 1.0.90-0.10.20100115svn3945.el6 base 1.0 M
 xorg-x11-fonts-misc          noarch 7.2-9.1.el6                     base 5.8 M
Transaction Summary
================================================================================
Install      27 Package(s)
Upgrade       0 Package(s)
Total download size: 13 M
Installed size: 35 M
Is this ok [y/N]: y
Downloading Packages:
(1/27): anaconda-13.21.82-1.el6.x86_64.rpm               | 3.0 MB     00:00    
(2/27): anaconda-yum-plugins-1.0-5.1.el6.noarch.rpm      |  12 kB     00:00    
(3/27): createrepo-0.9.8-4.el6.noarch.rpm                |  81 kB     00:00    
(4/27): deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm      |  71 kB     00:00    
(5/27): device-mapper-multipath-0.4.9-31.el6.x86_64.rpm  |  79 kB     00:00    
(6/27): device-mapper-multipath-libs-0.4.9-31.el6.x86_64 | 130 kB     00:00    
(7/27): fcoe-utils-1.0.14-9.el6.x86_64.rpm               |  83 kB     00:00    
(8/27): isomd5sum-1.0.6-1.el6.x86_64.rpm                 |  24 kB     00:00    
(9/27): libconfig-1.3.2-1.1.el6.x86_64.rpm               |  50 kB     00:00    
(10/27): libhbaapi-2.2-10.el6.x86_64.rpm                 |  15 kB     00:00    
(11/27): libhbalinux-1.0.10-1.el6.x86_64.rpm             |  31 kB     00:00    
(12/27): lldpad-0.9.38-3.el6.x86_64.rpm                  | 139 kB     00:00    
(13/27): makebootfat-1.4-10.el6.x86_64.rpm               |  42 kB     00:00    
(14/27): perl-Crypt-PasswdMD5-1.3-6.el6.noarch.rpm       |  11 kB     00:00    
(15/27): perl-Digest-SHA1-2.12-2.el6.x86_64.rpm          |  49 kB     00:00    
(16/27): pykickstart-1.74.1-1.el6.noarch.rpm             | 269 kB     00:00    
(17/27): pyparted-3.4-2.el6.x86_64.rpm                   | 184 kB     00:00    
(18/27): python-cryptsetup-0.0.11-1.el6.x86_64.rpm       |  22 kB     00:00    
(19/27): python-deltarpm-3.5-0.5.20090913git.el6.x86_64. |  27 kB     00:00    
(20/27): python-nss-0.8-3.el6.x86_64.rpm                 | 284 kB     00:00    
(21/27): python-pyblock-0.48-1.el6.x86_64.rpm            |  67 kB     00:00    
(22/27): squashfs-tools-4.0-3.el6.x86_64.rpm             |  80 kB     00:00    
(23/27): syslinux-3.86-1.1.el6.x86_64.rpm                | 928 kB     00:00    
(24/27): system-config-kickstart-2.8.6.2-1.el6.noarch.rp | 924 kB     00:00    
(25/27): system-config-language-1.3.4-5.el6.noarch.rpm   | 142 kB     00:00    
(26/27): tigervnc-server-1.0.90-0.10.20100115svn3945.el6 | 1.0 MB     00:00    
(27/27): xorg-x11-fonts-misc-7.2-9.1.el6.noarch.rpm      | 5.8 MB     00:00    
--------------------------------------------------------------------------------
Total                                           6.9 MB/s |  13 MB     00:01    
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
base/gpgkey                                              | 6.3 kB     00:00 ...
Importing GPG key 0xFD431D51 "Red Hat, Inc. (release key 2) <security@redhat.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0 "Red Hat, Inc. (auxiliary key) <security@redhat.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing     : libhbaapi-2.2-10.el6.x86_64                             1/27
  Installing     : pyparted-3.4-2.el6.x86_64                               2/27
  Installing     : deltarpm-3.5-0.5.20090913git.el6.x86_64                 3/27
  Installing     : python-deltarpm-3.5-0.5.20090913git.el6.x86_64          4/27
  Installing     : python-pyblock-0.48-1.el6.x86_64                        5/27
  Installing     : libhbalinux-1.0.10-1.el6.x86_64                         6/27
  Installing     : makebootfat-1.4-10.el6.x86_64                           7/27
  Installing     : python-nss-0.8-3.el6.x86_64                             8/27
  Installing     : device-mapper-multipath-libs-0.4.9-31.el6.x86_64        9/27
  Installing     : device-mapper-multipath-0.4.9-31.el6.x86_64            10/27
  Installing     : python-cryptsetup-0.0.11-1.el6.x86_64                  11/27
  Installing     : squashfs-tools-4.0-3.el6.x86_64                        12/27
  Installing     : 1:isomd5sum-1.0.6-1.el6.x86_64                         13/27
  Installing     : perl-Digest-SHA1-2.12-2.el6.x86_64                     14/27
  Installing     : libconfig-1.3.2-1.1.el6.x86_64                         15/27
  Installing     : pykickstart-1.74.1-1.el6.noarch                        16/27
  Installing     : lldpad-0.9.38-3.el6.x86_64                             17/27
  Installing     : fcoe-utils-1.0.14-9.el6.x86_64                         18/27
  Installing     : createrepo-0.9.8-4.el6.noarch                          19/27
  Installing     : perl-Crypt-PasswdMD5-1.3-6.el6.noarch                  20/27
  Installing     : syslinux-3.86-1.1.el6.x86_64                           21/27
  Installing     : system-config-language-1.3.4-5.el6.noarch              22/27
  Installing     : xorg-x11-fonts-misc-7.2-9.1.el6.noarch                 23/27
  Installing     : tigervnc-server-1.0.90-0.10.20100115svn3945.el6.x86_   24/27
  Installing     : 1:anaconda-yum-plugins-1.0-5.1.el6.noarch              25/27
  Installing     : anaconda-13.21.82-1.el6.x86_64                         26/27
  Installing     : system-config-kickstart-2.8.6.2-1.el6.noarch           27/27
Installed:
  system-config-kickstart.noarch 0:2.8.6.2-1.el6                               
Dependency Installed:
  anaconda.x86_64 0:13.21.82-1.el6                                             
  anaconda-yum-plugins.noarch 1:1.0-5.1.el6                                    
  createrepo.noarch 0:0.9.8-4.el6                                              
  deltarpm.x86_64 0:3.5-0.5.20090913git.el6                                    
  device-mapper-multipath.x86_64 0:0.4.9-31.el6                                
  device-mapper-multipath-libs.x86_64 0:0.4.9-31.el6                           
  fcoe-utils.x86_64 0:1.0.14-9.el6                                             
  isomd5sum.x86_64 1:1.0.6-1.el6                                               
  libconfig.x86_64 0:1.3.2-1.1.el6                                             
  libhbaapi.x86_64 0:2.2-10.el6                                                
  libhbalinux.x86_64 0:1.0.10-1.el6                                            
  lldpad.x86_64 0:0.9.38-3.el6                                                 
  makebootfat.x86_64 0:1.4-10.el6                                              
  perl-Crypt-PasswdMD5.noarch 0:1.3-6.el6                                      
  perl-Digest-SHA1.x86_64 0:2.12-2.el6                                         
  pykickstart.noarch 0:1.74.1-1.el6                                            
  pyparted.x86_64 0:3.4-2.el6                                                  
  python-cryptsetup.x86_64 0:0.0.11-1.el6                                      
  python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6                             
  python-nss.x86_64 0:0.8-3.el6                                                
  python-pyblock.x86_64 0:0.48-1.el6                                           
  squashfs-tools.x86_64 0:4.0-3.el6                                            
  syslinux.x86_64 0:3.86-1.1.el6                                               
  system-config-language.noarch 0:1.3.4-5.el6                                  
  tigervnc-server.x86_64 0:1.0.90-0.10.20100115svn3945.el6                     
  xorg-x11-fonts-misc.noarch 0:7.2-9.1.el6                                     
Complete!
[root@desktop8 ~]#
2、运行system-config-kickstart工具包
[root@desktop8 ~]# system-config-kickstart
在图形界面中按照提示进行配置。
保存kickstart文件,如:~/engineer.cfg
【然后再此cfg文件基础上进行文本编辑,以满足配置要求。】
×××系统中默认有一个cfg文件,即:/root/anaconda-ks.cfg,一般在此文件基础上即可进行编辑处理。
但是,此文件不能直接作为安装启动文件,因为其中没有分区的信息。
在该cfg文件中要注意如下的分区信息。
# Disk partitioning information
part /boot --fstype="ext4" --ondisk=vda --size=100
part / --fstype="ext4" --ondisk=vda --size=5000
part swap --fstype="swap" --ondisk=vda --size=1024
注意:一定要配置相应的安装分区信息,否则,将找不到相应的安装位置。
同时,要注意所选择的软件包的大小,不要超出了相应的分区大小。
二、配置安装路径或介质,使Kickstart文件能有效运行
选择安装路径,一般包括如下的几种安装方式:
   1)网络服务器:FTP,HTTP,NFS
   如使用HTTP方式安装,需要安装相应的HTTP服务包,配置WEB SERVER服务,并启动HTTP服务,使得安装过程中能过通过网络访问到相应的文件。
   将文件复制到相应位置:/var/www/html/
   可测试,如: HTTP://192.168.0.8/ks.cfg,可以打开相应的文本文件浏览。
   2)DHCP/TFTP server
   3)USB disk 或者CD-ROM
   4)local hard disk本地硬盘
三、启动安装
一般启动有三种方式:
  1)通过硬盘或光驱启动安装
  2)通过网卡PXE
  3)通过boot.iso文件:通过光驱或硬盘中的boot.iso文件
【boot.iso文件大约220M,可以在官方网站或其它下载网站中下载到】
四、在安装过程中,引导指向Kickstart文件进行安装
在开机重启时,按快捷键,如Del、F2或F12(各品牌机不同)
在重新启动过程中进入选择界面时,按esc键进行提示界面
boot:
在其后输入相应的位置,如:
boot: linux ks=http://~ks.cfg
后面的就是按照引导来安装了,如果配置文件中的信息正确,安装就非常顺利了!
在虚拟机VM中试试看~~~~~!!!
 
阅读(4783) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~