Pxe+kickstart Unattended Installation Rhel

Source: Internet
Author: User

1, the specific principle I will not repeat here, just record their own installation process, so that can be quickly deployed later;

2, first of all, my configuration environment is Centos6.4.32-bit operating system desktop version

The required devices are:

DHCP server

TFTP server

Ks.cfg configuration file generated by kickstart

A server that hosts the system installation files, such as Nfs,http or FTP server

A host with a PXE-enabled network card

3, first installed is the TFTP service, TFTP is the UDP protocol

[email protected] ~]# Yum Install install tftp-server tftp xinetd

TFTP does not start after it is installed, we open the vim/etc/xinetd.d/tftp

Change the disable=yes inside to No, as follows:

Service TFTP

{

Socket_type = Dgram

protocol = UDP

Wait = yes

user = root

Server =/USR/SBIN/IN.TFTPD

Server_args =-s/var/lib/tftpboot

Disable = no

Per_source = 11

CPS = 100 2

Flags = IPV4

}

Restart XINETD:

[Email protected] xinetd.d]# service xinetd Restart

Stop xinetd: [Failed]

Starting xinetd: [OK]

Check that the port is open:

[email protected]/]# Netstat-auntp|grep

UDP 0 0 0.0.0.0:69 0.0.0.0:* 25392/xinetd

4. Copy pxelinux.0 initrd vmlinuz copy to/var/lib/tftpboot/

pexlinux.0 need to install syslinux before you can have

Yum install-y syslinux

cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

Mount the system installation CD to/MNT

mount/dev/sr0/mnt

cp/mnt/images/pxeboot/initrd.img/mnt/images/pxeboot/vmlinuz/var/lib/tftpboot/

5. Create a directory in/var/lib/tftpboot/pxelinux.cfg

mkdir/var/lib/tftpboot/pxelinux.cfg

Cp/mnt/isolinux/isolinux.cfg Pxelinux.cfg/default

chmod u+w Default

6, the next installation of the DHCP service, if the local area network has a DHCP service, we can not install the DHCP service, if you need to set the installed system host name, we can install the DNS service, here is not set.

Yum install-y DHCP

Cat/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample >/etc/dhcp/dhcpd.conf

The contents of the/etc/dhcp/dhcpd.conf are modified without the following

Subnet 192.168.0.0 netmask 255.255.255.0 {

Range 192.168.0.100 192.168.0.200;

Option Domain-name-servers 192.168.0.211;

Option Domain-name "internal.example.org";

Option routers 192.168.0.211;

Option broadcast-address 192.168.0.255;

FileName "/pxelinux.0";

Next-server 192.168.0.211;

Default-lease-time 600;

Max-lease-time 7200;

}

Now the IP of my production device is 192.168.0.211;

7, install the VSFTPD server (you can also use the HTTP,NFS service to provide the required installation files)

Yum Install Vsftpd-y

Create an ISO directory under the/VAR/FTP directory

Then copy the contents of the system installation disk to the ISO directory.

Cp-a/mnt/*/var/ftp/iso

8, installation Kickstart

Yum Install-y System-config-kickstart

Then run in a desktop environment

System-config-kickstart

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/56/FD/wKiom1SOwJKRiu8wAAJoGze4evA023.jpg "title=" QQ picture 20141215190445.jpg "alt=" Wkiom1sowjkriu8waajogze4eva023.jpg "/>

Select configuration Kickstart as per the process of installing the system as above

After the configuration is saved under the/var/ftp/pub directory, named Ks.cfg

The following is the contents of the file:

#platform =x86, AMD64, or Intel EM64T

#version =devel

# Firewall Configuration

Firewall--disabled

# Install OS instead of upgrade

Install

# Use Network Installation

URL--url= "Ftp://192.168.0.211/iso"

# Root Password

ROOTPW--iscrypted $1$ntpjssic$rc9vmmqn/onkcdouydn6z0

# System Authorization Information

Auth--useshadow--passalgo=sha512

# Use text mode install

Text

Firstboot--disable

# System Keyboard

Keyboard US

# System Language

Lang ZH_CN

# SELinux Configuration

SELinux--permissive

# Installation Logging Level

Logging--level=info

# Reboot after installation

Reboot

# System TimeZone

TimeZone Asia/shanghai

# Network Information

Network--bootproto=dhcp--device=eth0--onboot=on

# System Bootloader Configuration

Bootloader--LOCATION=MBR

# Clear the Master Boot Record

Zerombr

# Partition Clearing Information

Clearpart--all--initlabel

# Disk Partitioning Information

Part/--fstype= "EXT4"--size=10240

Part/boot--fstype= "Ext4"--size=200

Part swap--fstype= "swap"--size=1024


%packages

@base

@chinese-support


%end

9, modify the/var/lib/tftpboot/pxelinux.cfg/default

The first line should read: Default Linux

Label Linux

Menu label ^install or upgrade an existing system

Menu default

Kernel Vmlinuz

Append initrd=initrd.img ks=ftp://192.168.0.211/pub/ks.cfg

10, determined that all services are started, re-create a virtual machine for testing, boot from the network card, the network card will be automatically found.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/0D/wKioL1SQKT-DlRYdAADdekpRrws500.jpg "title=" QQ picture 20141215190445.jpg "alt=" wkiol1sqkt-dlrydaaddekprrws500.jpg "/> First boot from the network card, we will see bootloader load kernel and virtual root file system, We can customize the display effect, I show the effect is water Linux, this display effect we can use the software to achieve, Figlet This package everyone can download http://pan.baidu.com/s/1qWuiYJy on the internet, unzip good, Directly compile and install the line Make;make installed, and then run;

[Email protected] ~]# Figlet Hello

_          _ _

| |__   ___| | | ___

| ' _ \/_ \ | |/_ \

| | | | __/ | | (_) |

|_| |_|\___|_|_|\___/

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/57/0D/wKioL1SQKyiTQqqFAAEqXyye11s449.jpg "title=" Install initrd.jpg "alt=" Wkiol1sqkyitqqqfaaeqxyye11s449.jpg "/>

Check package dependencies

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/10/wKiom1SQKjCAb59UAAFDsrKTY_I154.jpg "style=" float: none; "title=" Dependent check.jpg "alt=" wkiom1sqkjcab59uaafdsrkty_i154.jpg "/>"

The system officially starts to install

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/0D/wKioL1SQKtCxvgMmAAFnTlgZ39w988.jpg "style=" float: none; "title=" installing.jpg "alt=" Wkiol1sqktcxvgmmaafntlgz39w988.jpg "/>

After the system is installed, it will automatically restart for normal operation.


This article is from the "Water Drop Blog" blog, please be sure to keep this source http://wangzan18.blog.51cto.com/8021085/1590823

Pxe+kickstart Unattended Installation Rhel

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.