PXE + Kickstart unattended installation and kickstart Unattended Installation

Source: Internet
Author: User
Tags file transfer protocol

PXE + Kickstart unattended installation and kickstart Unattended Installation
I. Introduction 1. What is PXE?

PXE (Pre-boot Execution Environment, Pre-start Execution Environment) is the latest technology developed by Intel, working in the Network Mode of Client/Server, the workstation can download images from remote servers over the network and start the operating system over the network. During the startup process, the terminal requires the server to allocate an IP address and use TFTP (trivial file transfer protocol) or the MTFTP (multicast trivial file transfer protocol) protocol downloads a startup package to the local memory for execution. The startup package completes the basic software settings of the terminal, in this way, the operating system of the terminal that is pre-installed on the server is guided.

Strictly speaking, PXE is not an installation method, but a boot method. A prerequisite for PXE installation is that the computer to be installed must contain a NIC supported by PXE, that is, a PXE Client must be included in the NIC. The PXE protocol enables the computer to start over the network. This Protocol is divided into Client and Server, while PXE Client is in the ROM of the NIC. During computer boot, the BIOS transfers the PXE Client to the memory for execution, and then the PXE Client downloads the files stored in the remote end to the local computer for running through the network. To run the PXE protocol, you must set the DHCP server and TFTP server. The DHCP server assigns an IP address to the PXE Client (the host on which the system is to be installed). Because the IP address is assigned to the PXE Client, you need to add relevant PXE settings when configuring the DHCP server. In addition, TFTP Client already exists in the PXE Client ROM, so it can download the required files to the TFTP Server through the TFTP protocol.

2. What is Kickstart

Kickstart is an unattended installation method. It works by recording typical parameters that require manual intervention during installation and generating a file named ks. cfg. If a parameter is required during the installation process (not limited to the machine that generates the Kickstart Installation File), the installer first searches for the file generated by Kickstart. If a proper parameter is found, the parameter is used. If no proper parameter is found, manual intervention is required by the installer. Therefore, if the Kickstart file contains all the parameters that may occur during the installation process, the installer can only tell the installer where to obtain ks. cfg file. After the installation is complete, the installer restarts the system according to the settings in ks. cfg and ends the installation.

 

PXE + Kickstart the complete process of unattended operating system installation is as follows:

Ii. System Environment

Centos 7.4 on the server side

Disable Firewall

SElinux = disabled

3. Install HTTP and configure

The system installation methods include HTTP, FTP, and NFS. Here, HTTP is used for installation. The other two methods are similar to HTTP.

1. Install HTTP and start the service

Install yum install httpd

View rpm-q httpd

Systemctl status httpd start http

Systemctl enable httpd is set to boot

2. Mount the CD to the http root directory/var/www/html

Note: If the browser test is opened as the default test page, you must modify the/etc/httpd/conf. d/welcome. conf configuration file.

Restart the httpd service after modification.

4. install and configure TFTP1 and install tftp-server

Yum install tftp-server

Rpm-q tftp-server

 

2. Configure tftp-server

Vim/etc/xinetd. d/tftp

Set disable to no

3. Start the tftp service

Systemctl start tftp. socket

Systemctl enable tftp. socket

5. Generate the ks. cfg response file. 1. Install Kickstart.

Yum install system-config-kickstart

2. Configure Kickstart In the desktop environment

Note: The software installation package management cannot be opened, and the yum source cannot be modified.

Generate the centos7.cfg file and save it under/var/www/html/ks /.

 

6. Prepare relevant PXE startup files

Note: syslinux (yum install syslinux) must be installed)

1. Prepare files
mkdir /var/lib/tftpboot/pxelinux.cfg/cp /usr/share/syslinux/{pxelinux.0,menu.c32} /var/lib/tftpboot/cp /misc/cd/isolinux/{vmlinuz,initrd.img} /var/lib/tftpboot/cp /misc/cd/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
2. Modify the default Startup Menu

Vim/var/lib/tftpboot/pxelinux. cfg/default

7. install and configure DHCP1 and install DHCP Service

Yum install dhcp

2. Copy the configuration template file to the DHCP configuration directory.

Cp-f/usr/share/doc/dhcp-4.2.5/dhcpd. conf. example/etc/dhcp/dhcpd. conf

3. modify the configuration file and set startup

Systemctl start dhcpd

Systemctl enable dhcpd

8. test and install

 

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.