Mirror image deployment guiding method and device, and storage medium
By automatically obtaining and matching the image loading path on the client device, the problem of low efficiency and poor accuracy caused by relying on manual disk copying for image deployment is solved, thus achieving efficient and accurate image deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INSPUR (SHANDONG) COMPUTER TECH CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the deployment of image-based devices such as servers and personal computers relies on manual disk copying, resulting in low deployment efficiency and poor accuracy.
The client device obtains the bootloader and boot configuration file based on the processor architecture information, uses hardware identification information to obtain commands to automatically match the image loading path, and obtains the image file from the server for automatic deployment.
It enables automatic hardware identification of client devices and automatic matching of image files, improving the efficiency and accuracy of image deployment.
Smart Images

Figure CN122431747A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of device image deployment technology, and in particular to an image deployment boot method, apparatus and storage medium. Background Technology
[0002] In related technologies, during the production process of equipment such as servers and personal computers, image deployment relies on manual disk copying, resulting in low deployment efficiency and poor deployment accuracy. Summary of the Invention
[0003] This invention provides a method, apparatus, and storage medium for image deployment guidance, which can automatically guide client devices to perform image deployment, thereby improving deployment efficiency and accuracy.
[0004] This invention provides a method for image deployment and bootstrapping, applied to a client device, comprising: Based on the processor architecture information of the local machine, the corresponding bootloader and boot configuration file are obtained from the server; the bootloader contains commands for obtaining hardware identification information, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The bootloader executes a hardware identification information acquisition command to determine the target hardware identification information of the local machine, and matches the target image loading path corresponding to the target hardware identification information in the boot configuration file; Based on the target image loading path, the bootloader obtains the corresponding image file from the server to execute system image deployment.
[0005] This invention also provides a method for image deployment and bootstrapping, applied to a server, comprising: Based on the processor architecture information of the client device, the corresponding bootloader and boot configuration file are sent to the client device. The bootloader contains a hardware identification information acquisition command, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server. Send the image file corresponding to the target image loading path to the client device.
[0006] The present invention also provides a mirror deployment boot device, applied to a client device, comprising: The boot file acquisition module is used to obtain the corresponding bootloader and boot configuration file from the server based on the processor architecture information of the local machine. The bootloader contains hardware identification information acquisition commands, and the boot configuration file contains the image loading paths corresponding to various hardware identification information. The image path matching module is used to execute the hardware identification information acquisition command through the bootloader, determine the target hardware identification information of the local machine, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file; The image file acquisition module is used to obtain the corresponding image file from the server through the bootloader based on the target image loading path, so as to use the image file to perform system image deployment.
[0007] The present invention also provides a mirror deployment boot device, applied to a server, comprising: The boot file sending module is used to send the corresponding boot program and boot configuration file to the client device according to the processor architecture information of the client device. The boot program contains a hardware identification information acquisition command, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server. The image file sending module is used to send the image file corresponding to the target image loading path to the client device.
[0008] The present invention also provides a mirror deployment boot system, comprising: The client device is used to execute the image deployment bootstrapping method described above for the client. The server is used to execute the image deployment bootstrapping method described above for the server side; The present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the above-described image deployment boot method applied to a client or the above-described image deployment boot method applied to a server.
[0009] The present invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, the above-described image deployment boot method applied to a client or the above-described image deployment boot method applied to a server is implemented.
[0010] This invention provides a method for image deployment bootstrapping, applied to a client device, comprising: obtaining a corresponding bootloader and boot configuration file from a server based on the processor architecture information of the local device; wherein the bootloader includes a hardware identification information acquisition command, and the boot configuration file includes image loading paths corresponding to various hardware identification information; executing the hardware identification information acquisition command through the bootloader to determine the target hardware identification information of the local device, and matching the target image loading path corresponding to the target hardware identification information in the boot configuration file; and obtaining a corresponding image file from the server through the bootloader based on the target image loading path, so as to perform system image deployment using the image file.
[0011] The beneficial effects of this invention are as follows: The client device in this invention can obtain a bootloader and boot configuration file suitable for its own processor architecture from the server based on its own processor architecture information. The bootloader contains hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information. Subsequently, the client device can determine its target hardware identification information by executing the hardware identification information acquisition commands through the bootloader, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file, thus determining the storage location of the image file corresponding to the local hardware. Then, the client device can obtain the corresponding image file from the server through the bootloader based on the target image loading path, and use the image file to perform system image deployment. In this way, this invention enables the client device to automatically identify its own hardware and automatically match and acquire image files, thereby improving the efficiency and accuracy of image deployment.
[0012] The present invention also provides a mirror deployment boot device and a non-volatile computer-readable storage medium, which have the above-mentioned beneficial effects. Attached Figure Description
[0013] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a structural block diagram of a mirror deployment boot system provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a method for image deployment and bootstrapping applied to a client device, provided in an embodiment of the present invention; Figure 3 A flowchart illustrating a method for image deployment and bootstrapping applied to a server, as provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of another image deployment boot system provided in an embodiment of the present invention; Figure 5 A flowchart illustrating the DHCP architecture identification and boot file distribution process provided in this embodiment of the invention; Figure 6 This is a flowchart illustrating the multi-model image adaptation process provided in an embodiment of the present invention. Figure 7 A flowchart illustrating the unattended installation process provided in this embodiment of the invention; Figure 8 A flowchart illustrating another image deployment boot method provided in an embodiment of the present invention; Figure 9 This invention provides a structural block diagram of a mirror deployment boot device applied to a client device. Figure 10 This is a structural block diagram of a server image deployment boot device provided in an embodiment of the present invention. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0016] It should be noted that, in the description of this invention, 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. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0017] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] In related technologies, image deployment during the production process of devices such as servers and personal computers typically relies on manual disk copying. However, there are many models of such devices, and different models have different image deployment requirements. This leads to problems such as high labor costs, low delivery efficiency, and high mismatch rates of device images.
[0019] In view of this, to address the technical problem of how to improve the efficiency and accuracy of client device image deployment, the present invention provides an image deployment guidance method that can automatically guide client devices to perform image deployment, thereby improving deployment efficiency and accuracy.
[0020] For ease of understanding, the image deployment boot system provided in this embodiment will be introduced first below. Please refer to... Figure 1 , Figure 1 This is a structural block diagram of an image deployment bootstrapping system provided in an embodiment of the present invention. The system may include a client device and a server. The client device is an electronic device whose image is to be deployed, such as a server or personal computer awaiting shipment. The server in the image deployment bootstrapping system is an electronic device that guides the client device to perform image deployment. It can internally deploy various functional services required for image deployment; specific functional services can be found in the following embodiments.
[0021] Client devices and servers can connect via a network, such as a wired or wireless network. Furthermore, the same server can simultaneously provide image deployment boot services to multiple client devices to meet the needs of large-scale device image deployment.
[0022] Based on the above system architecture description, the image deployment and bootstrapping method provided in this embodiment will be introduced below. First, the implementation of this method on the client device side will be described. Please refer to... Figure 2 , Figure 2 A flowchart illustrating a method for image deployment and booting on a client device, provided as an embodiment of the present invention. This method, applied to a client device, may include: S11. Based on the processor architecture information of the local machine, obtain the corresponding bootloader and boot configuration file from the server; wherein, the bootloader contains hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information.
[0023] The client device can automatically trigger PXE boot (Preboot execution Environment) and begin executing this step when it powers on.
[0024] In this step, the bootloader is a computer program that guides the client device to obtain and deploy the image file, and the boot configuration file contains the configuration parameters required by the bootloader. The bootloader and boot configuration file are provided by the server, and the client device needs to obtain these files from the server. It is understood that different processor architectures should use different bootloaders for image deployment. Therefore, in this embodiment, the client device can send a request to the server based on its own processor architecture information, so that the server can identify the client device's processor architecture, match it, and return the corresponding bootloader and boot configuration file.
[0025] To identify processor architecture information and distribute bootloaders and boot configuration files, the server can be configured with a DHCP (Dynamic Host Configuration Protocol) service and a first file system. The DHCP service provides network configuration services to client devices. In this embodiment, the DHCP service can also identify the processor architecture information of client devices to return the boot file path corresponding to that processor architecture. The first file system stores the bootloader and boot configuration files corresponding to various processor architectures. The boot file path is the storage address of the bootloader and boot configuration files in the first file system, and client devices can retrieve the corresponding files from the first file system based on this path. Considering the small size of the bootloader and boot configuration files, to simplify the data storage and retrieval process, the first file system can be a TFTP (Trivial File Transfer Protocol) system.
[0026] When a client device initiates the image deployment process, it can send a Host Configuration Request (DHCP request) containing processor architecture information. Upon receiving this request, the DHCP service can identify the processor architecture information in the request, match the boot file path corresponding to the processor architecture information, and send a Host Configuration Response (DHCP response) to the client device containing network configuration information, first file system communication information, and the boot file path. The client device can then use this network configuration information to configure the network, and upon completion of the configuration, obtain the bootloader and boot configuration file from the first file system based on the first file system communication information and the boot file path.
[0027] Based on this, according to the processor architecture information of the local machine, the corresponding bootloader and boot configuration file are obtained from the server, which may include: S111, Send a host configuration request containing processor architecture information.
[0028] It should be noted that this embodiment does not limit the way processor architecture information is set in the host configuration request, and can be set according to actual application requirements. For example, processor architecture information can be set in the optional field (Option) of the host configuration request, such as in the option arch code 93 parameter.
[0029] This embodiment does not limit the specific form of the processor architecture information. For example, for the ARM64 architecture, its arch parameter can be 00:0b; for the x86_64 UEFI architecture, its arch parameter can be 00:07.
[0030] S112. Receive the host configuration response sent by the server, and obtain network communication information, first file system communication information and boot file path from the host configuration response; wherein, the boot file path corresponds to the processor architecture information.
[0031] S113. Configure network communication information, and obtain the boot program and boot configuration file from the first file system in the server according to the first file system communication information and boot file path.
[0032] This embodiment does not limit the bootloader and boot configuration file corresponding to various processor architectures. For example, if the processor architecture is ARM64, the bootloader can be grubaa64.efi, and the boot configuration file can be grub.cfg; if the processor architecture is x86_64 UEFI architecture, the bootloader can be ipxe.efi.
[0033] Furthermore, to enable client devices to identify their own hardware type during the image deployment phase, this embodiment can add a hardware identification information acquisition command to the bootloader. By executing this command, the client device can obtain its own hardware identification information.
[0034] Furthermore, to facilitate client devices loading image files from the correct location, the boot configuration file can include image loading paths corresponding to various hardware identification information. This way, after obtaining its own hardware identification information, the client device can match the corresponding image loading path in the boot configuration file.
[0035] S12. The bootloader executes a hardware identification information acquisition command to determine the target hardware identification information of the local machine, and matches the target image loading path corresponding to the target hardware identification information in the boot configuration file.
[0036] In this step, the client device first executes a hardware identification information acquisition command through the bootloader to determine the target hardware identification information of the local machine. The hardware identification information acquisition command can be used to read the client device's SMBIOS (System Management BIOS, BIOS, Basic Input / Output System) to obtain the required hardware identification information. For example, the hardware identification information acquisition command can include a first acquisition command, a second acquisition command, and a third acquisition command, used to determine the machine model identification information (system_productname), motherboard identification information (board_productname), and processor information (cpumodel), respectively.
[0037] Based on this, the target hardware identification information of the local machine is determined by executing a hardware identification information acquisition command through the bootloader, including: S1211. Execute the first acquisition command through the boot program to determine the model identification information; S1212. The second acquisition command is executed through the boot program to determine the motherboard identification information; S1213. The third acquisition command is executed through the boot program to determine the processor information; S1214. Use the model identification information, motherboard identification information, and processor information as the target hardware identification information.
[0038] Furthermore, this embodiment can utilize the aforementioned device identification information, motherboard identification information, and processor information to match the corresponding target image loading path in the boot configuration file. However, during the matching process, the following situations may occur: 1. The target hardware identification information of the client device is complete. In this case, this embodiment can match the corresponding target image loading path in the boot configuration file based on the combination formed by the target hardware identification information. For example, a unique combination formed by the model identification information, motherboard identification information, and processor information can uniquely match the corresponding target image loading path.
[0039] 2. The target hardware identification information of the client device is incomplete, but an image loading path compatible with the current target hardware identification information still exists. In this case, the compatible image loading path can be used as the target image loading path.
[0040] 3. The target hardware identification information of the client device is incomplete, and there is no image loading path compatible with the current target hardware identification information. In this case, the preset general image loading path will be used as the target image loading path.
[0041] Thus, regardless of whether the hardware identification information is complete, this embodiment can match a suitable image loading path for the client device, thereby improving the accuracy and reliability of image file matching.
[0042] Based on this, matching the target image load path corresponding to the target hardware identification information in the boot configuration file can include: S1221. Determine whether the information category of the target hardware identification information is complete; S1222. If the target hardware identification information is complete, the combination formed based on the target hardware identification information will match the corresponding target image loading path in the boot configuration file. S1223. If the target hardware identification information is incomplete, determine whether the boot configuration file has a compatible image loading path corresponding to the target hardware identification information. S1224. If present, the compatible image loading path shall be used as the target image loading path. S1225. If not, the preset general image loading path will be used as the target image loading path.
[0043] S13. Based on the target image loading path, obtain the corresponding image file from the server through the bootloader, and use the image file to execute system image deployment.
[0044] In this step, the client device can obtain the corresponding image file from the server through the bootloader based on the target image loading path, and then use the correct image file to perform system image deployment.
[0045] Specifically, a second file system can be set up on the server to store various image files. Since image files are large in size and need to be obtained in a secure and stable environment, the second file system can be an HTTP system (Hypertext Transfer Protocol).
[0046] Based on this, obtaining the corresponding image file from the server through the bootloader can include: S131. Obtain the image file from the second file system in the server through the bootloader.
[0047] Furthermore, after obtaining the image file, the client device can execute: 1. The bootloader loads the kernel (vmlinuz) and initialization image (initrd.img) from the boot entry, and hands over system control to the kernel.
[0048] 2. The kernel uses the fetch parameter to pull the ISO image from the HTTP server and mounts it as the root file system (root= / dev / ram0).
[0049] 3. The kernel executes the livecd-installer command to start the unattended installation process: automatically partitioning the hard drive, installing the system, configuring the network, and testing the environment.
[0050] 4. After the system installation is complete, the Diag testing system will start automatically to begin hardware function and stability testing; test logs will be automatically uploaded to the server for technical personnel to view later.
[0051] Based on this, system image deployment is performed using image files, including: S141. Mount the image file to the system root directory using the bootloader and execute the system image deployment.
[0052] S142. When the system image deployment is completed, perform functional and stability tests on the local hardware and upload the test logs to the server.
[0053] Based on the above embodiments, the client device in this invention can obtain a bootloader and boot configuration file suitable for its own processor architecture from the server according to its own processor architecture information. The bootloader includes hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information. Subsequently, the client device can use the bootloader to execute the hardware identification information acquisition commands to determine the target hardware identification information of its own machine, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file, thus determining the storage location of the image file corresponding to the machine's hardware. Then, the client device can obtain the corresponding image file from the server through the bootloader according to the target image loading path, and use the image file to perform system image deployment. In this way, this invention enables the client device to automatically identify its own hardware and automatically match and acquire image files, thereby improving the efficiency and accuracy of image deployment.
[0054] The following describes the implementation of this method on the server side. Please refer to... Figure 3 , Figure 3 A flowchart illustrating a method for image deployment and bootstrapping applied to a server, as provided in an embodiment of the present invention. This method, applied to a server, may include: S21. Based on the processor architecture information of the client device, send the corresponding bootloader and boot configuration file to the client device; wherein, the bootloader contains a hardware identification information acquisition command, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server.
[0055] In this embodiment, to identify the processor architecture information of the client device and distribute the bootloader and boot configuration file to the client device, a DHCP service and a first file system can be configured in the server. The DHCP service can provide network configuration services to the client device. Simultaneously, the DHCP service in this embodiment can also be used to identify the processor architecture information of the client device to return the boot file path corresponding to the processor architecture information to the client device. The first file system is used to store the bootloader and boot configuration file corresponding to various processor architectures. The boot file path is the storage address of the bootloader and boot configuration file in the first file system, and the client device can obtain the corresponding file from the first file system according to the above boot file path. Considering the small size of the bootloader and boot configuration file, to simplify the data storage and retrieval process, the first file system can be a TFTP system (Trivial File Transfer Protocol).
[0056] Furthermore, given the diverse processor architectures of client devices, to effectively address different processor architectures, the server can contain, on the one hand, the initial mapping between processor architecture information and the bootloader and boot configuration file; and on the other hand, it can also contain the default bootloader and boot configuration file corresponding to unknown processor architecture information. This effectively meets the image booting requirements of different processor architectures.
[0057] Based on this, and according to the processor architecture information of the client device, the corresponding bootloader and boot configuration file are sent to the client device, including: S211. Upon receiving a host configuration request from a client device, extract the processor architecture information from the host configuration request.
[0058] S212. If the processor architecture information corresponds to the first processor architecture, then obtain the boot file path corresponding to the first processor architecture.
[0059] In this step, the first processor architecture can be ARM64, and the corresponding bootloader and boot configuration file can be grubaa64.efi and grub.cfg.
[0060] S213. If the processor architecture information corresponds to the second processor architecture, then obtain the boot file path corresponding to the second processor architecture.
[0061] In this step, the second processor architecture can be x86_64 UEFI, and the corresponding bootloader can be ipxe.efi.
[0062] S214. If the processor architecture information does not correspond to the first processor architecture or the second processor architecture, then obtain the default boot file path.
[0063] In this step, if the processor architecture is not ARM64 or x86_64 UEFI, the default bootloader file can be pxelinux.0.
[0064] S215. Allocate network communication information to the client device, obtain the first file system communication information of the local first file system, and send a host configuration response containing network communication information, first file system communication information and boot file path to the client device.
[0065] In this step, the host configuration response may include the client IP address, subnet mask, gateway, TFTP server IP, and boot file path.
[0066] S216. Upon receiving a boot file retrieval request from a client device for a boot file path, the boot program and boot configuration file corresponding to the boot file path in the first file system are sent to the client device.
[0067] In this step, the client device can configure the network based on network communication information, and then send a boot file retrieval request to the server based on the first file system communication information and the boot file path. At this time, the server can send the boot program and boot configuration file corresponding to the boot file path in the first file system to the client device.
[0068] S22. Send the image file corresponding to the target image loading path to the client device.
[0069] A second file system can also be set up on the server to store various image files. Since image files are large in size and need to be obtained in a secure and stable environment, the second file system can be an HTTP system (Hypertext Transfer Protocol).
[0070] Based on this, the image file corresponding to the target image loading path is sent to the client device, including: S221. Send the image file corresponding to the target image loading path in the second file system of the local machine to the client device.
[0071] Furthermore, the server may also contain a second mapping relationship between hardware identification information and image loading paths. The aforementioned first and second mapping relationships can be stored in a database within the server. Moreover, since the server can maintain these mapping relationships, users only need to modify the aforementioned mapping relationships and, simultaneously, modify the boot configuration file when adding or changing boot programs, boot configuration files, or image files for specific machine models. This allows for flexible adjustments to boot programs, boot configuration files, or image files corresponding to different machine models.
[0072] Based on this, the method also includes: S231, Receive mapping relationship modification information; S232. Modify the first mapping relationship according to the mapping relationship modification information, or modify the second mapping relationship according to the mapping relationship modification information, and modify the boot configuration file according to the modified second mapping relationship.
[0073] Based on the above embodiments, the client device in this invention can obtain a bootloader and boot configuration file suitable for its own processor architecture from the server according to its own processor architecture information. The bootloader includes hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information. Subsequently, the client device can use the bootloader to execute the hardware identification information acquisition commands to determine the target hardware identification information of its own machine, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file, thus determining the storage location of the image file corresponding to the machine's hardware. Then, the client device can obtain the corresponding image file from the server through the bootloader according to the target image loading path, and use the image file to perform system image deployment. In this way, this invention enables the client device to automatically identify its own hardware and automatically match and acquire image files, thereby improving the efficiency and accuracy of image deployment.
[0074] The following is a complete introduction to the above image deployment guidance method based on specific diagrams.
[0075] 1. Overall Architecture Design: Please refer to Figure 4 , Figure 4This is a schematic diagram of another image deployment boot system provided in an embodiment of the present invention. The hardware architecture of the present invention consists of four parts: a DHCP server, a TFTP server, an HTTP server, and an ARM64 client. The software architecture consists of a DHCP configuration module, a GRUB boot configuration module, an SMBIOS recognition module, and an image storage module.
[0076] The core logic of the architecture is as follows: After the ARM64 client boots up, it requests an IP address from the DHCP server via PXE mode; the DHCP server identifies the client's ARM64 architecture and returns the TFTP server address and the path to the dedicated boot file; the client downloads grubaa64.efi and grub.cfg from the TFTP server, captures hardware information through SMBIOS, and matches the corresponding image; finally, it pulls the ISO image from the HTTP server to complete the unattended installation.
[0077] 2. Hardware architecture deployment: Deploying the hardware architecture is the foundation for implementing the solution. It requires completing the server's network configuration, file storage, and permission settings. The specific steps are as follows: 1) DHCP server deployment: Install DHCP server software (such as dhcpd) and configure the / etc / dhcp / dhcpd.conf file. Its core function is to identify the client architecture and distribute boot parameters.
[0078] Key configuration parameters: The client architecture is identified by option arch code 93, with the value corresponding to ARM64 architecture being 00:0b; the TFTP server IP is specified by next-server; and the path to the ARM64-specific boot file uos-arm / grubaa64.efi is specified by filename.
[0079] Network requirements: The DHCP server and the ARM64 client must be on the same local area network, and the firewall must be turned off or UDP ports 67 / 68 must be allowed.
[0080] 2) TFTP server deployment: Install TFTP server software (such as tftpd-hpa) and set the TFTP root directory to / var / lib / tftpboot.
[0081] Create a subdirectory named uos-arm in the root directory to store the ARM64-specific boot files: grubaa64.efi (bootloader) and grub.cfg (boot configuration file).
[0082] Permission settings: Set the boot file permissions to 644 to ensure that the client can read it; the TFTP service port is UDP69, which needs to be allowed in the firewall.
[0083] 3) HTTP server deployment: Install HTTP server software (such as nginx) and set the root directory to / var / www / html / OS.
[0084] Upload the ARM64 system ISO image of each model to this directory. The naming convention for the image is Diag-[model]-[version]-arm64.iso (e.g., Diag-CEXXF2-uos1070-20250810-arm64.iso).
[0085] Configure the HTTP service to start automatically on boot to ensure stable service operation when unattended at night.
[0086] 3. Implementation of core software architecture modules: The software architecture is the core of this invention, comprising four main modules: DHCP architecture identification module, SMBIOS model identification module, GRUB boot matching module, and unattended installation module. These modules work together to achieve full-process automation.
[0087] Module 1: DHCP Architecture Identification and Boot File Distribution Module Please refer to Figure 5 , Figure 5 This is a flowchart illustrating the DHCP architecture identification and boot file distribution process provided in this embodiment of the invention. The core of this module is to accurately distribute the corresponding boot file based on the client's architecture type, solving the problem of difficult architecture adaptation in traditional solutions. Its implementation logic is as follows: 1) The DHCP server listens for DHCP Discover messages on the local area network and receives PXE boot requests from clients.
[0088] 2) Parse the option arch code 93 parameter in the message to identify the client's CPU architecture: If arch=00:0b, it is determined to be an ARM64 architecture, and the boot file path uos-arm / grubaa64.efi is distributed; If arch=00:07, it is determined to be an x86_64 UEFI architecture, and the boot file path ipxe.efi is distributed; Other architectures distribute the default boot file pxelinux.0.
[0089] 3) The DHCP server returns a DHCP Offer message, which includes the client's IP address, subnet mask, gateway, TFTP server IP, and boot file path.
[0090] 4) After receiving the Offer message, the client sends a DHCP Request message to confirm the configuration and complete the IP address binding.
[0091] Module 2: SMBIOS Model Identification Module The core of this module is to capture client hardware information to provide a basis for device model matching, and it is implemented based on the SMBIOS standard interface. Its implementation logic is as follows: 1) The client downloads and executes grubaa64.efi from the TFTP server, loading the grub.cfg configuration file.
[0092] 2) Read SMBIOS information using GRUB built-in commands and store it as a variable: smbios --type 1 --get-string 5 --set system_productname # Retrieves the device model name (e.g., CEXXF2) smbios --type 2 --get-string 5 --set board_productname # Retrieves the motherboard name (e.g., SP1PANGUXM) smbios --type 4 --get-string 7 --set cpumodel # Retrieve CPU model 3) Pass the captured system_productname and board_productname variables to the GRUB boot matching module as the basis for model identification.
[0093] Module 3: GRUB Bootstrap Matching Module Please refer to Figure 6 , Figure 6 This is a flowchart illustrating the multi-model image adaptation process provided in this embodiment of the invention. This module is the core of the unattended operation, automatically matching the boot entry for the corresponding model based on the SMBIOS variable, without requiring manual selection. Its implementation logic is as follows: 1) The grub.cfg configuration file uses if-elif statements to set the default boot entry number based on the values of system_productname and board_productname: if [x$system_productname = xCExxF -ox$system_productname = xCEXXF];then default=1 # Matches the lead item with sequence number 1 elif [ x$system_productname = xCExxF2 -ox$system_productname =xCEXXF2 ];then default=2 # Matches the leading item at sequence number 2 elif [ x$board_productname = xSP1PANGUXM ];then default=6 # Matches the lead item with sequence number 6. else default=5 # Use the default boot option when no matching device model is available fi 2) The boot entries in grub.cfg are arranged by number, in the format [number] boot entry name, and each boot entry corresponds to a system image for a specific machine model: menuentry "[2][Diag-CExxF2-xxF2-uos1070-20250810-arm_${system_productname}" { set gfxpayload=keep linux Diag-CExxF2-xxF2-uos1070-20250810-arm64 / vmlinuz root= / dev / ram0console=tty boot=live fetch=http: / / 10.0.0.20 / OS / [image name].iso ip=dhcp initrd Diag-CExxF2-xxF2-uos1070-20250810-arm64 / initrd.img } 3) GRUB automatically loads the corresponding bootstrap item based on the default value without manual intervention; the fetch parameter in the bootstrap item specifies the image path of the HTTP server, enabling automatic retrieval of the system image.
[0094] Module 4: Unattended Installation Module Please refer to Figure 7 , Figure 7 This is a flowchart illustrating the unattended installation process provided in this embodiment of the invention. The core of this module is to automatically download, install, and test-start the system image, completing the entire unattended process. Its implementation logic is as follows: 1) GRUB loads the kernel (vmlinuz) and initialization image (initrd.img) from the bootloader, handing over system control to the kernel.
[0095] 2) The kernel fetches the ISO image from the HTTP server using the fetch parameter and mounts it as the root file system (root= / dev / ram0).
[0096] 3) The kernel executes the livecd-installer command to start the unattended installation process: automatically partitioning the hard drive, installing the system, configuring the network, and testing the environment.
[0097] 4) After the system installation is complete, the Diag testing system will start automatically to begin hardware function and stability testing; test logs will be automatically uploaded to the server for technical personnel to view later.
[0098] 5. Database Support Design
[0099] To achieve unified management of device models and images, this invention introduces a database to store the following key information: 1) Model-Image Mapping Table: Stores the correspondence between system_productname, board_productname and ISO image path, which facilitates the maintenance of grub.cfg configuration.
[0100] 2) DHCP Architecture Configuration Table: Stores the boot file paths corresponding to different architectures, facilitating parameter updates for the DHCP server.
[0101] 3) Client Status Table: Stores the client's SN, PN, boot status, and test results, facilitating subsequent troubleshooting and statistical analysis.
[0102] The introduction of the database improves the scalability of the solution. When adding a new model, only the database and grub.cfg need to be updated, without modifying the core configuration of the DHCP server.
[0103] Finally, please refer to Figure 8 , Figure 8 The flowchart of another image deployment boot method provided in the embodiment of the present invention fully illustrates the entire process of this method.
[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0105] Please refer to Figure 9 , Figure 9 This invention provides a structural block diagram of an image deployment boot device applied to a client device. The device, applied to a client device, may include: The boot file acquisition module 901 is used to obtain the corresponding boot program and boot configuration file from the server based on the processor architecture information of the local machine; wherein, the boot program contains hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The image path matching module 902 is used to execute a hardware identification information acquisition command through the boot program, determine the target hardware identification information of the local machine, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file; The image file acquisition module 903 is used to obtain the corresponding image file from the server through the bootloader based on the target image loading path, so as to use the image file to perform system image deployment.
[0106] Optionally, the mirror path matching module 902 may include: The first judgment submodule is used to determine whether the information category of the target hardware identification information is complete. The first matching submodule is used to match the corresponding target image loading path in the boot configuration file based on the combination formed by the target hardware identification information if the information category of the target hardware identification information is complete. The second judgment submodule is used to determine whether the boot configuration file has a compatible image loading path corresponding to the target hardware identification information if the information category of the target hardware identification information is incomplete. The second matching submodule is used to use the compatible image loading path as the target image loading path if it exists. The third matching submodule is used to use the preset general image loading path as the target image loading path if it is not available.
[0107] Optionally, the mirror path matching module 902 may include: The first command execution submodule is used to execute the first acquisition command through the bootloader to determine the model identification information; The second command execution submodule is used to execute the second acquisition command through the bootloader to determine the motherboard identification information; The third command execution submodule is used to execute the third acquisition command through the bootloader to determine processor information; The settings submodule is used to use the model identification information, motherboard identification information, and processor information as target hardware identification information.
[0108] Optionally, the boot file acquisition module 901 includes: The request sending submodule is used to send host configuration requests containing processor architecture information; The configuration submodule is used to receive the host configuration response sent by the server and obtain network communication information, first file system communication information and boot file path from the host configuration response; wherein, the boot file path corresponds to the processor architecture information; The boot file request module is used to configure network communication information and obtain the boot program and boot configuration file from the first file system in the server according to the first file system communication information and boot file path.
[0109] Optionally, the image file acquisition module 903 can be used for: The bootloader obtains the image file from the second file system on the server.
[0110] Optionally, it also includes: The deployment module is used to mount the image file to the system root directory via the bootloader and perform system image deployment; The testing module is used to perform functional and stability tests on the local hardware when the system image deployment is completed, and to upload the test logs to the server.
[0111] Please refer to Figure 10 , Figure 10 This invention provides a structural block diagram of an image deployment boot device for a server, which may include: The boot file sending module 1001 is used to send a corresponding boot program and boot configuration file to the client device according to the processor architecture information of the client device. The boot program contains a hardware identification information acquisition command, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server. The image file sending module 1002 is used to send the image file corresponding to the target image loading path to the client device.
[0112] Optionally, the boot file sending module 1001 includes: The architecture identification submodule is used to extract processor architecture information from the host configuration request sent by the client device. The first acquisition submodule is used to acquire the boot file path corresponding to the first processor architecture if the processor architecture information corresponds to the first processor architecture. The second acquisition submodule is used to acquire the boot file path corresponding to the second processor architecture if the processor architecture information corresponds to the second processor architecture. The third acquisition submodule is used to obtain the default boot file path if the processor architecture information does not correspond to the first processor architecture or the second processor architecture. The response submodule is used to allocate network communication information to the client device, obtain the first file system communication information of the local first file system, and send a host configuration response containing network communication information, first file system communication information and boot file path to the client device; The boot file sending submodule is used to send the boot program and boot configuration file corresponding to the boot file path in the first file system to the client device when a boot file retrieval request for the boot file path is received from the client device.
[0113] Optionally, the image file sending module 1002 can be used for: Send the image file corresponding to the target image loading path in the second file system of the local machine to the client device.
[0114] Optionally, the server includes a first mapping between processor architecture information and bootloader and boot configuration file, and a second mapping between hardware identification information and image loading path.
[0115] Optionally, the device may further include: The mapping relationship modification module is used to: receive mapping relationship modification information; modify the first mapping relationship according to the mapping relationship modification information, or modify the second mapping relationship according to the mapping relationship modification information, and modify the boot configuration file according to the modified second mapping relationship.
[0116] For a description of the features in the embodiment corresponding to the image deployment boot device, please refer to the relevant description of the embodiment corresponding to the image deployment boot method, which will not be repeated here.
[0117] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described image deployment boot method embodiments at runtime.
[0118] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0119] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described image deployment boot method embodiments.
[0120] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described image deployment boot method embodiments.
[0121] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0122] The foregoing has provided a detailed description of the image deployment boot method, apparatus, system, program product, and storage medium provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of this invention.
Claims
1. A method for image deployment bootstrapping, characterized in that, Applied to client devices, including: Based on the processor architecture information of the local machine, the corresponding bootloader and boot configuration file are obtained from the server; wherein, the bootloader contains hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information; The bootloader executes a hardware identification information acquisition command to determine the target hardware identification information of the local machine, and matches the target image loading path corresponding to the target hardware identification information in the boot configuration file; Based on the target image loading path, the bootloader obtains the corresponding image file from the server to perform system image deployment using the image file.
2. The image deployment boot method according to claim 1, characterized in that, The target image loading path that matches the target hardware identification information in the boot configuration file includes: Determine whether the information category of the target hardware identification information is complete; If the target hardware identification information is complete, the combination formed based on the target hardware identification information will match the corresponding target image loading path in the boot configuration file; If the target hardware identification information is incomplete, then determine whether the boot configuration file has a compatible image loading path corresponding to the target hardware identification information; If so, the compatible image loading path shall be used as the target image loading path; If not, the preset general image loading path will be used as the target image loading path.
3. The image deployment boot method according to claim 1, characterized in that, Based on the processor architecture information of this machine, obtain the corresponding bootloader and boot configuration file from the server, including: Send a host configuration request containing the processor architecture information; The system receives a host configuration response from the server and obtains network communication information, first file system communication information, and boot file path from the host configuration response; wherein the boot file path corresponds to the processor architecture information. Configure the network communication information, and obtain the boot program and boot configuration file from the first file system in the server according to the first file system communication information and the boot file path.
4. The image deployment boot method according to claim 3, characterized in that, The bootloader obtains the corresponding image file from the server, including: The image file is obtained from the second file system in the server through the bootloader.
5. A method for image deployment bootstrapping, characterized in that, Applied to servers, including: Based on the processor architecture information of the client device, a corresponding bootloader and boot configuration file are sent to the client device; wherein, the bootloader contains a hardware identification information acquisition command, and the boot configuration file contains image loading paths corresponding to various hardware identification information; the client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server; Send the image file corresponding to the target image loading path to the client device.
6. The image deployment boot method according to claim 5, characterized in that, The step of sending the corresponding bootloader and boot configuration file to the client device based on the client device's processor architecture information includes: Upon receiving a host configuration request sent by the client device, the processor architecture information in the host configuration request is extracted; If the processor architecture information corresponds to the first processor architecture, then obtain the boot file path corresponding to the first processor architecture; If the processor architecture information corresponds to the second processor architecture, then obtain the boot file path corresponding to the second processor architecture; If none of the processor architecture information corresponds to the first processor architecture and the second processor architecture, then the default boot file path is obtained; Assign network communication information to the client device, obtain the first file system communication information of the local first file system, and send a host configuration response to the client device containing the network communication information, the first file system communication information, and the boot file path; Upon receiving a boot file retrieval request from the client device for the boot file path, the boot program and boot configuration file corresponding to the boot file path in the first file system are sent to the client device.
7. The image deployment boot method according to claim 6, characterized in that, Sending the image file corresponding to the target image loading path to the client device includes: Send the image file corresponding to the target image loading path in the second file system of the local machine to the client device.
8. A mirror deployment guidance device, characterized in that, Applied to client devices, including: The boot file acquisition module is used to obtain the corresponding boot program and boot configuration file from the server based on the processor architecture information of the local machine; wherein, the boot program contains hardware identification information acquisition commands, and the boot configuration file contains image loading paths corresponding to various hardware identification information. The image path matching module is used to execute a hardware identification information acquisition command through the boot program, determine the target hardware identification information of the local machine, and match the target image loading path corresponding to the target hardware identification information in the boot configuration file; The image file acquisition module is used to obtain the corresponding image file from the server through the bootloader according to the target image loading path, so as to use the image file to perform system image deployment.
9. A mirror deployment guidance device, characterized in that, Applied to servers, including: The boot file sending module is used to send a corresponding boot program and boot configuration file to the client device according to the processor architecture information of the client device; wherein, the boot program includes a hardware identification information acquisition command, and the boot configuration file includes image loading paths corresponding to various hardware identification information; the client device uses the hardware identification information acquisition command to determine the target hardware identification information, uses the boot configuration file to determine the target image loading path corresponding to the target hardware identification information, and obtains the image file corresponding to the target image loading path from the server; The image file sending module is used to send the image file corresponding to the target image loading path to the client device.
10. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the image deployment boot method as described in any one of claims 1 to 4 or the image deployment boot method as described in any one of claims 5 to 7.