Boot file configuration method, device, system, equipment and storage medium

CN116471178BActive Publication Date: 2026-10-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310410448.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-10-30
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明旨在提出一种引导文件配置方法、装置、系统、设备及存储介质,通过灵活配置与PXE客户端设备类型对应的PXE标识,实现不同类型的服务器按照适配的引导文件快速高效执行PXE引导功能,解决了引导程序与实际服务器系统安装需求不能准确匹配的技术问题

Benefits of technology

[0056]本发明实施例提供的一种引导文件配置方法,通过接收PXE客户端发送的动态主机配置协议DHCP报文,其中,DHCP报文包括与PXE客户端设备类型对应的PXE标识;根据DHCP报文的PXE标识,确定PXE标识对应的目标引导文件;发送PXE标识对应的目标引导文件至PXE客户端,以使PXE客户端根据目标引导文件执行PXE引导。本发明通过灵活配置与PXE客户端设备类型对应的PXE标识,使不同设备类型的服务器具有不同的PXE标识,避免了现有技术中只能区分服务器的架构类型,引导文件与实际需求不能准确匹配,解决了PXE引导文件与服务器设备类型无法准确匹配的问题,从而根据该PXE标识确定引导文件,实现不同类型的服务器按照适配的引导文件快速高效执行PXE引导功能,进一步提高了服务器的可用性、稳定性,同时,通过细致区分使得不同设备类型的服务器对应不同类型引导文件,也简化了服务器的管理和维护。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471178B_ABST
    Figure CN116471178B_ABST
Patent Text Reader

Abstract

The application provides a boot file configuration method and device, equipment and readable storage medium, and relates to the technical field.The method comprises the following steps: receiving a dynamic host configuration protocol (DHCP) message sent by a PXE client, wherein the DHCP message comprises a PXE identifier corresponding to the PXE client device type; determining a target boot file corresponding to the PXE identifier according to the PXE identifier of the DHCP message; and sending the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client performs PXE booting according to the target boot file.By configuring the PXE identifier corresponding to the PXE client device type in the DHCP message, different types of servers can be distinguished in detail, different boot files can be used for targeted implementation of accurate PXE booting, and the efficiency and convenience of server operation and maintenance work are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a boot file configuration method, apparatus, system, device, and storage medium. Background Technology

[0002] With the development of network technology, server security has received increasing attention. In particular, during server management, to ensure that the server's operating system is controllable, the server boots the operating system through the BIOS (Basic Input Output System) at startup. Specifically, the BIOS loads the PXE (Preboot Execution Environment) client into memory for execution and displays a command menu to search for a network bootloader. After the user selects the bootloader, the PXE client downloads the operating system located remotely to the local machine via the network. The bootloader reads the configuration file to obtain the relevant file information for system initialization.

[0003] Currently, in scenarios where PXE servers are used for multiple servers or server clusters, considering that different types of servers require different bootloaders, different bootloaders are generally configured in the configuration file and grouped together, with the server type used as a judgment condition for corresponding booting.

[0004] However, the existing bootloader grouping method can only distinguish whether the server architecture is ARM or x86, and cannot make more detailed distinctions for different types of servers under the same architecture. This makes it impossible for the bootloader to accurately match the actual server system installation requirements, thus affecting server stability. Summary of the Invention

[0005] In view of this, the present invention aims to propose a boot file configuration method, apparatus, system, device and storage medium, which enables different types of servers to quickly and efficiently execute PXE boot functions according to the adapted boot file by flexibly configuring the PXE identifier corresponding to the PXE client device type, thereby solving the technical problem that the boot program cannot accurately match the actual server system installation requirements.

[0006] According to a first aspect of the present invention, a boot file configuration method is provided, applied to a pre-boot execution environment PXE server, the method comprising:

[0007] Receive a Dynamic Host Configuration Protocol (DHCP) message sent by a PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type;

[0008] Based on the PXE identifier in the DHCP message, determine the target boot file corresponding to the PXE identifier;

[0009] The target boot file corresponding to the PXE identifier is sent to the PXE client so that the PXE client executes PXE boot according to the target boot file.

[0010] Optionally, before receiving the Dynamic Host Configuration Protocol (DHCP) message sent by the PXE client, the method further includes:

[0011] In response to the PXE server startup, the PXE client is controlled to modify the selection field in the DHCP message and configure a PXE identifier that corresponds one-to-one with the PXE client device type.

[0012] Optionally, determining the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message includes:

[0013] Read the DHCP message and parse the PXE identifier in the selection field of the DHCP message;

[0014] Check if a preset folder containing the PXE identifier exists. If so, determine the target boot file corresponding to the PXE identifier.

[0015] Optionally, before querying whether file information exists, including the preset folder identified by the PXE, the query further includes:

[0016] Multiple boot files are created in advance;

[0017] Based on the architecture type of the PXE client, the various boot files are grouped.

[0018] The grouped boot files are stored in a preset folder.

[0019] Optionally, the query to see if file information exists includes a preset folder with the PXE identifier; if so, determining the target boot file corresponding to the PXE identifier includes:

[0020] Retrieve a preset folder that matches the architecture type of the PXE client, wherein the selection field of the DHCP message includes the architecture type of the PXE client;

[0021] Check whether the PXE identifier field is included in the file information of the pre-stored folder;

[0022] If so, query the boot files in the pre-stored folder and determine the boot file corresponding to the PXE identifier as the target boot file.

[0023] Optionally, sending the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE booting according to the target boot file, includes:

[0024] Send a response message to the PXE client, wherein the response message includes the path address of the target boot file;

[0025] In response to the boot command from the PXE client, the target boot file is obtained according to the path address;

[0026] The target boot file is sent to the PXE client so that the PXE client executes PXE boot according to the target boot file.

[0027] According to a second aspect of the present invention, a boot file configuration apparatus is provided, applied to a pre-boot execution environment PXE server, the apparatus comprising:

[0028] The message receiving module is used to receive Dynamic Host Configuration Protocol (DHCP) messages sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type;

[0029] The file determination module is used to determine the target boot file corresponding to the PXE identifier based on the PXE identifier of the DHCP message;

[0030] The file sending module is used to send the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client can execute PXE boot according to the target boot file.

[0031] Optionally, the device further includes:

[0032] The configuration identifier module is used to respond to the startup of the PXE server, control the PXE client to modify the selection field in the DHCP message, and configure a PXE identifier that corresponds one-to-one with the PXE client device type.

[0033] Optionally, the file determination module includes:

[0034] The identifier parsing submodule is used to read the DHCP message and parse the PXE identifier in the selection field of the DHCP message;

[0035] The file determination submodule is used to query whether there is a preset folder whose file information includes the PXE identifier. If so, the target boot file corresponding to the PXE identifier is determined.

[0036] Optionally, the file determination module further includes:

[0037] Create submodules to pre-create various boot files;

[0038] The grouping submodule is used to group the various boot files according to the architecture type of the PXE client;

[0039] The storage submodule is used to store the grouped boot files in a preset folder.

[0040] Optionally, the file determination submodule includes:

[0041] A processing subunit is used to retrieve a preset folder that matches the architecture type of the PXE client, wherein the selection field of the DHCP message includes the architecture type of the PXE client;

[0042] The query subunit is used to query whether the file information in the pre-stored folder includes the PXE identifier field;

[0043] The determined subunit is used to query the boot files in the pre-stored folder if the condition is met, and determine the boot file corresponding to the PXE identifier as the target boot file.

[0044] Optionally, the file sending module includes:

[0045] The first sending submodule is used to send a response message to the PXE client, wherein the response message includes the path address of the target boot file;

[0046] The acquisition submodule is used to obtain the target boot file according to the path address in response to the boot command of the PXE client;

[0047] The second sending submodule is used to send the target boot file to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0048] According to a third aspect of the present invention, a boot file configuration system is provided, the system comprising a preboot execution environment (PXE) server and multiple preboot execution environment (PXE) clients, the system comprising:

[0049] The PXE server is configured to receive Dynamic Host Configuration Protocol (DHCP) messages sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client's device type; determine the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message; and send the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client executes PXE boot according to the target boot file.

[0050] The PXE client is configured to send the DHCP message to the PXE server, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type; receive the target boot file corresponding to the PXE identifier, and execute PXE boot according to the target boot file.

[0051] According to a fourth aspect of the present invention, an electronic device is provided, comprising:

[0052] processor;

[0053] Memory used to store the processor's executable instructions;

[0054] The processor is configured to execute the instructions to implement the boot file configuration method as described in the first aspect.

[0055] According to a fifth aspect of the present invention, a readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the boot file configuration method as described in the first aspect.

[0056] This invention provides a boot file configuration method. It involves receiving a Dynamic Host Configuration Protocol (DHCP) message from a PXE client, where the DHCP message includes a PXE identifier corresponding to the PXE client's device type. Based on the PXE identifier in the DHCP message, a target boot file corresponding to the PXE identifier is determined. The target boot file is then sent to the PXE client, enabling the PXE client to execute PXE booting according to the target boot file. This invention flexibly configures the PXE identifier corresponding to the PXE client's device type, allowing servers of different device types to have different PXE identifiers. This avoids the problem in existing technologies where only server architecture type can be distinguished, resulting in boot files that do not accurately match actual needs. It solves the problem of inaccurate matching between PXE boot files and server device types. By determining the boot file based on the PXE identifier, different types of servers can quickly and efficiently execute PXE booting functions according to the appropriate boot file, further improving server availability and stability. Furthermore, the detailed differentiation allows different types of servers to correspond to different types of boot files, simplifying server management and maintenance.

[0057] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0058] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0059] Figure 1 This is one of the flowcharts illustrating the steps of a boot file configuration method provided in an embodiment of the present invention;

[0060] Figure 2 This is the second step in the flowchart of a boot file configuration method provided in an embodiment of the present invention;

[0061] Figure 3 yes Figure 1 A flowchart of step 102 of a boot file configuration method according to an embodiment of the present invention is provided;

[0062] Figure 4 yes Figure 1 A flowchart of step 103 of a boot file configuration method according to an embodiment of the present invention is provided;

[0063] Figure 5 This is a schematic diagram illustrating an application scenario of a boot file configuration method provided in an embodiment of this application;

[0064] Figure 6 This is a schematic diagram of the structure of a boot file configuration device provided in an embodiment of the present invention;

[0065] Figure 7 This is a schematic diagram of the structure of a boot file configuration system provided in an embodiment of the present invention;

[0066] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.

[0068] Reference Figure 1This illustrates one of the steps of the boot file configuration method provided in an embodiment of the present invention, applied to... Figure 7 The method for configuring the boot file system on the PXE server side, as shown, may include:

[0069] Step 101: Receive a Dynamic Host Configuration Protocol (DHCP) message sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type.

[0070] It should be noted that, in order to enable those skilled in the art to more clearly understand the boot file configuration method disclosed in the above embodiments of the present invention, refer to... Figure 5 This illustration shows an application scenario of the boot file configuration method provided in this embodiment of the invention. The boot file configuration system includes a pre-boot execution environment (PXE) server and multiple pre-boot execution environment (PXE) clients, wherein the PXE server and the multiple PXE clients are communicatively connected. In this embodiment of the invention, when the PXE server is used in a scenario with multiple servers or server clusters, the PXE client to be installed with the operating system needs to perform the PXE boot function. To solve the problem that different types of servers require different boot files, the device identifier of the PXE client is modified and configured in the DHCP message, so that the PXE server matches the pre-grouped boot files according to the identifier in the message, thereby enabling PXE clients of different device types to obtain the accurate corresponding boot files.

[0071] Specifically, in this embodiment of the invention, the PXE server receives a Dynamic Host Configuration Protocol (DHCP) message sent by the PXE client. The DHCP message includes a PXE identifier corresponding to the PXE client's device type. The PXE client pre-modifies the fields in the DHCP message to configure different boot files and group them according to the DHCP configuration file dhcpd.conf(). The client then uses the server's different device types as a criterion for corresponding booting. dhcpd.conf is the DHCP server's configuration file, containing the DHCP server's configuration information and the IP address range, subnet mask, gateway, DNS, etc., allocated to the PXE client.

[0072] For example, enable the PXE client's BIOS, enter the BIOS settings interface, find the PXE option, modify the information in the option selection field of the DHCP packet during the PXE boot process, set the DHCP configuration file, configure different boot program groups for different option field contents, and add different types of servers to the corresponding boot file groups. In this embodiment of the invention, for example, the PXE server determines whether it is a PXE client to be booted based on the option field in the received DHCP packet, then determines whether the server architecture is ARM or x86 based on the arch field in the option field, and finally determines the server device type based on the PXE identifier field in the option field, configuring the corresponding boot file for different device types.

[0073] In this embodiment of the invention, the PXE server receives the PXE identification field of the DHCP message sent by PXE, so as to select the accurate boot file according to the device type of the client server.

[0074] Step 102: Determine the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message.

[0075] In this embodiment of the invention, the PXE server determines the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message. Specifically, the PXE server reads the DHCP message, parses out the selection field information of the DHCP message, and obtains the PXE identifier.

[0076] It should be noted that the PXE identifier is the device identifier of the PXE client to be booted. Specifically, it can be a custom identifier of the server device type. In other embodiments, the PXE server can be any identifier that can indicate the server device type of a specific PXE client, and no specific limitation is made here.

[0077] Specifically, the PXE server queries whether a preset folder containing the PXE identifier exists. If a file matching the PXE identifier field exists in the stored preset folder, the target boot file corresponding to the PXE identifier is determined, and the storage address of the file is used as the address of the target boot file. The target boot file is the boot program file required by the PXE client to perform PXE boot for installing the operating system.

[0078] Step 103: Send the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0079] In this embodiment of the invention, when the PXE server is used for multiple servers or server clusters, the target boot file corresponding to the PXE identifier is sent to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0080] Specifically, sending the target boot file corresponding to the PXE identifier to the PXE client may include the following steps:

[0081] First, a response message is sent to the PXE client, which includes the path address of the target boot file;

[0082] Secondly, in response to the boot command from the PXE client, the target boot file is obtained based on the path address;

[0083] Secondly, the target boot file is sent to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0084] It should be noted that a PXE client can send a request via DHCP to install an operating system using PXE boot. The PXE server responds to the request by sending a response message to the PXE client, establishing a connection, and obtaining an IP address and the path to the bootloader file through DHCP configuration. The PXE server then retrieves the boot file from the path to the bootloader file, enabling the PXE client to download the bootloader via the IP address and begin running it.

[0085] In this embodiment, considering that different types of servers require different bootloaders, different bootloaders are typically configured and grouped when configuring dhcpd.conf(), and the bootloader is selected based on the server device type. This invention determines the boot file based on the PXE identifier, enabling different types of servers to quickly and efficiently execute PXE boot functionality according to the appropriate boot file.

[0086] It should be noted that this embodiment does not specifically limit the process of the PXE client executing PXE boot according to the target boot file. For example, the PXE client finds the DHCP server, obtains the IP address and the location of the bootloader from / etc / dhcpd.conf, obtains the absolute path of the bootloader startup file through the configuration of dhcpd.conf (bootloader file name) and TFTP (including the bootloader and system initialization program), runs the bootloader, reads the startup configuration file, and obtains the relevant files for operating system initialization. Of course, the above is only a specific example and will not be elaborated on in detail here.

[0087] The boot file configuration method provided in this invention involves receiving a Dynamic Host Configuration Protocol (DHCP) message sent by a PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client's device type; determining the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message; and sending the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE booting according to the target boot file. This invention, by flexibly configuring the PXE identifier corresponding to the PXE client's device type, allows servers of different device types to have different PXE identifiers. This avoids the problem in existing technologies that can only distinguish server architecture types, resulting in boot files that cannot accurately match actual needs. It solves the problem of inaccurate matching between PXE boot files and server device types, thereby determining the boot file based on the PXE identifier. This enables different types of servers to quickly and efficiently execute PXE booting functions according to the adapted boot file, further improving server availability and stability. Simultaneously, the detailed differentiation allows different types of servers to correspond to different types of boot files, simplifying server management and maintenance.

[0088] The second embodiment of the present invention relates to a boot file configuration method, which is basically the same as the boot file configuration method provided in the first embodiment of the present invention, except that, referring to... Figure 2 The second flowchart of the boot file configuration method provided in this embodiment of the invention is shown, the method including:

[0089] Step 104: In response to the PXE server startup, control the PXE client to modify the select field in the DHCP message and configure the PXE identifier that corresponds one-to-one with the PXE client device type.

[0090] In this embodiment of the invention, when a PXE server is used for multiple servers or server clusters, in order to achieve a more detailed distinction between different types of servers booting different types of boot files, the information of the option field in the DHCP message during the PXE boot process is modified in the BIOS of the PXE client, and combined with the boot program grouping judgment conditions in the DHCP configuration file of the PXE server, so that servers of different device types have different PXE identifiers, thereby enabling different types of servers to quickly and efficiently execute the PXE boot function according to the adapted boot file.

[0091] Specifically, in response to the PXE server startup, the control system modifies the option field in the DHCP message for the PXE client, configuring a PXE identifier that corresponds one-to-one with the PXE client device type. For example, during the PXE server BIOS code development process, specific fields of the option field in the DHCP message during PXE boot can be customized to allow different device types of terminal servers to have different PXE identifiers. The PXE identifier can be any identifier field that can uniquely identify the PXE client; no specific limitations are imposed here.

[0092] It's important to note that DHCP messages contain several option fields, among which the vendor-class-identifier and arch fields are frequently used to determine device type and boot method. The vendor-class-identifier field identifies the server type; for example, "PXEClient" indicates a device that supports network booting. The arch field identifies the device's architecture type, such as ARM or x86. In this embodiment, the information in these option fields allows the DHCP message to parse the unique identifier of the PXE client to be booted. Based on the information in these option fields, the PXE server determines the client device's server type, architecture type, and specific device type within that architecture. Different EFI files are then used to boot different device types to ensure successful and stable booting.

[0093] Step 101: Receive a Dynamic Host Configuration Protocol (DHCP) message sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type.

[0094] Step 102: Determine the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message.

[0095] Step 103: Send the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0096] Steps 101 to 103 described above are the same as those previously mentioned and will not be repeated here.

[0097] It should be noted that this embodiment does not limit the specific execution location of step 104. In this embodiment, for ease of understanding, step 104 is executed before step 101 as an example.

[0098] In this embodiment of the invention, by controlling the PXE client to modify the selection field in the DHCP message, the PXE identifier corresponding to the PXE client device type is flexibly configured, so that servers of different device types have different PXE identifiers. This avoids the problem in the prior art that can only distinguish the server architecture type, and the boot file cannot accurately match the actual needs. It solves the problem that the PXE boot file cannot accurately match the server device type. Thus, the boot file is determined according to the PXE identifier, enabling different types of servers to quickly and efficiently execute the PXE boot function according to the adapted boot file, further improving the availability and stability of the server. At the same time, by distinguishing the different types of servers, different types of boot files are corresponding to different device types, which also simplifies the management and maintenance of the server.

[0099] Furthermore, refer to Figure 3 , showed Figure 1 The flowchart of step 102 of the provided boot file configuration method is basically the same as the boot file configuration method provided in the first embodiment of the present invention. Step 102 may include:

[0100] Step 1021: Read the DHCP message and parse the PXE identifier in the selection field of the DHCP message.

[0101] Step 1022: Check if there is a preset folder whose file information includes the PXE identifier. If so, determine the target boot file corresponding to the PXE identifier.

[0102] Specifically, step 1022 checks if a preset folder containing a PXE identifier exists. If so, it determines the target boot file corresponding to the PXE identifier, which may include the following steps:

[0103] First, capture the preset folder that matches the architecture type of the PXE client, where the selection field of the DHCP message includes the architecture type of the PXE client.

[0104] Secondly, check whether the file information in the pre-saved folder includes a PXE identifier field;

[0105] Secondly, if so, query the boot files in the pre-stored folder and identify the boot file corresponding to the PXE identifier as the target boot file.

[0106] It should be noted that the PXE server reads DHCP messages, parses the PXE identifier in the selection field of the DHCP message, and uses the PXE identifier to determine the server type, architecture type, and specific device type of the client device. It then checks if a preset folder containing the PXE identifier exists. If so, it determines the target boot file corresponding to the PXE identifier, thereby booting different EFI files for different device types to ensure boot success and stability.

[0107] Specifically, before step 1022, which checks whether file information includes the preset folder identified by the PXE identifier, the process also includes:

[0108] Multiple boot files are created in advance;

[0109] Based on the architecture type of the PXE client, various boot files are grouped together;

[0110] The grouped boot files are stored in a preset folder.

[0111] In this embodiment of the invention, before allocating boot files to PXE clients, the PXE server needs to pre-create various corresponding boot files based on information such as the architecture and device type of the PXE client. First, the various boot files are grouped according to the architecture type of the PXE client, which can be divided into two folders: ARM architecture and X86 architecture. The grouped boot files are then stored in a preset folder. The name or content of the boot files can include the specific device type of the PXE client, thereby enabling servers of different device types to automatically load and start the corresponding operating system and other necessary services according to their hardware configuration and functional requirements.

[0112] Furthermore, refer to Figure 4 , showed Figure 1 The flowchart of step 103 of the provided boot file configuration method is basically the same as the boot file configuration method provided in the first embodiment of the present invention. Step 103 may include:

[0113] Step 1031: Send a response message to the PXE client, wherein the response message includes the path address of the target boot file.

[0114] Step 1032: In response to the boot command from the PXE client, obtain the target boot file based on the path address.

[0115] Step 1033: Send the target boot file to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0116] It should be noted that in steps 1031 to 1033 above, the PXE server sends the target boot file to the PXE client so that the PXE client can execute PXE boot according to the target boot file. Specifically, the PXE client can send a request to install the operating system and execute PXE boot via DHCP. The PXE server responds to the request, sends a response message to the PXE client, establishes a connection, and obtains the IP address and the path address of the boot program file through DHCP configuration. The PXE server obtains the boot file from the path address of the boot program file so that the PXE client can download the boot program through the IP address and start running.

[0117] In this embodiment of the invention, by flexibly configuring the PXE identifier corresponding to the PXE client device type, servers of different device types can have different PXE identifiers. This avoids the problem in the prior art that can only distinguish the server architecture type, and the boot file cannot accurately match the actual requirements. It solves the problem that the PXE boot file cannot accurately match the server device type. Thus, the boot file is determined according to the PXE identifier, enabling different types of servers to quickly and efficiently execute the PXE boot function according to the adapted boot file. This further improves the availability and stability of the server. At the same time, by distinguishing the different types of servers, different types of boot files are corresponding to different device types, which also simplifies the management and maintenance of the server.

[0118] Reference Figure 6 This diagram illustrates a structural schematic of a boot file configuration device provided in an embodiment of the present invention, which is applied to... Figure 5 The pre-boot execution environment PXE server shown is as follows: Figure 6 As shown, the device may include:

[0119] The message receiving module 201 is used to receive Dynamic Host Configuration Protocol (DHCP) messages sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type;

[0120] The file determination module 202 is used to determine the target boot file corresponding to the PXE identifier based on the PXE identifier of the DHCP message;

[0121] The file sending module 203 is used to send the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client can execute PXE boot according to the target boot file.

[0122] Optionally, the device further includes:

[0123] The configuration identifier module is used to respond to the startup of the PXE server, control the PXE client to modify the selection field in the DHCP message, and configure a PXE identifier that corresponds one-to-one with the PXE client device type.

[0124] Optionally, the file determination module 202 includes:

[0125] The identifier parsing submodule is used to read the DHCP message and parse the PXE identifier in the selection field of the DHCP message;

[0126] The file determination submodule is used to query whether there is a preset folder whose file information includes the PXE identifier. If so, the target boot file corresponding to the PXE identifier is determined.

[0127] Optionally, the file determination module 202 further includes:

[0128] Create submodules to pre-create various boot files;

[0129] The grouping submodule is used to group the various boot files according to the architecture type of the PXE client;

[0130] The storage submodule is used to store the grouped boot files in a preset folder.

[0131] Optionally, the file determination submodule includes:

[0132] A processing subunit is used to retrieve a preset folder that matches the architecture type of the PXE client, wherein the selection field of the DHCP message includes the architecture type of the PXE client;

[0133] The query subunit is used to query whether the file information in the pre-stored folder includes the PXE identifier field;

[0134] The determined subunit is used to query the boot files in the pre-stored folder if the condition is met, and determine the boot file corresponding to the PXE identifier as the target boot file.

[0135] Optionally, the file sending module 203 includes:

[0136] The first sending submodule is used to send a response message to the PXE client, wherein the response message includes the path address of the target boot file;

[0137] The acquisition submodule is used to obtain the target boot file according to the path address in response to the boot command of the PXE client;

[0138] The second sending submodule is used to send the target boot file to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0139] This invention provides a boot file configuration device that receives Dynamic Host Configuration Protocol (DHCP) messages sent by a PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client's device type; determines the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message; and sends the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE booting according to the target boot file. This invention, by flexibly configuring the PXE identifier corresponding to the PXE client's device type, allows servers of different device types to have different PXE identifiers. This avoids the problem in existing technologies that can only distinguish server architecture types, resulting in boot files that cannot accurately match actual needs. It solves the problem of inaccurate matching between PXE boot files and server device types, thereby determining the boot file based on the PXE identifier. This enables different types of servers to quickly and efficiently execute PXE booting functions according to the adapted boot file, further improving server availability and stability. Simultaneously, the detailed differentiation allows different types of servers to correspond to different types of boot files, simplifying server management and maintenance.

[0140] Reference Figure 7 The diagram illustrates the structure of a boot file configuration system provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the system includes a pre-boot execution environment (PXE) server and multiple pre-boot execution environment (PXE) clients. The system includes:

[0141] The PXE server is configured to receive Dynamic Host Configuration Protocol (DHCP) messages sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client's device type; determine the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message; and send the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client executes PXE boot according to the target boot file.

[0142] The PXE client is configured to send the DHCP message to the PXE server, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type; receive the target boot file corresponding to the PXE identifier, and execute PXE boot according to the target boot file.

[0143] In the boot file configuration system provided by the present invention, any of the boot file configuration methods described in the above embodiments are executed, and the specific details will not be repeated here.

[0144] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.

[0145] Memory 303 is used to store computer programs;

[0146] When processor 301 executes a program stored in memory 303, it performs the following steps:

[0147] Receive Dynamic Host Configuration Protocol (DHCP) messages sent by PXE clients, wherein the DHCP messages include a PXE identifier corresponding to the PXE client device type;

[0148] Based on the PXE identifier in the DHCP message, determine the target boot file corresponding to the PXE identifier;

[0149] Send the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

[0150] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0151] The communication interface is used for communication between the aforementioned terminal and other devices.

[0152] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0153] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0154] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the boot file configuration methods described in the above embodiments.

[0155] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0156] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0157] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0158] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A boot file configuration method, characterized in that, The method, applied to a pre-boot execution environment PXE server, includes: Receive a Dynamic Host Configuration Protocol (DHCP) message sent by a PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type; the PXE identifier is the device identifier of the PXE client to be booted. Based on the PXE identifier in the DHCP message, determine the target boot file corresponding to the PXE identifier; Send the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE boot according to the target boot file; Before receiving the Dynamic Host Configuration Protocol (DHCP) message sent by the PXE client, the method further includes: In response to the PXE server startup, the PXE client is controlled to modify the selection field in the DHCP message and configure a PXE identifier that corresponds one-to-one with the PXE client device type. Sending the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE booting according to the target boot file, includes: Send a response message to the PXE client, wherein the response message includes the path address of the target boot file; In response to the boot command from the PXE client, the target boot file is obtained according to the path address; The target boot file is sent to the PXE client so that the PXE client executes PXE boot according to the target boot file.

2. The method according to claim 1, characterized in that, The step of determining the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message includes: Read the DHCP message and parse the PXE identifier in the selection field of the DHCP message; Check if a preset folder containing the PXE identifier exists. If so, determine the target boot file corresponding to the PXE identifier.

3. The method according to claim 2, characterized in that, Before querying whether file information exists, including the preset folder identified by the PXE, the query also includes: Multiple boot files are created in advance; Based on the architecture type of the PXE client, the various boot files are grouped. The grouped boot files are stored in a preset folder.

4. The method according to claim 2, characterized in that, The query to determine if file information exists includes a preset folder identified by the PXE identifier; if so, the target boot file corresponding to the PXE identifier is determined, including: Capture a preset folder that matches the architecture type of the PXE client, wherein the selection field of the DHCP message includes the architecture type of the PXE client; Check whether the file information of the preset folder includes the PXE identifier field; If so, query the boot files in the preset folder and determine the boot file corresponding to the PXE identifier as the target boot file.

5. A boot file configuration device, characterized in that, The device is applied to the PXE server side of a pre-boot execution environment and includes: The message receiving module is used to receive Dynamic Host Configuration Protocol (DHCP) messages sent by the PXE client, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type; the PXE identifier is the device identifier of the PXE client to be booted. The file determination module is used to determine the target boot file corresponding to the PXE identifier based on the PXE identifier of the DHCP message; The file sending module is used to send the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE boot according to the target boot file; The device further includes: The configuration identifier module is used to respond to the startup of the PXE server, control the PXE client to modify the selection field in the DHCP message, and configure a PXE identifier that corresponds one-to-one with the PXE client device type; The file sending module includes: The first sending submodule is used to send a response message to the PXE client, wherein the response message includes the path address of the target boot file; The acquisition submodule is used to obtain the target boot file according to the path address in response to the boot command of the PXE client; The second sending submodule is used to send the target boot file to the PXE client so that the PXE client can execute PXE boot according to the target boot file.

6. A boot file configuration system, characterized in that, The system includes a pre-boot execution environment (PXE) server and multiple pre-boot execution environment (PXE) clients. The system includes: The PXE server is configured to receive Dynamic Host Configuration Protocol (DHCP) messages sent by PXE clients, wherein the DHCP message includes a PXE identifier corresponding to the device type of the PXE client; the PXE identifier is the device identifier of the PXE client to be booted; determine the target boot file corresponding to the PXE identifier based on the PXE identifier in the DHCP message; send the target boot file corresponding to the PXE identifier to the PXE client, so that the PXE client executes PXE boot according to the target boot file; and, in response to the PXE server startup, control the PXE client's selection in the DHCP message. The field is modified to configure a PXE identifier that corresponds one-to-one with the PXE client device type; the step of sending the target boot file corresponding to the PXE identifier to the PXE client so that the PXE client executes PXE boot according to the target boot file includes: sending a response message to the PXE client, wherein the response message includes the path address of the target boot file; in response to the boot startup command of the PXE client, obtaining the target boot file according to the path address; and sending the target boot file to the PXE client so that the PXE client executes PXE boot according to the target boot file. The PXE client is configured to send the DHCP message to the PXE server, wherein the DHCP message includes a PXE identifier corresponding to the PXE client device type; receive the target boot file corresponding to the PXE identifier, and execute PXE boot according to the target boot file.

7. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the instructions to implement the boot file configuration method as described in any one of claims 1 to 4.

8. A readable storage medium, characterized in that, A computer program is stored on the readable storage medium, which, when executed by a processor, implements the boot file configuration method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • PXE-based information acquisition method, PXE (pre-boot execution environment) client, PXE server and system

    CN104158859A

  • Automatic deployment method and system supporting multiple domestic operating systems

    CN112230942A