Network installation, configuration, and debugging in linux

Source: Internet
Author: User
Article title: network installation, configuration, and debugging in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

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.

2. 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.

2) work process

In, PXE client is a computer that requires Linux installation. TFTP Server and DHCP Server run on another Linux Server. The Bootstrap file, configuration file, Linux kernel, and Linux root file system are all stored in the root directory of the TFTP Server on Linux Server.

The PXE client requires three binary files: bootstrap, Linux kernel, and Linux root file system. The Bootstrap file is an executable program that provides you with a simple control interface and downloads the appropriate Linux kernel and Linux root file system based on your selections.

3. steps

With the previous background knowledge, you can perform the following operations:

1) configure the DHCP Server

Select ISC dhcp-3.0, DHCP Server configuration file is/etc/dhcpd. conf, the configuration file content is as follows:

Option space PXE;

Option PXE. mtftp-ip code 1 = ip-address;

Option PXE. mtftp-cport code 2 = unsigned integer 16;

Option PXE. mtftp-sport code 3 = unsigned integer 16;

Option PXE. mtftp-tmout code 4 = unsigned integer 8;

Option PXE. mtftp-delay code 5 = unsigned integer 8;

Option PXE. discovery-control code 6 = unsigned integer 8;

Option PXE. discovery-mcast-addr code 7 = ip-address;

Class \ "pxeclients \"

Related Article

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.