I. Introduction
Generally, we use a soft drive or an optical drive to guide Linux and then install Linux through a local optical drive. However, this installation method is not applicable in the following situations:
No drive and drive: many companies generally do not have a drive or drive on their computers to save costs, so they cannot install Linux locally;
Non-standard ephemeral drive and optical drive: although the optical drive is configured in the notebook, it is not always a standard IDE device, some are through the USB interface, and some are through the 1394 Interface (such as Samsung Q10 ). Linux kernels boot during Linux installation generally do not have drivers with these interfaces, so Linux cannot be installed locally;
In addition, in some cases, for example, a large number of computers in the data room need to install Linux at the same time. If you install Linux one by one through the optical drive, it is not only inefficient, but also not conducive to maintenance.
I encountered the second situation during my work. Redhat Linux 8.0 needs to be installed in a Samsung Q10 notebook. However, after the boot via the optical drive, the installer cannot access the CD. To solve this problem, I found out how to install Linux on Q10 after reading the materials and exploring. In the following discussion, if we do not make a special statement, we will take Q10 as an example to introduce how to remotely install Linux Through PXE Bootrom.
Ii. Basic Principles
1) What is PXE?
PXE (Pre-boot Execution Environment) is a protocol designed by Intel that enables computers to start over the network. The Protocol is divided into two ends: client and server. The PXE client is in the ROM of the NIC. When the computer boots, the BIOS transfers the PXE client to the memory for execution and displays the command menu. After the user selects the client, the PXE client downloads the operating system on the remote end to the local computer for running.
To successfully run the PXE protocol, you must solve the following two problems:
Since it is transmitted through the network, who will configure the IP address of the computer when it is started;
What protocol does it use to download the Linux kernel and the root file system?
The first problem can be solved through the DHCP Server. The DHCP server assigns an IP address to the PXE client. The DHCP Server is a protocol used to dynamically allocate IP addresses to the DHCP Client, however, because the IP address is assigned to the PXE Client, you need to add a specific PXE configuration When configuring the DHCP Server.
As for the second problem, TFTP client already exists in the ROM where the PXE Client is located. PXE Client uses the TFTP Client to download the required files to the TFTP Server through the TFTP protocol.
In this way, the conditions for running the PXE protocol are met. Let's take a look at the working process of the PXE protocol.