Linux PXE installation principles and concerns

Source: Internet
Author: User

Because there are students interviewed by the card, consultation! I would like to have some detailed explanations for practical use.

First step: PXE client sends request to DHCP

First, the BIOS setting of the client that supports PXE network interface card (NIC) becomes the network boot, and the PXE bootrom (self-booting chip) sends a broadcast request to the DHCP server in the network for information such as IP address.

Step Two: DHCP server provides information

The DHCP server receives a request from the client, verifies that it is coming to a legitimate PXE client request, verifies that it will give the client a "provide" response, which includes the IP address assigned to the client, the Pxelinux Boot program (TFTP) location, And where the configuration file is located.

Step three: PXE client requests download boot file

After the client receives a "response" from the server, it responds with a frame to request the file to be sent for launch. These boot files include: pxelinux.0, Pxelinux.cfg/default, Vmlinuz, initrd.img, and so on.

Fourth step: Boot server responds to client requests and transmits files

After the server receives the client's request, there will be more information between the client and the server to determine the startup parameters. Bootrom The files (pxelinux.0, pxelinux.cfg/default) that are necessary to launch the Setup program from the boot server by the TFTP communication protocol. When the default file download is complete, the boot kernel of the Linux installer is started based on the boot order defined in the file.

  The recent need to test the server PXE installation, and the server needs an additional RAID card driver, so for this extra drive for a long time, but also learned a lot of things at the level of the principle. To make sure it's not so easy to forget, record here:

pxe Installation principle:

1, by selecting the network card boot in the BIOS, obtain the IP address and the TFTP address (written in dhcpd.conf Next-server), and then load the/tftpboot directory on the TFTP server pxelinux.0 and pxelinux.cfg/ Default two files that ask for the startup item to start (typically boot: end, and then you can enter the startup item by keyboard.) The optional start-up is indicated in Pxelinux.cfg/default and the excerpt is as follows:

Label Linux
Kernel Vmlinuz
Append initrd=initrd.img text ks=file:/kickstart.cfg
If you enter the Linux startup key name, you will use the kernel file Vmlinuz as the kernel, and then load the initrd.img file (a file to load the driver, specifically for what you can refer to here:http://blog.csdn.net/chrisniu1984/article/details/3907874and get kickstart.cfg This file (the file holds all the parameters required for installation, such as partition format, packages that need to be installed, etc.), which are generally modified according to the same name file on the Linux installation CD.

2, After the boot: Enter the startup item, the machine according to the default configuration parameters to obtain the kernel file and the INITRD parameters mentioned in the driver file (all kinds of drivers can be, I just put the raid card driver here: initrd=initrd.img,cciss.img). Note that the IMG files here need to be compressed by cpio and gzip, as follows:

mount -O loop cciss-2.6.18-164.el5.img./tmp
CD./tmp
Find. | cpio-c-O | gzip-9 > /cciss.img

cause roughly because the 2.6 kernel At first, initrd.img are both compressed so that all IMG files here will be treated equally. (Why Initrd.img is a double compression and specifically how to use, see: http://blog.csdn.net/chrisniu1984/article/details/3907909 ).

3. After getting these files, you start loading the initrd.img and loading each device driver (you can think of initrd.img as a common device driver) and then go to setup, which installs automatically according to the KICKSTART.CFG in the default parameter (if one or some of the parameters are missing Or is commented, will stay in the step, after manual selection to continue to automatically after the installation of parameters).

This article is from the "lake and Laughter" blog, please make sure to keep this source http://xuexuhui.blog.51cto.com/9647696/1665290

Linux PXE installation principles and concerns

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.