Install Centos6.4 in unattended PXE

Source: Internet
Author: User
To use pex, you need to use kickstart, (ftp, HTTP, nfs), tftp, DHCP, Centos6.4 system Disc 1) ks. cfg file to create [root @ wwwshare] # yuminstall

To use pex, kickstart, (ftp, HTTP, nfs), tftp, DHCP, and Centos6.4 are required.

1) ks. cfg file creation

  [Root @ www share] # yum install-y system-config-kickstart

Kickstart creates ks. cfg based on/root/anaconda-ks.cfg (disk allocation, time zone, language, rpm package and other parameters configured during system installation)

# Partition clearing information Copy Partition information in the anaconda-ks.cfg clearpart -- all -- initlabel part/boot -- fstype = ext4 -- size = 500 part pv.008002 -- grow -- size = 1 volgroup vg_centos -- pesize = 4096 pv.008002logvol /-- fstype = ext4 -- name = lv_root -- vgname = vg_centos -- grow -- size = 1024 -- maxsize = 51200 logvol swap -- name = lv_swap -- vgname = vg_centos -- grow -- size = 1984 -- maxsize = 1984

Add software package

% Packages @ base @ basic-desktop @ core @ debugging @ desktop-platform @ Desktop Platform Development @ Server Platform Development @ Development tools package group @ directory -client @ fonts @ input-methods @ internet-browser @ java-platform @ legacy-x @ network-file-system-client @ print-client @ remote-desktop-clients @ server -platform @ server-policy @ x11 % end

2) build an ftp server and prepare the RPM software package

1234 [Root @ www ~] # Yum install-y vsftpd [root @ www ftp] # mkdir CentOS_6.4_x86_64 [root @ www ftp] # mount-r/dev/sr0/var/ftp/CentOS_6.4_x86_64 [root @ www ~] # Cp ks. cfg/var/ftp/kickstart/ks. cfg

3) prepare the Centos6.4 Boot File. this is the key part (TFTP)

Install and start tftp

  [Root @ www ~] # Rpm-ivh tftp-0.49-7.el6.x86_64.rpm Preparing... ######################################## ### [100%] 1: tftp ####################################### #### [100%] [root @ www ~] # Rpm-ivh tftp-server-0.49-7.el6.x86_64.rpm Preparing... ######################################## ### [100%] 1: tftp-server ##################################### ###### [1, 100%] [root @ www ~] # Chkconfig tftp on [root @ www ~] # Service xinetd restartStopping xinetd: [OK] Starting xinetd: [OK] [root @ www ~] # Ss-uan | grep 69 UNCONN 0 0 *: 69 *:*

Prepare the startup file and kernel

  [Root @ www ~] # Yum istall-y syslinux this software package prepares pxelinux.0 for booting the network to install Linux [root @ www ~] # Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/[root @ www ~] # Cp/var/ftp/CentOS_6.4_x86_64/isolinux/{boot.msg, Splash.jpg, vesamenu. c32}/var/lib/tftpboot/define CentOS 6.4 default installation interface [root @ www ~] # Cp/var/ftp/CentOS_6.4_x86_64/images/pxeboot/{initrd. img, vmlinuz}/var/lib/tftpboot/[root @ www tftpboot] # mkdir pxelinux. cfg [root @ www pxelinux. cfg] # cp/var/ftp/CentOS_6.4_x86_64/isolinux. cfg. /default label linux menu label ^ Install or upgrade an existing system menu default kernel vmlinuz append initrd = initrd. img ks = [root @ www tftpboot] # ls-lR verify whether the files on tftp are ready.: total 36032-r -- r -- 1 root 84 Nov 14 boot. msg-r -- 1 root 32495283 Nov 14 0:49 initrd. img-rw-r -- 1 root 26595 Nov 14 pxelinux.0 drwxr-xr-x 2 root 4096 Nov 15 pxelinux. cfg-r -- 1 root 151230 Nov 14 splash.jpg-r -- 1 root 162860 Nov 14 vesamenu. c32-r-xr-xr-x 1 root 4043888 Nov 14 vmlinuz. /pxelinux. cfg: total 4-rw-r -- r -- 1 root 991 Nov 14 04:01 default

4) DHCP server installation

  [Root @ www ~] # Rpm-ivh dhcp-common-4.1.1-38.P1.el6.centos.x86_64.rpm Preparing... ######################################## ### [100%] 1: dhcp-common ##################################### ###### [1, 100%] [root @ www ~] # Rpm-ivh dhcp-4.1.1-38.P1.el6.centos.x86_64.rpm Preparing... ######################################## ### [100%] 1: dhcp ####################################### #### [100%] [root @ www ~] # Cp/usr/share/doc/dhcp-4.1.1/dhcpd. conf. sample/etc/dhcp/dhcpd. conf subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.200 192.168.1.225; option routers 192.168.1.1;} next-server 192.168.1.150; specify tftp for boot and installation filename = "pxelinux, 0"; [root @ www ~] # Service dhcpd startStarting dhcpd: [OK]

5) the Client is ready to adjust the BIOS startup sequence.

 

The Client obtains the IP address from DHCP.

Installation Interface Display

Create LVM volume

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.