CentOS6.4X86 _ 64 detailed version of System installation customization documentation

Source: Internet
Author: User
I. basic environment setup 1.1. operating environment: VM7.1 (version not Limited) + CentOS6.4X86 _ 64VM requires two optical drives to be mounted to DVD1 and DVD2 respectively to install the centos6.4X86 _ 64 system, the required components are customized. install the required components. log and anaconda-ks.cfg files (easier to modify on this basis) [root @ test01] # mkdir/mnt/cd }&

I. basic environment construction
1.1 Operating Environment:
VM7.1 (version not Limited) + CentOS6.4X86 _ 64
Two optical drives are required for the VM, and DVD1 and DVD2 are mounted respectively.
Install centos6.4X 86_64 system, the required components are customized, install. log and anaconda-ks.cfg files are obtained after installation (it is easier to modify on this basis)

[Root @ test01] # mkdir/mnt/cd {1, 2} # Create a cd Mount Directory
[Root @ test01] # mkdir-p/home/klcentos/Packages # Create a directory for custom CD files
[Root @ test01] # mount/dev/cdrom/mnt/cd1 # mount DVD1
[Root @ test01] # mount/dev/cdrom1/mnt/cd2 # mount DVD2

Note: Because the installation of the maximized software is used here, DVD2 is required. if the installation is not maximized, only DVD1 can be used.

Recommended reading:

CentOS 6.4 Grub plus password http://www.centoscn.com/CentOS/config/2013/0721/386.html

Method http://www.centoscn.com/CentOS/config/2013/0721/387.html for reading and writing ntfs disk devices in CentOS 6.4

Basic operation http://www.centoscn.com/CentOS/config/2013/0721/388.html after CentOS 6.4x64 minimal installation

II. prepare customized system files
The new custom system is determined by the above system component package, and the file is obtained by the install. log installation log.

[Root @ test01] # vim/home/kuangl/cp_packages.sh
#! /Bin/bash
For I in $ (awk '/Installing/{print $2}' install. log)
Do
Cp/mnt/cd1/Packages/$ {I}. rpm/home/kuangl/klcentos/Packages
[$? ! = 0] & echo "copy $ {I} is faied"
Done
Rsync-a -- exclude = Packages/mnt/cd1 // home/kuangl/klcentos

3. regenerate the repo file
[Root @ test01] # vim/home/kuangl/klcentos/discinfo. sh
#! /Bin/bash
ISO_DIR =/home/kuangl/klcentos
Cd $ {ISO_DIR}
Declare-x discinfo = $(head-1. discinfo)
Mv $ {ISO_DIR}/repodata/* x86_64-comps.xml $ {ISO_DIR}/repodata/c6-x86_64-comps.xml
Createrepo-g $ {ISO_DIR}/repodata/c6-x86_64-comps.xml $ {ISO_DIR}
Createrepo-u "media: // $ discinfo"-g $ {ISO_DIR}/repodata/* c6-x86_64-comps.xml $ {ISO_DIR}

4. preparation of ks files
The ks file is modified by the system installation anaconda-ks.cfg, of course, you can also use the system-config-kickstart tool to make it, here the ks production method is omitted.
[Root @ test01] # vim/home/kuangl/klcentos/isolinux/ks. cfg
# Kickstart file automatically generated by anaconda.
# Version = DEVEL
Install
Text
Cdrom
Lang en_US.UTF-8
Keyboard us
Skipx
Network -- onboot no -- device eth0 -- bootproto static -- ip 192.168.5.30 -- netmask 255.255.255.0 -- gateway 192.168.5.1 -- noipv6 -- nameserver 8.8.8.8
Rootpw 123456
Firewall -- service = ssh -- port = 80: tcp
Authconfig -- enableshadow -- passalgo = sha512
Selinux -- disabled
Timezone -- utc Asia/Shanghai
Bootloader -- location = mbr -- driveorder = sda -- append = "crashkernel = auto rhgb quiet"
# 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 -- none
Clearpart -- all -- initlabel
Zerombr
Part/boot -- fstype = ext4 -- size = 2000
Part swap -- size = 2000
Part/-- fstype = ext4 -- grow -- size = 200
Reboot
# Repo -- name = "CentOS" -- baseurl = cdrom: sr0 -- cost = 100
% Packages
@ Core
@ Server-policy
% End

5. modify the Boot File 
[Root @ test01] # vim/home/kuangl/klcentos/isolinux. cfg
Default auto
Timeout 600
# Default vesamenu. c32
# Prompt 1
Timeout 600
Display boot. msg
Menu background splash.jpg
Menu title Welcome to CentOS 6.4!
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 auto
Menu label ^ Auto Install system
Menu default
Kernel vmlinuz
Append ks = cdrom:/isolinux/ks. cfg initrd = initrd. img

VI. ISO file generation
[Root @ test01 klcentos] # mkisofs-o klcentos. iso-input-charset UTF-8-B isolinux/isolinux. bin-c isolinux/boot. cat-no-emul-boot-load-size 4-boot-info-table-R-J-v-V klcentos-T/home/kuangl/klcentos

The result is as follows:


[Root @ test01 klcentos] # ll

VII. test and install

7.1 create a virtual machine

7.2 start a virtual machine

7.3 install the Packages package

7.4 after installation, log on to the system

CentOS6.4X86 _ 64 system customization is complete. it only takes several minutes to install the system after customization. is it very convenient.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.