Overview of PXE and detailed Linux usage

Source: Internet
Author: User
Tags file transfer protocol

PXE the overview and use of the detailed

Now the enterprise procurement of many computers are not optical drives, how to install the system? In addition, how can you quickly and massively install Linux server operating system, is there any good way?

The answer is yes, that's what this article says: PXE

PXE (Preboot Execute Environment, pre-Boot execution Environment ) is the latest technology developed by Intel Corporation and works on Client/server network mode, support Workstations download images from remote servers over the network and support booting over the network Operating System , during the boot process, the terminal requires the server to assign IP address, then TFTP(trivial filetransfer protocol) or mtftp (multicasttrivial file transfer Protocol) protocol to download a boot software package into native memory executed by this boot package to complete the terminal (customer) basic software setup, thus booting the terminal operating system pre-installed in the server

The whole installation process is this:

PXE nic Boot =>dhcp get IP address = download from TFTP pxelinux.0,vmlinuz ,initr.img and so on - boot system into the installation step = Download The Ks.cfg file via PEX Linux and follow the data ks.cfg Automation Installation System = Complete


Experimental cases:

How to configure PXE:

1. Configure DHCP

2. Configuring the TFTP server

3, to provide the working environment of PEX

4, provide boot kernel and other files

5, provide the installation source, based on the HTTP service implementation

6. Provide ks.cfg file


1 , configure DHCP Service

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/68/wKiom1PaKH3gXYnzAAAmKytflOU828.jpg "title=" 1.png " alt= "Wkiom1pakh3gxynzaaamkytflou828.jpg"/>

installation DHCP Service

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/68/wKiom1PaKryTCSXRAAL05JozjYI786.jpg "title=" 2.png " alt= "Wkiom1pakrytcsxraal05jozjyi786.jpg"/>

View installation of the DHCP installation package

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/43/69/wKioL1PaK7TQZ0iMAAAmMAqBuRY875.jpg "title=" 2 (). jpg "alt=" wkiol1pak7tqz0imaaammaqbury875.jpg "/>

then look at the dhcp.conf Master profile, open to see a few lines of comment information, comment information to provide a detailed configuration template in /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample , Copy the/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample and overwrite the/etc/dhcp/dhcpd.conf file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/68/wKiom1PaK0mij2kfAAPEWiWaE88743.jpg "title=" 3.jpg " alt= "Wkiom1pak0mij2kfaapewiwae88743.jpg"/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/43/68/wKiom1PaK3iQoi0mAAC53jxnNBE531.jpg "title=" 3 (). jpg "alt=" wkiom1pak3iqoi0maac53jxnnbe531.jpg "/>

then edit the DHCP master profile, configure the file to assign address segment (subnet), subnet mask (netmask), assign address segment (range), default gateway ( option Routers), the IP address that points to the next server (next-server), and the configuration file (filename) to be extracted in the next server

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/68/wKiom1PaK5by_5CeAAA89pqX7B8041.jpg "title=" 4.jpg " alt= "Wkiom1pak5by_5ceaaa89pqx7b8041.jpg"/>

then start the DHCP service, and if there is an error during startup, you can use the method of viewing the log for troubleshooting (for example:tail-20/var/log/message Generally view the file's last You know where you're wrong.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/68/wKiom1PaK8PxwkTGAADtytuvonk680.jpg "title=" 5.jpg " alt= "Wkiom1pak8pxwktgaadtytuvonk680.jpg"/>

Use SS–UNL command to view the port number, The DHCP service has a port number of "$" tosee if the DHCP service is open and in a listening state

2 , configuring tftp Service

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/69/wKioL1PaLefxXp7tAAEqacU97gw254.jpg "title=" 7.jpg " alt= "Wkiol1palefxxp7taaeqacu97gw254.jpg"/>

installing the TFTP service side

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/68/wKiom1PaLOaA26xxAADnPg8ILD0976.jpg "title=" 8.jpg " alt= "Wkiom1paloaa26xxaadnpg8ild0976.jpg"/>

after installation, look at the Tftpboot folder, which is later used by the file transfer service.

3 , providing PEX The working Environment

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/69/wKioL1PaLj2i4X5QAAAqcCZtSBg864.jpg "title=" 9.jpg " alt= "Wkiol1palj2i4x5qaaaqccztsbg864.jpg"/>

To see if the Syslinux installation package is installed

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/69/wKioL1PaLmLhRg5JAAAb_XmNTQE348.jpg "title=" 10.jpg "alt=" Wkiol1palmlhrg5jaaab_xmntqe348.jpg "/>

use the rpm–ql syslinux command to view the installation and locate the pxeliux.0 file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/68/wKiom1PaLWSRXjPwAAA1CdqHhuM193.jpg "title=" 11.jpg "alt=" Wkiom1palwsrxjpwaaa1cdqhhum193.jpg "/>

then copy the command to copy the/usr/share/syslinux/pxrlinux.0 file into the Tftpboot

4. provide boot files such as kernel

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/68/wKiom1PaLhKTnfRtAABTRhEwXPo944.jpg "title=" 12.jpg "alt=" Wkiom1palhktnfrtaabtrhewxpo944.jpg "/>

Mount the system CD, extract the boot file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/68/wKiom1PaLbCRpX7aAABK1xNsfuw785.jpg "style=" float: none; "title=" 13.jpg "alt=" Wkiom1palbcrpx7aaabk1xnsfuw785.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/69/wKioL1PaLsrSXSagAABgMtKkW-8830.jpg "style=" float: none; "title=" 14.jpg "alt=" Wkiol1palsrsxsagaabgmtkkw-8830.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/68/wKiom1PaLbLjeEVwAABnhE070LI540.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiom1palbljeevwaabnhe070li540.jpg "/>


Copy the boot file from the system CD

re-use chmod–r 755/var/lib/tftpboot/ command to Tftpboot Directory Add Permissions


5. provide installation source

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/69/wKiom1PaPSHihEKdAABdlZP_yeg606.jpg "title=" 16.jpg "alt=" Wkiom1papshihekdaabdlzp_yeg606.jpg "/>

Install the HTTP service first, and then create the CENTOS6 directory under the var/www/html/directory as the installation source

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/68/wKiom1PaLbOxidZOAAB8u7pEdMc085.jpg "style=" float: none; "title=" 17.jpg "alt=" Wkiom1palboxidzoaab8u7pedmc085.jpg "/>

Open the HTTP service


6 , provide ks.cfg file

install Kickstart using yum install System-config-kickstart

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/69/wKioL1PaLs6QBJPzAAAozDktPM4599.jpg "style=" float: none; "title=" 18.jpg "alt=" Wkiol1pals6qbjpzaaaozdktpm4599.jpg "/>

Then use the command to open kickstart

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/6A/wKioL1PaP1KARJjLAAP8h4_Ftyw211.jpg "title=" 19.jpg "alt=" Wkiol1pap1karjjlaap8h4_ftyw211.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/69/wKiom1PaPlaQvCElAAL1pMFAsfY650.jpg "title=" 20.jpg "alt=" Wkiom1paplaqvcelaal1pmfasfy650.jpg "/>

Be sure to change Root password, otherwise you will not be able to enter the system

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/69/wKiom1PaPouzbf5xAAGRVkFnu54802.jpg "title=" 21.jpg "alt=" Wkiom1papouzbf5xaagrvkfnu54802.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/6A/wKioL1PaP9Sydn2qAAICGSp-tik410.jpg "title=" 22.jpg "alt=" Wkiol1pap9sydn2qaaicgsp-tik410.jpg "/>

Then generate the template file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/69/wKiom1PaPtXCgN1-AACJbwzDaQw659.jpg "title=" 23.jpg "alt=" Wkiom1paptxcgn1-aacjbwzdaqw659.jpg "/>

View the generated ks.cfg file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6A/wKioL1PaQBnwKLhCAAGM8ZyiT1g159.jpg "title=" 24.jpg "alt=" Wkiol1paqbnwklhcaagm8zyit1g159.jpg "/>

Edit Ks.cfg File

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/6A/wKioL1PaQKeQC_o1AADnrH7zY64297.jpg "title=" 25.jpg "alt=" Wkiol1paqkeqc_o1aadnrh7zy64297.jpg "/>

edit The ks.cfg file, change the next partition information and the installation source for automatic installation

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/69/wKiom1PaP8nCqgJPAAFOEzEEo7U526.jpg "title=" 26.jpg "alt=" Wkiom1pap8ncqgjpaafoezeeo7u526.jpg "/>

Then view the installation source information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/69/wKiom1PaP-jBnSzAAAISodC6xMY388.jpg "title=" 27.jpg "alt=" Wkiom1pap-jbnszaaaisodc6xmy388.jpg "/>

edit The/var/lib/tftbboot/default file, point to the KS file for automated installation

7. Verifying PXE Setup

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6A/wKiom1PaQAWSvRXcAAFS4cEu2Nw400.jpg "title=" 28.jpg "alt=" Wkiom1paqawsvrxcaafs4ceu2nw400.jpg "/>

Change the boot boot entry on the client to start with the network card as the first boot entry, and then you can implement the PXE automatic installation, which completes the experiment


This article is from the "Learn ing" blog, please be sure to keep this source http://nydia.blog.51cto.com/6404696/1533425

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.