Pxe + kickstart deploy multiple versions of Linux operating system (I) --- principles, pxekickstart

Source: Internet
Author: User
Tags file transfer protocol

Pxe + kickstart deploy multiple versions of Linux operating system (I) --- principles, pxekickstart
PXE Overview:

 

  • PXE (Pre-bootExecution Environment), Pre-start execution Environment
  • Start a computer through a network interface
  • 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 assign IP addresses, use the TFTP protocol to download a startup software package and run it in the local memory. the startup Software Package completes the basic software settings of the terminal to guide the terminal operating system pre-installed on the server.

  • This Protocol is divided into Client and Server:
The PXE Client calls the Internet Protocol (IP), User Datagram Protocol (UDP), Dynamic Host setting Protocol (DHCP), and small File Transfer Protocol (TFTP) and other network protocols (used to download the Linux kernel and the root file system ). The PXE Client is stored in the ROM of the NIC. (Required for PXE installation: the device has a NIC (NIC) that supports PXE )). 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.

 

PXE Server can be abstracted as a Server that provides the pxe Startup File (the PXE Server network has not been explicitly stated, please advise if you have any opinions)

PXE workflow: For detailed workflow of running PXE protocol, refer to the description in the document: 1. the PXE Client starts from its PXE Nic and requests an IP address from the DHCP server in the network; 2. the DHCP server returns the IP address assigned to the client and the location of the PXE file (this file is usually placed on a TFTP server); 3. PXE Client requests the pxelinux.0 file from the TFTP server in the network (TFTP Client already exists in the PXE Client ROM); 4. the PXE Client executes this file after obtaining the pxelinux.0 file. 5. based on the execution result of pxelinux.0, the kernel and file system are loaded through the TFTP server; 6. go to the installation screen and select one of the HTTP, FTP, and NFS installation methods;
      • Figure: PXE Workflow

 

What is KickStart? KickStart is an unattended installation method. The working principle of KickStart is to record various parameters required for manual intervention during a typical installation process and generate a file named ks. cfg file. In the subsequent installation process (not limited to the machine that generates the KickStart Installation File), when parameters are required, the installer first looks for the file generated by KickStart. When a proper parameter is found, the parameter is used. If no proper parameter is found, manual intervention is required by the installer. In this way, if the KickStart file covers all the parameters that need to be filled in during the installation process, the installer can only tell the installer where to get ks. cfg file, and then busy with your own affairs. After the installation is complete, the installer restarts the system based on the restart option set in ks. cfg and ends the installation.

 

The Unattended Installation Process of PXE + Kickstart is as follows:

 

  • PXE Client sends a request to DHCP
The PXE Client starts from its own PXE Nic. Through PXE BootROM (self-starting chip), it will send a broadcast request using UDP (simple User Datagram Protocol) to request an IP address from the DHCP server in the network.
  • DHCP server information
The DHCP server receives a request from the Client to verify whether the request is sent to a valid PXE Client. If the request is passed, the DHCP server will send a "provide" response to the Client, the "provide" response contains the IP address assigned to the client, the position of the pxelinux Startup Program (TFTP), and the location of the configuration file.
  • PXE client request download Startup File
After receiving a response from the server, the client responds to a frame and sends a request to start the required file. These startup files include pxelinux.0, pxelinux. cfg/default, vmlinuz, and initrd. img.
  • The Boot Server responds to client requests and transfers files
When the server receives a request from the client, more information will be generated between the server and the client to respond, to determine the startup parameters. BootROM is used by the TFTP communication protocol to download the files required to start the installation program from the Boot Server (pxelinux.0, pxelinux. cfg/default ). After the default file is downloaded, the boot kernel of the Linux installation program is started according to the boot sequence defined in the file.
  • Request to download the automatic response File
The client uses pxelinux. after the cfg/default file is successfully guided to Linux to install the kernel, the installer must first determine the installation media used to install linux. If the installation is through the network (NFS, FTP, HTTP ), at this time, the network will be initialized and the installation source location will be located. The location of the automatic response file ks. cfg specified in the default file is read, and the file is downloaded according to the request. There is a problem here. The network is initialized twice in step 2 and step 2, because PXE obtains the Kernel used for installation and the installer, the installer needs to obtain the Binary Package and configuration file required for installing the system. Therefore, the PXE module and Installer are relatively independent. The PXE network configuration cannot be passed to the installer, so that the IP address can be obtained twice, however, IP addresses are the same during the DHCP lease period.
  • Install the operating system on the client
Download the ks. cfg file back, find the OS Server through the file, and download the required software package according to the configuration of the file. After the OS Server establishes a connection with the client, it will start to transmit the software package, and the client will start to install the operating system. After the installation is complete, you will be prompted to reboot the computer.

 

PXE + KickStart installation conditions: Services to be installed for different transmission protocols are as follows:
Related Knowledge links: 1. http://www.cnblogs.com/fiberhome/articles/6418320.html2.http://blog.zhubiaook.com/linux/2017/09/17/PXE+DHCP+Apache+KickStart/3.http://blog.csdn.net/oWangChen1234567/article/details/78015737? LocationNum = 5 & fps = 1



Null



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.