Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to remotely deploy and install PXE for Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how Linux remote deployment installation PXE, has a certain reference value, interested friends can refer to, I hope you read this article after a lot of gains, the following let Xiaobian take you to understand.

PXE was originally developed as part of Intel's Wired Management System, and Intel and Systemsoft released its specifications (version 2.1) on September 20, 1999. This is achieved by using several network protocols such as Internet Protocol (IP), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP), Small File Transfer Protocol (TFTP) and the concepts of Globally Unique Identifier (GUID), Universal Network Driver Interface (UNDI), Universal Unique Identifier (UUID) and by extending a preset API to the firmware of the client (PC self-testing via PXE).

PXE client The term PXE client refers to the role of the machine during the PXE boot process. A PXE client can be a server, desktop, laptop, or other machine with PXE boot code installed.

This blog post focuses on PXE remote deployment installation of Linux.

Lab environment: VMware14 A Linux server, a client simulating bare hardware, and an installation image of centos 7.

To start the experiment, install four packages on the Linux server, dhcp tftp-server vsftpd and syslinux.

Then set the Linux server to host-only mode.

After setting up locally, the xshell software will drop, and then set the static IP address to 192.168.1.100 on the local side of Linux.

After the static IP address is set, restart the network service with systemctl restart network command, and then use xshell software to connect to the Linux server again. The IP entered here is of course 192.168.1.100.

After connecting to the Linux server, use the ifconfig command to check the IP address. Here, you can see that the address of the Linux server has been successfully set to 192.168.1.100.

Continue to configure dhcp service, because its configuration file is an empty file after installing dhcp service. Here, use cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf command to copy a template file to overwrite the original empty configuration file.

The specific dhcp configuration file is written as follows, the most important is the last two lines, one is to point the tftp server address to itself, and the second is to specify that the startup file loaded at startup is the pxelinux.0 file.

Next, make the settings for the tftp configuration file, the directory of the tftp configuration file, in the/etc/xinetd.d directory.

After opening the file, find which line of disable. This word means turn off. Change the option to no to turn on the tftp service.

Then use cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/to copy the load file to the tftp site.

The next step is to add the installation image file for the CD.

Next, create a mount directory for the image file in the ftp service site, and mount the CD image to this directory.

After mounting, find the two files initrd.img vmlinuz in the images/pxeboot directory of the image file and copy them to the tftp site.

Finally, in the tftp site to create a startup menu directory pxelinux.cfg, note that only this name.

Then create a startup configuration file default in the menu directory. The specific file is written as follows:

After all the configuration is completed, turn off the firewall function and enhance the security function of the system.

Then start each of the three services.

After the service boot is complete, simulate creating a bare metal with hardware and no system on the VMware virtual machine.

Note that the network card should select host-only mode, otherwise it will not get dhcp service.

Then the minimum memory of the new virtual machine must be 1.5G or more, otherwise an error will be reported during installation, resulting in failure to install.

Next, start the new virtual bare metal simulation. After obtaining the dhcp service, you will enter the following interface. You can enter directly.

Wait a little bit for the following to enter this centos7 installation interface.

Thank you for reading this article carefully. I hope that the article "How to remotely deploy and install PXE in Linux" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support it a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report