pxe-Unattended Installation

Source: Internet
Author: User
Tags gpg

Unattended Network Installation LINUX Operating System

Get ready:

1. Disable the firewall, disable selinux, configure IP parameters,

2. Need Yum Environment

3, installation vsftp start-up service

First, prepare RHEL6 installation source

[Email protected] ~]# mkdir/var/ftp/rhel6

[Email protected] ~]# mount/dev/cdrom/var/ftp/rhel6

[[Email protected] ~]# service VSFTPD start

Second, install start TFPT server

[Email protected] ~]# yum-y install Tftp-server

[Email protected] ~]# vim/etc/xinetd.d/tftp

Disable = No

[[Email protected] ~]# service xinetd start

Third, prepare the Linux kernel, initialize the image file

[Email protected] ~]# cd/var/ftp/rhel6/images/pxeboot/

[email protected] pxeboot]# CP Vmlinuz initrd.img/var/lib/tftpboot/

Iv. preparing the PXE boot program, boot menu

[Email protected] pxeboot]# yum-y install Syslinux

[Email protected] pxeboot]# cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

[Email protected] ~]# mkdir/var/lib/tftpboot/pxelinux.cfg

[Email protected] ~]# Vim/var/lib/tftpboot/pxelinux.cfg/default

Default Auto

Prompt 0

Label Auto

Kernel Vmlinuz

Append ks=ftp://172.16.1.111/rhel6/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=8192

Label Linux text

Kernel Vmlinuz

Append text initrd=initrd.img devfs=nomount ramdisk_size=8192

Label Linux Rescue

Kernel Vmlinuz

Append rescue initrd=initrd.img Devfs=nomount ramdisk_size=8192

Five, install and start DHCP Service

[[email protected] ~]# yum-y Install DHCP

[Email protected] ~]# vim/etc/dhcp/dhcpd.conf

Subnet 172.16.0.0 netmask 255.255.0.0 {

Range 172.16.1.100 172.16.1.200;

Option Domain-name-servers 172.16.1.111;

Option Domain-name "benet.com";

Option routers 172.16.1.1;

Next-server 172.16.1.111;

FileName "pxelinux.0";

FileName "pxelinux.0";

}

[Email protected] ~]# service DHCPD restart

Unattended Installation LINUX

First, configure the installation answer parameters

[Email protected] ~]# yum-y install System-config-kickstart

[Email protected] ~]# System-config-kickstart

B. Copy and verify the answer file Ks.cfg

[Email protected] ~]# cp/root/ks.cfg/var/ftp/ks.cfg

[email protected] ~]# cat ks.cfg

#platform =x86, AMD64, or Intel EM64T

#version =devel

# Firewall Configuration

Firewall--disabled

# Install OS instead of upgrade

Install

# Use Network Installation

URL--url= "Ftp://172.16.1.111/rhel6"

# Root Password

ROOTPW--iscrypted $1$7bdwivjh$dfadh1d/yxw5ivofyo5q31

# System Authorization Information

Auth--useshadow--passalgo=sha512

# Use graphical Install

Graphical

Firstboot--disable

# System Keyboard

Keyboard US

# System Language

Lang ZH_CN

# SELinux Configuration

SELinux--disabled

# 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

# Disk Partitioning Information

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

Part/home--fstype= "Ext4"--size=10240

Part swap--fstype= "swap"--size=4096

Part/--fstype= "EXT4"--grow--size=1

%post--interpreter=/bin/bash

Rm-f/etc/yum.repos.d/*

Echo Echo ' [base]

name=red Hat Enterprise Linux

Baseurl=ftp://172.16.1.111/rhel6

Enabled=1

Gpgcheck=1

Gpgkey=file://etc/pki/rpm-gpg/rpm-gpg-key-redhat-release ' >/etc/yum.repos.d/rhel6.repo

%end

%packages

@additional-devel

@basic-desktop

@chinese-support

@compat-libraries

@debugging

@desktop-debugging

@desktop-platform

@desktop-platform-devel

@development

@eclipse

@emacs

@fonts

@general-desktop

@graphical-admin-tools

@graphics

@hardware-monitoring

@input-methods

@internet-browser

@java-platform

@large-systems

@legacy-unix

@legacy-X

@network-file-system-client

@network-tools

@performance

@perl-runtime

@php

@remote-desktop-clients

@ruby-runtime

@scientific

@security-tools

@storage-client-multipath

@system-admin-tools

@system-management

@system-MANAGEMENT-SNMP

@technical-writing

@tex

@virtualization

@virtualization-client

@virtualization-platform

@virtualization-tools

@web-server

@web-servlet

@x11

Compat-openmpi

Compat-openmpi-psm

Crypto-utils

Hmaccalc

%end

C. Test results

The new virtual machine does not need to set the BIOS to boot from network boot, and the IP of the client is set to DHCP (auto get mode).

pxe-Unattended Installation

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.