First, the introduction
In general, we use the floppy drive or optical drive to boot Linux, and then install Linux through the local optical drive. However, this installation method does not apply in the following situations:
- No floppy drive and optical drive: Many companies in order to save costs, computers generally do not have optical drive or floppy drive, so you can not install Linux through the local;
- Non-standard floppy and optical drives: Although the notebooks are configured with optical drives, they are not necessarily standard IDE devices, some are via USB interfaces, and some are through 1394 interfaces (such as Samsung's Q10). Linux cores that are booted during Linux installation are typically not driven by these interfaces, so it is not possible to install Linux locally;
- In addition, in some occasions, such as the computer room, there are a large number of computers need to install Linux at the same time, if the way through the optical drive installation, not only inefficient, but also not conducive to maintenance.
In the process of work, I have encountered the second situation. A Samsung Q10 notebook needs to install Redhat Linux 8.0, but after booting through the optical drive, Setup is unable to access the disc. To solve this problem, the author has found the way to install Linux on the Q10 after consulting the data and groping. In the following discussion, if you do not make a special statement, you will take Q10 as an example of how to install Linux remotely via PXE bootrom.
Second, the Basic principles
1 What is PXE
PXE (Pre-Boot Execution Environment) is a protocol designed by Intel to enable the computer to boot over the network. The protocol is divided into client and server ends, PXE client in the network card ROM, when the computer boot, the BIOS to the PXE client into memory execution, and display the Command menu, after the user selection, PXE The client will be placed on the remote operating system downloaded to the local run via the network.
The successful operation of the PXE protocol requires the following two issues to be resolved:
- Since it is transmitted over the network, then the computer at the start, its IP address by WHO to configure;
- What protocol to download the Linux kernel and root file system
For the first issue, you can resolve by using DHCP server, where DHCP server assigns an IP address to the PXE client, and DHCP server is the protocol used to dynamically assign IP addresses to DHCP client, but since this is a PXE Client assigns IP addresses, you need to increase the corresponding PXE-specific configuration when configuring DHCP server.
As for the second question, the TFTP client is already present in the ROM where the PXE client resides. The PXE client uses the TFTP client to download the required files to the TFTP server via the TFTP protocol.
Thus, the conditions for the PXE protocol to run are available, so let's look at how the PXE protocol works.
2) Working process
In the above illustration, the PXE client is a computer that needs to have Linux installed, and the TFTP server and DHCP server run on another Linux server. Bootstrap files, configuration files, Linux kernels, and Linux root file systems are placed on the Linux server's root directory on the TFTP server.
PXE client requires three binaries in the process: Bootstrap, Linux kernel, and Linux root file system. The bootstrap file is an executable program that provides users with a simple control interface and downloads the appropriate Linux kernel as well as the Linux root file system, depending on the user's choice.