Server system starting method and device, equipment and medium
Through dynamic matching and verification of multi-dimensional hardware feature information, network management problems caused by hardware heterogeneity during server system startup are solved, and efficient and secure server system startup is achieved, suitable for large data centers and cloud computing environments.
Patent Information
- Application Number
- CN202510718258.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The prior art has problems such as difficult network management, high configuration and maintenance costs, insufficient flexibility, poor scalability and poor security during the startup process of server systems, especially in large data center clusters, which are prone to network paralysis due to manual configuration errors.
Obtain server hardware feature information through multi-dimensionality, set priority matching system image files, dynamically judge and verify comprehensive feature values, realize accurate guidance and matching, reduce manual intervention, and use dynamic strategy engine to automatically select the optimal startup item, support priority configuration and policy nesting, and improve system startup flexibility and security.
It realizes accurate boot matching based on multi-dimensional hardware features, reduces the server system startup error rate to 0, reduces manual configuration time by 90%, adapts to new hardware, avoids network paralysis, improves the pre-start booting efficiency of large cluster servers, supports heterogeneous device scenarios, and is suitable for super-large-scale clusters.
Smart Images

Figure CN120255915A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of computer system startup, and particularly to a server system startup method, device, equipment and medium. Background Art
[0002] Currently, by configuring multiple servers, each server only boots the system according to one hardware characteristic, and the physical network is divided into several subnets, so as to achieve the need for customizing different boots. This boot method has a high cost and greatly increases the network management difficulty. When the network cable is plugged in wrongly, it may cause network interference, and then cause the business network to collapse.
[0003] For the production line test of the server assembly factory, currently most only boot the system according to one hardware characteristic dimension, and to boot a specific operating system, after the server is powered on and enters the default operating system, the MAC (Media Access Control address) address of the current network card is queried in the form of a shell script, and then a customized boot system image file is generated according to the MAC address and uploaded to the server, and then the server machine is restarted. After the next startup, it will enter the customized operating system; this method requires entering other systems in advance to operate. However, for the hardware of a new architecture and new platform, using the default specified boot system will cause incompatibility, resulting in automatic boot failure.
[0004] At the same time, when deploying large data center cluster servers, if relying on the network card MAC address information provided by the server manufacturer and then generating a single boot configuration file one by one according to the network card MAC address information, the flexibility is reduced, and the configuration and maintenance cost is relatively high. Summary of the Invention
[0005] The present application provides a method, apparatus, device and medium for starting a server system. The method includes creating a system image file set on a server to be installed with a system according to the service type; obtaining hardware feature information of the server to be installed with a system in multiple dimensions; setting the priority of the system image file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; matching the system image file corresponding to the hardware feature information of each dimension according to the priority of the system image file corresponding to the hardware feature information of each dimension; sequentially determining whether the system image file corresponding to the hardware feature information of each dimension exists in the system image file set, and obtaining the sub-feature value of the hardware feature information of each dimension according to the determination result; determining a comprehensive feature value according to the sub-feature value of the hardware feature of each dimension and the corresponding sub-feature weight; verifying the comprehensive feature value to determine the target system image file for starting the server to be installed with a system; and starting the server to be installed with a system through the target system image file. The technology of the present application can achieve precise guidance and matching of the server system based on multi-dimensional hardware features, reduce manual intervention, and improve the efficiency of starting the server system.
[0006] The present application provides a method for starting a server system, the method including: Creating a system image file set on a server to be installed with a system according to the service type; Obtaining hardware feature information of the server to be installed with a system in multiple dimensions; Setting the priority of the system image file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Matching the system image file corresponding to the hardware feature information of each dimension according to the priority of the system image file corresponding to the hardware feature information of each dimension; Sequentially determining whether the system image file corresponding to the hardware feature information of each dimension exists in the system image file set, and obtaining the sub-feature value of the hardware feature information of each dimension according to the determination result; Determining a comprehensive feature value according to the sub-feature value of the hardware feature of each dimension and the corresponding sub-feature weight; Verifying the comprehensive feature value to determine the target system image file for starting the server to be installed with a system; Starting the server to be installed with a system through the target system image file.
[0007] The present application further provides a device for starting a server system, including: A creating module, configured to create a system image file set on a server to be installed with a system according to the service type; An obtaining module, configured to obtain hardware feature information of the server to be installed with a system in multiple dimensions; A setting module, configured to set the priorities of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; A matching module, configured to match the corresponding system image files for the hardware feature information of each dimension according to the priorities of the system image files corresponding to the hardware feature information of each dimension; A judgment module, configured to sequentially judge whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; A determination module, configured to determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; A verification module, configured to verify the comprehensive feature value and determine the target system image file for starting the system server to be installed; A start module, configured to start the system server to be installed through the target system image file.
[0008] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of the server system startup method when executing the computer program, and the method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priorities of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the corresponding system image files for the hardware feature information of each dimension according to the priorities of the system image files corresponding to the hardware feature information of each dimension; Sequentially judge whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive feature value and determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
[0009] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the server system startup method are implemented, and the method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the corresponding system image files for the hardware feature information of each dimension according to the priority of the system image files corresponding to the hardware feature information of each dimension; Successively determine whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
[0010] This application also provides a computer program product, including a computer program, which when executed by a processor implements the steps of the server system startup method. The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the corresponding system image files for the hardware feature information of each dimension according to the priority of the system image files corresponding to the hardware feature information of each dimension; Successively determine whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
[0011] With this application, since the method includes creating a system image file set on the server of the system to be installed according to the service type; obtaining the hardware feature information of the server of the system to be installed in multiple dimensions; setting the priority of the system image file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; matching the system image file corresponding to the hardware feature information of each dimension according to the priority of the system image file corresponding to the hardware feature information of each dimension; successively judging whether the system image file corresponding to the hardware feature information of each dimension exists in the system image file set, and obtaining the sub-feature values of the hardware feature information of each dimension according to the judgment result; determining the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; verifying the comprehensive feature value to determine the target system image file for starting the server of the system to be installed; and starting the server of the system to be installed with the target system image file. Therefore, the technology of this application can achieve precise boot matching of the server system based on multi-dimensional hardware features, reduce manual intervention, and improve the efficiency of starting the server system.
[0012] The technical solution of this application supports the matching of image files with more than 7 dimensions of hardware features, can cover more than 95% of heterogeneous device scenarios, and reduces the server system startup error rate to 0; the technology of this application realizes "zero-touch deployment", reduces the manual configuration time by 90%, and is especially suitable for ultra-large-scale cluster servers (such as thousands of nodes); it can quickly adapt to new hardware (such as RISC-V), and at this time, it is necessary to update the policy file library without modifying the boot program; when the server is expanded, there is no need to manually configure the network again, avoiding the paralysis of the entire network caused by manual configuration errors; and for illegal server startups, the boot is paused and a warning is given for manual processing. The technical solution of this application improves the efficiency of pre-boot guidance of large cluster servers, automatically uploads comprehensive feature information to the server for engineers to monitor in the background. Brief Description of the Drawings
[0013] In order to more clearly illustrate the embodiments of this application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0014] Figure 1 It is the first flowchart of the server system startup method provided by the embodiment of this application; Figure 2 It is the overall flowchart of the server system startup method provided by the embodiment of this application; Figure 3 It is the second flowchart of the server system startup method provided by the embodiment of this application; Figure 4Flowchart of the dynamic policy matching system image file provided by the embodiments of the present application; Figure 5 Specific flowchart of the server system startup method provided by the embodiments of the present application; Figure 6 Structural diagram of the server system startup device provided by the embodiments of the present application; Figure 7 Exemplary system that can be used to implement the various embodiments described in the present application. Detailed implementation manners
[0015] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0016] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0017] In order to enable those skilled in the art of the present technology to better understand the solutions of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0018] In combination with the specific application environment architecture or specific hardware architecture on which the execution of the server system startup method depends, the specific application environment architecture or specific hardware architecture will be described herein.
[0019] During the production line test in the server assembly factory, only one hardware feature can be default specified to boot a specific operating system OS, and customization cannot be achieved; with the various ARM architectures and processors from different manufacturers, and each having its own operating system orientation, it is necessary to intelligently identify and boot the system based on multiple hardware features, and a single static boot configuration can no longer meet the requirements.
[0020] PXE (Preboot eXecution Environment) is a pre-boot technology that loads the operating system image from a remote server via the network and is widely used in data centers, cloud computing platforms, and industrial automation scenarios. Traditional boot loaders (such as GRUB and UEFI) usually rely on static configuration files (such as grub.cfg) to manage boot entries and require manual configuration of information such as the operating system path and kernel parameters. However, there are significant defects in the following scenarios: Hardware heterogeneity: When the device hardware (such as CPU architecture, network card model, package) changes, the boot entry needs to be reconfigured; Device uniqueness management: Automatically match the corresponding operating system or configuration according to the device unique identifier (SN, MAC address).
[0021] The relevant technical solutions mainly rely on the following methods: Single hardware identifier matching: For example, only associate the boot image file through the MAC address or motherboard UUID; Static configuration table management: Pre-define the mapping relationship between hardware characteristics and system image files in the DHCP server or TFTP server directory; Limited hardware support: Only support common hardware (such as X86 architecture processors) and lack the dynamic adaptation ability for heterogeneous hardware.
[0022] The current common pre-boot configuration method cannot perform system legality verification. When there are file tampering or invalid configurations, the system can still be booted, which may lead to an illegal system and cause network anomalies in the entire cluster.
[0023] It can be understood that traditional pre-boot solutions rely on single MAC address or IP address matching and cannot meet the multi-dimensional hardware feature requirements. Single hardware identifier matching, for example, only associates the boot image through the MAC address or motherboard UUID.
[0024] Lack of flexibility: A single feature (such as the MAC address) cannot handle complex scenarios. For example, the boot system 1 has been configured according to the MAC address, but due to test verification and repair scenarios, the network card is disassembled and installed on other servers. At this time, manual configuration modification of the boot file is required again. Another example is that for the same architecture but different CPU manufacturers or model differences (ARMv8 vs ARMv9), different kernel programs need to be selected.
[0025] High configuration maintenance cost: Related technologies require manual maintenance of a huge mapping table of hardware features - mirror files, which is prone to errors due to hardware updates or configuration changes; for example: when adding a new motherboard model or replacing parts during machine repair, it is necessary to manually update the DHCP server configuration, which is inefficient and prone to omissions. If there are human errors, it may cause the entire network to collapse; when there are new server machines, frequent maintenance is required, consuming a lot of manpower and energy.
[0026] Poor scalability: It cannot automatically adapt to new types of hardware (such as RISC-V architecture devices) or hybrid architecture clusters (such as the coexistence scenario of X86 and ARM).
[0027] Poor security: When the boot file is tampered with, it may cause batch system boot errors in the entire large cluster of servers, resulting in economic losses.
[0028] Difficult to control the overall deployment progress: In a large cluster of servers, the progress of PXE pre-boot has no clear status for control. Only by manually inserting a monitor for each machine or using BMC KVM to view the installation progress one by one is it easy to cause omissions. For example, in a server group of 1,000 units, if there are five or six abnormal ones, it may be necessary to manually search for abnormal machines one by one.
[0029] Embodiments of the present application provide a server system startup method, as Figure 1 、 Figure 2 shown, the method includes: Create a system mirror file set on the server to be installed with the system according to the business type; Obtain the hardware feature information of the server to be installed with the system from multiple dimensions; Set the priority of the system mirror file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the system mirror file corresponding to the hardware feature information of each dimension according to the priority of the system mirror file corresponding to the hardware feature information of each dimension; Judge in turn whether the system mirror file corresponding to the hardware feature information of each dimension exists in the system mirror file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system mirror file for starting the server to be installed with the system; Start the server to be installed with the system through the target system mirror file.
[0030] It is understandable that this application relates to a PXE (Preboot Execution Environment) network booting technology based on the Unified Extensible Firmware Interface (UEFI), and particularly relates to a method for dynamically and intelligently matching PXE boot items by deeply integrating the grubaa64.efi boot program and combining multi-dimensional hardware features (including network card MAC address, motherboard part number, motherboard PN, motherboard bundle number, CPU model, CPU manufacturer, and architecture type, etc.), reducing manual intervention. The multi-dimensional hardware feature acquisition engine hwscan is used to intelligently collect hardware feature information in multiple dimensions, and the comprehensive feature value is calculated by weighted calculation of the sub-feature values of the hardware feature information dimensions to ensure the security of server booting; in this application, by uploading the calculated comprehensive feature value to the server, engineers only need to monitor in the background, achieving zero-touch deployment.
[0031] During the booting phase, device hardware information (such as MAC address, SN, PN, CPU, architecture, etc.) is dynamically collected, and the corresponding operating system or configuration is automatically matched according to the preset matching strategy to generate a dynamic startup menu, reducing manual intervention. This application designs a dynamic matching strategy engine that automatically selects the optimal server startup item based on hardware features, supports priority configuration and policy nested configuration. It supports GRUBShell script interactive debugging and policy management, improving the flexibility, maintainability, compatibility, and scalability of system startup.
[0032] This application designs a comprehensive feature value obtained by weighted calculation of the sub-feature values based on each hardware feature information, and ensures the security of server booting by verifying the comprehensive feature value. For abnormal booting, engineers can be timely warned to intervene and analyze and solve the problem manually.
[0033] When deploying large cluster servers, engineers can effectively monitor the correctness and legality of pre-boot booting, avoiding the traditional method of unplugging and plugging the monitor to check whether the server boots normally.
[0034] An embodiment of this application provides a server system startup method, as Figure 3 shown, the method includes: Multi-dimensional hardware feature recognition: Support the combined matching of server network card MAC address, motherboard part number (Part Number), motherboard PN (Product Number), motherboard bundle number (Bundle Number), CPU model, CPU manufacturer, and architecture; Dynamic policy engine: Automatically select the optimal server startup item program based on hardware features, support priority configuration and policy nesting; Zero-touch deployment: Reduce manual intervention and improve the system deployment efficiency of heterogeneous server clusters.
[0035] Step S01, create a system image file set on the system server to be installed according to the service type; Step S011, configure the system image files involved in all service types in the configuration file of the system server to be installed to obtain a system image file boot list; Set the system image file boot list as the system image file set; Among them, the system image file set includes system image files corresponding to and matching the hardware feature information in each dimension.
[0036] Here, if the operating system OS boot list involved in all service types is configured in the grub.cfg file of the DHCP server, then the system image files involved in all service types are configured in the grub.cfg file; establish a system image file boot list for dynamic call later.
[0037] Among them, the service types include storage, computing, database, etc.
[0038] Step S02, obtain the hardware feature information of the system server to be installed from multiple dimensions.
[0039] Specifically, through the multi-dimensional hardware feature collection engine hwscan, the functions of this engine are: integrated in grubaa64.efi, dynamically collect device hardware feature information during the GRUB boot stage, and obtain hardware feature information through EFI runtime services, SMBIOS, and ACPI tables; in the UEFI pre-boot stage, obtain hardware feature information by calling commands through the grubshell script and assign it to a feature variable: A. Network card MAC address: directly read from the network card firmware: net_ls_addr; B. Host serial number SN: obtain the host serial number (Serial Number) through the SMBIOS table: smbios--type1--get-string7--setSerialNumber; B. Motherboard part number: obtain the motherboard part number Board Product Number through the SMBIOS table: smbios--type2--get-string6--setBoardProductName; D. Motherboard package number BN: obtain the motherboard package number Bundle Number through the SMBIOS table: smbios--type2--get-string5--setBundleNumber; E, Model Product Name PN: Obtain the model product name through the SMBIOS table Product Name: smbios--type1--get-string5--setProductName; F, CPU Manufacturer: Obtain the CPU manufacturer information through the SMBIOS table CPU Manufacturer: smbios--type4--get-string7--setCPUManufacturer; G, Architecture Type: Obtain the architecture Aarch through the CPUID instruction Echo$grub_cpu; Step S03, Set the priority of the system image file corresponding to each dimension of the hardware feature information according to the accuracy of the hardware feature information.
[0040] Step S031, The priorities of the hardware feature information corresponding to the system image file for each dimension of the hardware feature information are, in order, the server network card MAC address, the server host serial number, the server motherboard part number, the server motherboard package number, the server model product name, the server CPU manufacturer, and the server system architecture type.
[0041] Specifically, define a dynamic policy matching engine. The policy engine selects the corresponding image file according to the priority matching rule; if—elif—else—fi, use conditional branches to match according to the priority, and set the default boot item on the optimal boot item.
[0042] The priority for matching the image file based on the hardware feature information dimension is network card MAC address -> host serial number SN -> motherboard part number PN -> motherboard package number BN -> model product name PN -> CPU manufacturer -> architecture type, a total of 7 dimensions; generate sub-item feature values through the hardware feature information of each dimension for subsequent verification.
[0043] Step S04, Match the corresponding system image file for each dimension of the hardware feature information according to the priority of the system image file corresponding to each dimension of the hardware feature information.
[0044] Step S041, As Figure 4 shown, create the file directory for each dimension of the hardware feature information; According to the priority of the hardware feature information, namely, the server network card MAC address, the server host serial number, the server motherboard material number, the server motherboard package number, the server model product name, the server processor manufacturer, and the server system architecture type, it is determined in sequence whether a configuration file named by the hardware feature information of the current dimension can be matched in the file directory of the hardware feature information of the current dimension; If so, determine that the startup parameter value of the configuration file named by the hardware feature information of the current dimension is the system image file name corresponding to the hardware feature information of the current dimension; if not, determine whether the configuration file named by the hardware feature information can be matched in the file directory of the hardware feature information of the next dimension.
[0045] Specifically, 7 hardware feature information directories are created, corresponding to the above 7 dimensions respectively. You only need to configure a cfg file according to the corresponding feature information in the corresponding hardware feature information directory. For example, according to the model PN, the model PN is NF5280M5, and the configured cfg file is NF5280M5.cfg. The content of this file only needs to state "default=system image name". The system image name is the corresponding system image name in the boot list of the grub.cfg file. The complicated configuration content is simplified to the parameter assignment "default=system image name", which reduces the possibility of static single boot system image file being tampered with.
[0046] Automatically match the operating system or configuration corresponding to the hardware features according to the preset matching priority strategy to generate a dynamic startup menu.
[0047] Generates the GRUB (boot loader) boot menu based on the matching image file results, supports nested submenus, dynamically generates the configuration file grub.cfg and loads the image, without manual intervention; displays the boot menu, and selects the default item that matches the hardware feature configuration file by default.
[0048] According to the priority strategy, the corresponding system image file is matched according to the corresponding hardware feature information.
[0049] Step S05 , determining in turn whether the system image file corresponding to the hardware feature information of each dimension exists in the system image file set.
[0050] Step S06, obtaining the itemized feature values of the hardware feature information of each dimension according to the judgment result; Step S061, when the system image file corresponding to the hardware feature information does not exist in the system image file set, the sub-item feature value of the hardware feature information is set to a first preset value; When the corresponding system image file matched according to the hardware feature information exists in the system image file set, the sub-feature value of the hardware feature information is set to the second preset value; When the corresponding system image file matched according to the hardware feature information does not match the content of the system image file corresponding to the hardware feature information in the system image file set, the sub-feature value of the hardware feature information is set to the third preset value.
[0051] Specifically, verify the legality of the comprehensive feature value to prevent the system image file from being tampered with.
[0052] According to the priority: network card MAC -> host serial number SN -> motherboard part number PN -> motherboard package number BN -> model product name PN -> CPU manufacturer -> architecture type, obtain the cfg configuration files on the TFTP (DHCP) server respectively; and check whether the default value of the cfg configuration file in each dimension is in the system image file set, define the sub-feature value and the sub-weight.
[0053] When the default value of the cfg configuration file corresponding to any hardware feature dimension is not in the system image file set, it means that there is no cfg file named according to the hardware feature information value in the image file set, then assign the sub-feature value of this hardware feature dimension to 0; When the default value of the cfg configuration file corresponding to any hardware feature dimension is in the system image file set, it means that there is a cfg file named according to the hardware feature information value in the image file set, and the content of the cfg configuration file corresponding to the hardware feature dimension is consistent with the content of the system image file boot list, then the sub-feature value of this hardware feature dimension is 1; When the default value of the cfg configuration file corresponding to any hardware feature dimension does not match the system image file set abnormally, it means that there is a cfg file named according to the hardware feature information value in the image file set, but the content of the cfg configuration file corresponding to the hardware feature dimension does not match the content of the system image file boot list, then the sub-feature value of this hardware feature dimension is 2; Among them, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
[0054] The sub-feature values corresponding to the hardware feature information in each dimension are defined as shown in Table 1: Table 1
[0055] Step S07, determine the comprehensive feature value according to the sub-feature values of the hardware features in each dimension and the corresponding sub-weights.
[0056] Specifically, the sub-weights corresponding to the hardware features in each dimension are defined as shown in Table 2: Table 2
[0057] Here, the sub - item weights corresponding to the hardware feature information of each dimension are arranged according to the priority of matching the system image file. The sub - item weights corresponding to the hardware features of each dimension form a geometric sequence with a common ratio of 10, and each sub - item weight is 10 times the previous sub - item weight. General term formula: an = 10 n-1 ( n ≥ 1), where a is the sub - item weight corresponding to the hardware feature of each dimension, and n is an integer greater than or equal to 1.
[0058] Step S071, obtain the sub - item feature weight WM corresponding to the MAC address of the server network card and the sub - item feature value M of the MAC address of the server network card; the sub - item feature weight WS corresponding to the server host serial number and the sub - item feature value S of the server host serial number; obtain the sub - item feature weight WP1 corresponding to the server motherboard part number and the sub - item feature value P1 of the server motherboard part number. Obtain the sub - item feature weight WB corresponding to the server motherboard package number and the sub - item feature value B of the server motherboard package number; obtain the sub - item feature weight WP2 corresponding to the server model product name and the sub - item feature value P2 of the server model product name; obtain the sub - item feature weight WC corresponding to the server processor manufacturer and the sub - item feature value C of the server processor manufacturer. Obtain the sub - item feature weight WA corresponding to the server system architecture type and the sub - item feature value A of the server system architecture type. Calculate the comprehensive feature value N through the formula: N = WM×M + WS×S + WP1×P1 + WB×B + WP2×P2 + WC×C + WA×A.
[0059] Step S08, verify the comprehensive feature value and determine the target system image file for starting the server to be installed with the system. Start the server to be installed with the system through the target system image file.
[0060] Step S081, verify the comprehensive feature value and determine whether the comprehensive feature value is the first preset value. If so, import a new architecture type on the server to be installed with the system, and match the system image file corresponding to the new architecture in the startup directory of the new architecture type; if not, verify the sub - item feature values corresponding to the comprehensive feature value bit by bit from right to left according to the decimal sequence. Verifying the sub - item feature values corresponding to the comprehensive feature value bit by bit from right to left according to the decimal sequence includes: When the sub-item eigenvalue corresponding to the comprehensive eigenvalue is the second preset value for the first time, the hardware feature information dimension corresponding to the sub-item eigenvalue is used as the target hardware feature information dimension, and the system image file corresponding to the target hardware feature information dimension is used to start the system server to be installed; When the sub-item eigenvalue corresponding to the comprehensive eigenvalue is the third preset value, there is a record that the system image file matched by the hardware feature information dimension corresponding to the sub-item eigenvalue has been modified.
[0061] Specifically, the calculated comprehensive eigenvalue is verified. If the comprehensive eigenvalue is 0, it means that the server encounters a new configuration and new architecture, and the default boot is not defined. Then, the engineer is reminded to intervene manually, enter the new architecture type, and define the cfg file corresponding to the new architecture in the AarchBoot startup directory.
[0062] The comprehensive eigenvalue is verified bit by bit. If the sub-item eigenvalue of the comprehensive eigenvalue is 2, it means that there is a tampering or invalid configuration of the boot image file, and the engineer is reminded to intervene manually for processing.
[0063] Record the server SN and the comprehensive eigenvalue into the checksum.cfg file of the PXE server for the engineer to monitor overall in the background. For example, if the comprehensive eigenvalue of the server is 1010020, the server is preferentially booted according to the system image file of the hardware feature dimension corresponding to the sub-item eigenvalue with the lowest decimal sequence bit of 1, that is, booted according to the boot item corresponding to the hardware feature dimension of the fifth-bit model product name PN. At this time, the second sub-item eigenvalue is 2, indicating that the definition of the boot item corresponding to the host serial number SN is illegal, that is, there may be a tampering of the system image file corresponding to the host serial number SN, for the engineer to analyze and monitor the overall progress subsequently.
[0064] Step S082, obtain the target system image file; Write the target system image file into the server physical medium through the installation tool; Set the installation mode corresponding to the target system image file in the operating system of the system server to be installed; Adjust the startup order of the hardware of the system server to be installed, and set the USB flash drive or optical disc as the first startup item of the system server to be installed; Save the settings and restart the server, and the system server to be installed starts from the target system image file; When the target system image file is a Linux image file, enter the installation interface or provide the server rescue mode; Repair the server boot file through the Linux chroot tool (repair tool) in the target system image file.
[0065] Here, as Figure 5 shown, in the UEFI pre-boot stage of this application, the network card MAC address, motherboard part number, motherboard PN, motherboard package number, CPU model, CPU manufacturer, and architecture information are collected; the optimal system boot item corresponding to the optimal hardware feature dimension is matched through the dynamic policy engine; the corresponding GRUB configuration file is dynamically generated and loaded and executed by the grubaa64.efi engine, realizing a very flexible intelligent boot management system; Multi-dimensional hardware feature information fusion: For the first time, the network card MAC address, motherboard part number, motherboard PN, motherboard package number, CPU model, CPU manufacturer, and architecture information are jointly used as the basis for mirror file matching; Dynamic policy engine: Supports priority rule nesting, logical operator combination, and remote policy update, realizing a highly flexible configuration management mode; Deep integration of GRUB: Avoids source code-level modification of the grubaa64.efi file, but directly uses the released grubaa64.efi file, and deeply implements the newly added hardware feature information collection and matching policy parsing module through grubshell scripts; Secure boot execution: Verifies and warns the legitimacy of the PXE boot option by calculating and verifying the comprehensive feature value, performs secure boot execution, and uploads the comprehensive feature value information to the server for engineers to monitor in the background, improving the security of the server PXE pre-boot.
[0066] Among them, the dynamic policy matching engine supports the following functions: Priority rule nesting and logical operator (AND / OR) combination; Pull and update the policy library from the remote server; The modification of the grubaa64.efi file includes: adding a hardware feature collection interface (such as the hwscan() function) and integrating a policy parsing module.
[0067] In addition, the server system boot method also includes: When verifying the comprehensive feature value, determining the target system image file for the server to be installed to boot, and when the method of booting the server to be installed through the target system image file fails, the server to be installed is bootstrapped through the network pre-boot program; Bootstrapping the server to be installed through the network pre-boot program includes: Assigning an IP address to the server to be installed through a DHCP protocol server (the first server); Downloading the boot file of the server to be installed through a TFTP protocol server (the second server); Configuring the DHCP protocol server and the TFTP protocol server; Create the root directory of the TFTP protocol server, copy the boot file, start the TFTP service (File Transfer Protocol service), and set the startup options for the system server to be installed; Mount the system image file and copy the system image file to the Web server, and start the Apache software of the Web server; After the client obtains an IP address, download the core file for network boot from the TFTP protocol server (the second server) and display the installation menu; After selecting the installation menu option, load the core file and the root file, and automatically start the system server to be installed through the system image file.
[0068] After booting the system server to be installed through the network pre-boot program, it includes: Check for problems with the boot system of the server through the network pre-boot program; When the client cannot obtain an IP address, detect whether the DHCP protocol server (the first server) is running and / or whether the firewall of the DHCP protocol server has opened UDP ports 67 / 68 (preset ports); When the kernel file fails to load, detect whether the path in the passed startup parameters is correct; When the automatic installation of the system server to be installed through the system image file is interrupted, check whether the syntax of the automatic installation configuration file is correct through the KS configuration file verification tool.
[0069] The core of PXE pre-boot technology is the cooperation of the DHCP server + TFTP server + installation source; through automation tools (such as Kickstart / Cobbler), server systems can be deployed on a large scale; for the production environment, it is recommended to isolate the PXE network by combining VLAN and firewall rules to improve security.
[0070] It can be understood that 1. Configure the DHCP server to assign an IP address to the system server to be installed; Configuration items: Define a scope and specify the range of IP addresses available for assignment; Set network parameters such as the default gateway and subnet mask; Specify the location of the TFTP server so that the client can find the startup file; 2. Configure the TFTP server to provide boot files for the client to download; Create the TFTP root directory and copy the necessary boot files (such as the startup files of PXELINUX or GRUB2) to this directory; Start the TFTP service and ensure that it is running properly; Set the BIOS / UEFI boot option of the system server to be installed to support booting from the network; 3. Prepare the system image file so that the client can access the system image through the network for installation; Mount the system image file and copy it to the document root directory of the Web server; Ensure that Apache or other Web server software has been installed and correctly configured; Start the Web server service; 4. Client startup and installation process: Obtain an IP address: When the client boots through the network, it first requests an IP address and other network setting information from the DHCP (Dynamic Host Configuration Protocol) server; Download the boot file: According to the information provided by the DHCP server, the client contacts the TFTP (Trivial File Transfer Protocol) server to download the core file for network booting; Display the installation menu: After the core file is loaded, an installation menu will be displayed, allowing the user to select different installation options; Start the installation: Once the installation option is selected, the system will load the corresponding kernel and initial RAM disk, and then download the complete system image file from the Web server through the HTTP protocol to execute the automated installation process.
[0071] This process makes full use of the existing network protocols (DHCP, TFTP, and HTTP) to achieve automated deployment of the operating system without physical media, greatly facilitating the management and maintenance of large-scale systems.
[0072] Check for problems with the server's boot system through the network pre-boot program: When the client cannot obtain an IP address: Then detect whether the DHCP server is running: First, confirm whether the DHCP server is working properly; this can be done by executing relevant commands or checking the service status on the DHCP server; for example, use systemctl status dhcpd (for ISC DHCP server) in the Linux system to view its status; Check the firewall settings: Ensure that the firewall of the DHCP server allows communication through UDP ports 67 and 68; the following commands can be used to check and modify the firewall rules: For firewalld: Use "sudo firewall-cmd --list-all" to view the current rules, and use "sudo firewall-cmd --add-port=67 / udp --permanent" to add the necessary ports. For iptables: You can use "sudo iptables -L -v -n" to view the existing rules and add the corresponding rules to allow traffic to pass through. When the kernel file fails to load: Verify the path correctness: If the kernel file fails to load, it is usually because the path provided by the TFTP server is incorrect or the file does not exist. It is necessary to check whether the path in the startup parameters passed to the client is accurate, including but not limited to: Check whether the correct kernel file (such as vmlinuz) and the initial RAM disk file (such as initrd.img) exist under the TFTP root directory. Confirm that the path specified in the startup configuration file (such as pxelinux.cfg / default or GRUB configuration file) is consistent with the actual storage location. When the automated installation is interrupted: Check the Kickstart configuration file syntax: When the automated installation process is interrupted due to configuration errors, you can use a dedicated tool to verify the syntax correctness of the Kickstart (KS) configuration file. Red Hat and its derivative distributions provide a tool called ksvalidator for this purpose. The example command is as follows: ksvalidator / path / to / your / kickstart.cfg; If there is no ksvalidator tool, you can also try to manually check whether the configuration file has syntax errors or logical inconsistencies, such as the partition scheme, package selection, etc.
[0073] By following the above steps, various problems encountered in the network pre-boot environment can be effectively located and solved. Each step provides a specific troubleshooting direction for a specific type of failure, thus helping to quickly resume the normal system deployment process.
[0074] Without departing from the technical solution of this application, several improvements and optimizations can be made to the method for starting the server system provided in the embodiments of this application, and these improvements and optimizations should also be regarded as the protection scope of this application.
[0075] This technical solution can be applied in complex application environment networks such as large data centers, heterogeneous computing, and cloud computing.
[0076] The beneficial effects brought by the technical solution provided in the embodiment of the present application are as follows: The technology of the present application can achieve precise boot matching of the server system based on multi-dimensional hardware features, reduce manual intervention, and improve the efficiency of server system startup.
[0077] The technical solution of the present application supports the matching of image files with more than 7 dimensions of hardware features, which can cover more than 95% of heterogeneous device scenarios, reducing the server system startup error rate to 0; the technology of the present application realizes "zero-touch deployment", reducing the manual configuration time by 90%, especially suitable for ultra-large-scale cluster servers (such as thousands of nodes); it can quickly adapt to new hardware (such as RISC-V), and at this time, only the policy file library needs to be updated without modifying the boot program; when the server is expanded, there is no need for manual network configuration again, avoiding the paralysis of the entire network caused by manual configuration errors; and for illegal server startups, the boot is paused and a warning is given for manual processing. The technical solution of the present application improves the efficiency of pre-boot guidance for large cluster servers, automatically uploads comprehensive feature information to the server for engineers to monitor in the background.
[0078] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0079] The embodiment of the present application also provides a server system startup device, as Figure 6 shown, the device includes: a creation module, an acquisition module, a setting module, a matching module, a judgment module, a determination module, a verification module, and a startup module.
[0080] In this embodiment, the creation module is used to create a system image file set on the server to be installed with the system according to the service type; The acquisition module is used to obtain the hardware feature information of the server to be installed with the system in multiple dimensions; The setting module is used to set the priority of the system image file corresponding to each dimension of hardware feature information according to the accuracy of the hardware feature information; The matching module is used to match the corresponding system image file for each dimension of hardware feature information according to the priority of the system image file corresponding to each dimension of hardware feature information; The judgment module is used to sequentially judge whether the system image file corresponding to each dimension of hardware feature information exists in the system image file set, and obtain the sub-item feature value of each dimension of hardware feature information according to the judgment result; The determination module is used to determine the comprehensive feature value according to the sub-item feature value of each dimension of hardware feature and the corresponding sub-item feature weight; A verification module, used to verify the comprehensive eigenvalue and determine the target system image file for starting the system server to be installed; A startup module, used to start the system server to be installed through the target system image file.
[0081] In this embodiment, a setting module is used to set the priority of the hardware feature information of the system image file corresponding to each dimension of hardware feature information as the server network card MAC address, server host serial number, server motherboard part number, server motherboard package number, server model product name, server processor manufacturer, and server system architecture type in sequence.
[0082] In one of the embodiments, a matching module is used to create file directories for each dimension of hardware feature information; Judging in sequence whether a configuration file named with the current dimension of hardware feature information can be matched in the file directory of the current dimension of hardware feature information according to the priority of the server network card MAC address, server host serial number, server motherboard part number, server motherboard package number, server model product name, server processor manufacturer, and server system architecture type of the hardware feature information; If so, determine that the startup parameter value of the configuration file named with the current dimension of hardware feature information is the system image file name corresponding to the current dimension of hardware feature information; if not, judge whether a configuration file named with this hardware feature information can be matched in the file directory of the next dimension of hardware feature information.
[0083] In one of the embodiments, a judgment module is used to set the sub-item eigenvalue of the hardware feature information to a first preset value when the system image file corresponding to the hardware feature information does not exist in the system image file set; When the system image file corresponding to the hardware feature information exists in the system image file set, set the sub-item eigenvalue of the hardware feature information to a second preset value; When the system image file corresponding to the hardware feature information does not match the content of the system image file corresponding to the hardware feature information in the system image file set, set the sub-item eigenvalue of the hardware feature information to a third preset value.
[0084] In one of the embodiments, a determination module is used to obtain the sub-item feature weight WM corresponding to the server network card MAC address, the sub-item feature value M corresponding to the server network card MAC address; the sub-item feature weight WS of the server host serial number, the sub-item feature value S of the server host serial number; obtain the sub-item feature weight WP1 corresponding to the server motherboard part number, the sub-item feature value P1 corresponding to the server motherboard part number; Obtain the sub-item feature weight WB corresponding to the server motherboard package number and the sub-item feature value B corresponding to the server motherboard package number; obtain the sub-item feature weight WP2 corresponding to the server model product name and the sub-item feature value P2 corresponding to the server model product name; obtain the sub-item feature weight WC corresponding to the server processor manufacturer and the sub-item feature value C corresponding to the server processor manufacturer; Obtain the sub-item feature weight WA corresponding to the server system architecture type and the sub-item feature value A corresponding to the server system architecture type; Calculate the comprehensive feature value N through the formula: N = WM×M + WS×S + WP1×P1 + WB×B + WP2×P2 + WC×C + WA×A.
[0085] In one embodiment, the determination module is used to arrange the sub-item weights corresponding to the hardware feature information of each dimension according to the priority of matching the system image file for each dimension of hardware feature information. The sub-item weights corresponding to the hardware feature information of each dimension are a geometric sequence with a common ratio of 10; The general term formula of the geometric sequence is: an = 10 n-1 where, a is the sub-item weight corresponding to the hardware feature information of each dimension, and n is an integer greater than or equal to 1.
[0086] In one embodiment, the verification module is used to verify the comprehensive feature value and determine whether the comprehensive feature value is the first preset value; If so, import a new architecture type on the server where the system is to be installed, and match the system image file corresponding to the new architecture in the startup directory of the new architecture type; if not, verify the sub-item feature values corresponding to the comprehensive feature value bit by bit from right to left in the decimal sequence; Verifying the sub-item feature values corresponding to the comprehensive feature value bit by bit from right to left in the decimal sequence includes: When the sub-item feature value corresponding to the comprehensive feature value is the second preset value for the first time, then use the dimension of the hardware feature information corresponding to the sub-item feature value as the target hardware feature information dimension, and start the server where the system is to be installed by matching the corresponding system image file through the target hardware feature information dimension; When the sub-item feature value corresponding to the comprehensive feature value is the third preset value, there is a record that the system image file matched by the dimension of the hardware feature information corresponding to the sub-item feature value has been modified.
[0087] In one embodiment, the startup module is used to obtain the target system image file; Write the target system image file into the server physical medium through the installation tool; Set the installation mode corresponding to the target system image file in the operating system of the server where the system is to be installed; Adjust the boot order of the hardware of the system server to be installed, and set the USB flash drive or optical disc as the first boot item of the system server to be installed; Save the settings and restart the server. The system server to be installed boots from the target system image file; When the target system image file is a Linux image file, enter the installation interface or provide the server rescue mode; Repair the server boot file through the Linux chroot tool in the target system image file.
[0088] In one of the embodiments, a creation module is used to configure the system image files involved in all business types in the configuration file of the system server to be installed, and obtain a system image file boot list; Set the system image file boot list as a system image file set; Among them, the system image file set includes system image files corresponding to the hardware feature information in each dimension.
[0089] In one of the embodiments, the start module is further used to assign an IP address to the system server to be installed through a DHCP protocol server; Download the boot file of the system server to be installed through a TFTP protocol server; Configure the DHCP protocol server and the TFTP protocol server; Create the root directory of the TFTP protocol server, copy the boot file, start the TFTP service, and set the startup options of the system server to be installed; Mount the system image file, copy the system image file to the Web server, and start the Apache software of the Web server; After the client obtains the IP address, download the core file of the network boot from the TFTP protocol server side and display the installation menu; After selecting the installation menu option, load the core file and the root file, and automatically start the system server to be installed through the system image file.
[0090] In one of the embodiments, the start module is further used to troubleshoot problems with the boot startup system of the server through a network pre-boot program; When the client cannot obtain an IP address, detect whether the DHCP protocol server is running and / or whether the firewall of the DHCP protocol server has UDP67 / 68 ports open; When the kernel file fails to load, detect whether the path in the passed startup parameters is correct; When the automated installation of the system server to be installed is interrupted by the system image file, the KS configuration file verification tool is used to check whether the syntax of the automated installation configuration file is correct.
[0091] The beneficial effects brought by the technical solution provided by the embodiment of the present application are as follows: The technology of the present application can achieve precise boot matching of the server system based on multi-dimensional hardware characteristics, reduce manual intervention, and improve the efficiency of server system startup.
[0092] The technical solution of the present application supports the matching of image files with more than 7 dimensions of hardware characteristics, can cover more than 95% of heterogeneous device scenarios, and reduces the server system startup error rate to 0; the technology of the present application realizes "zero-touch deployment", reduces the manual configuration time by 90%, and is especially suitable for ultra-large-scale cluster servers (such as thousands of nodes); it can quickly adapt to new hardware (such as RISC-V), and at this time, only the policy file library needs to be updated without modifying the boot program; when the server is expanded, there is no need to manually configure the network again, avoiding the paralysis of the entire network caused by manual configuration errors; and for illegal server startups, the boot is paused and a warning is given for manual processing. The technical solution of the present application improves the efficiency of pre-boot guidance of large cluster servers, automatically uploads comprehensive feature information to the server for engineers to monitor in the background.
[0093] For the description of the features in the corresponding embodiment of the server system startup device, reference can be made to the relevant description in the corresponding embodiment of the server system startup method, which will not be elaborated here one by one.
[0094] The embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in the embodiment of the server system startup method. The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of the system image file corresponding to each dimension of hardware feature information according to the accuracy of the hardware feature information; Match the system image file corresponding to each dimension of hardware feature information according to the priority of the system image file corresponding to each dimension of hardware feature information; Judge in turn whether the system image file corresponding to each dimension of hardware feature information exists in the system image file set, and obtain the sub-feature value of each dimension of hardware feature information according to the judgment result; Determine the comprehensive feature value according to the sub-feature value of each dimension of hardware feature and the corresponding sub-feature weight; Verify the comprehensive eigenvalue and determine the target system image file for starting the system server to be installed; Start the system server to be installed with the target system image file.
[0095] As Figure 7 shown, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Among them, the computer program is set to execute the steps in the embodiment of the server system startup method when running. The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of the system image file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the system image file corresponding to the hardware feature information of each dimension according to the priority of the system image file corresponding to the hardware feature information of each dimension; Judge in turn whether the system image file corresponding to the hardware feature information of each dimension exists in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment result; Determine the comprehensive eigenvalue according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive eigenvalue and determine the target system image file for starting the system server to be installed; Start the system server to be installed with the target system image file.
[0096] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0097] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiment of the server system startup method. The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of the system image file corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the corresponding system image files for each dimension of hardware feature information according to the priority of matching system image files for each dimension of hardware feature information; Judging in turn whether the system image files corresponding to each dimension of hardware feature information exist in the system image file set, and obtaining the sub-feature values of each dimension of hardware feature information according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of each dimension of hardware features and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
[0098] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the embodiment of the server system startup method are implemented. The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed in multiple dimensions; Set the priority of matching system image files for each dimension of hardware feature information according to the accuracy of the hardware feature information; Match the corresponding system image files for each dimension of hardware feature information according to the priority of matching system image files for each dimension of hardware feature information; Judging in turn whether the system image files corresponding to each dimension of hardware feature information exist in the system image file set, and obtaining the sub-feature values of each dimension of hardware feature information according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of each dimension of hardware features and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
[0099] The technical solution of this application supports the matching of image files with more than 7 dimensions of hardware features, which can cover more than 95% of heterogeneous device scenarios, reducing the server system startup error rate to 0; the technical implementation of this application realizes "zero-touch deployment", reducing the manual configuration time by 90%, and is especially suitable for ultra-large-scale cluster servers (such as thousands of nodes); it can quickly adapt to new hardware (such as RISC-V), and at this time, it is necessary to update the policy file library without modifying the boot program; when the server is expanded, there is no need to manually configure the network again, avoiding the paralysis of the entire network caused by manual configuration errors; and for illegal server startups, the boot is suspended and a warning is given for manual processing. The technical solution of this application improves the efficiency of pre-boot guidance for large cluster servers, automatically uploads comprehensive feature information to the server for engineers to monitor in the background.
[0100] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0101] The above has introduced in detail a server system startup method, device, equipment, and medium provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A server system startup method, characterized in that, The method includes: Create a system image file set on the system server to be installed according to the service type; Obtain the hardware feature information of the system server to be installed from multiple dimensions; Set the priority of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information; Match the system image files corresponding to the hardware feature information of each dimension according to the priority of the system image files corresponding to the hardware feature information of each dimension; Judge in turn whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtain the sub-feature values of the hardware feature information of each dimension according to the judgment results; Determine the comprehensive feature value according to the sub-feature values of the hardware features of each dimension and the corresponding sub-feature weights; Verify the comprehensive feature value to determine the target system image file for starting the system server to be installed; Start the system server to be installed through the target system image file.
2. The server system startup method according to claim 1, wherein The setting of the priority of the system image files corresponding to the hardware feature information of each dimension according to the accuracy of the hardware feature information includes: The priorities of the hardware feature information corresponding to the system image files of each dimension are, in sequence, the server network card MAC address, the server host serial number, the server motherboard part number, the server motherboard package number, the server model product name, the server processor manufacturer, and the server system architecture type.
3. The server system startup method according to claim 2, wherein, The matching of the system image files corresponding to the hardware feature information of each dimension according to the priority of the system image files corresponding to the hardware feature information of each dimension includes: Create a file directory for each dimension of hardware feature information; Judging in sequence whether a configuration file named with the current dimension of hardware feature information can be matched in the file directory of the current dimension of hardware feature information according to the priority of the hardware feature information being the server network card MAC address, the server host serial number, the server motherboard part number, the server motherboard package number, the server model product name, the server processor manufacturer, and the server system architecture type; If so, determine that the startup parameter value of the configuration file named with the current dimension of hardware feature information is the system image file name corresponding to the current dimension of hardware feature information; if not, judge whether a configuration file named with this hardware feature information can be matched in the file directory of the next dimension of hardware feature information.
4. The server system startup method according to claim 2, wherein The judgment in turn whether the system image files corresponding to the hardware feature information of each dimension exist in the system image file set, and obtaining the sub-feature values of the hardware feature information of each dimension according to the judgment results includes: When the system image file corresponding to the hardware feature information does not exist in the system image file set, set the sub-feature value of the hardware feature information to the first preset value; When the system image file corresponding to the hardware feature information exists in the system image file set, set the sub-feature value of the hardware feature information to the second preset value; When the corresponding system image file matched according to the hardware feature information does not match the content of the system image file corresponding to the hardware feature information in the system image file set, the sub-feature value of the hardware feature information is set to the third preset value.
5. The server system startup method according to claim 4, characterized in that, Determining the comprehensive feature value according to the sub-feature values of the hardware features in each dimension and the corresponding sub-feature weights includes: Obtaining the sub-feature weight WM corresponding to the MAC address of the server network card and the sub-feature value M of the MAC address of the server network card; the sub-feature weight WS corresponding to the server host serial number and the sub-feature value S of the server host serial number; obtaining the sub-feature weight WP1 corresponding to the server motherboard part number and the sub-feature value P1 of the server motherboard part number; Obtaining the sub-feature weight WB corresponding to the server motherboard package number and the sub-feature value B of the server motherboard package number; obtaining the sub-feature weight WP2 corresponding to the server model product name and the sub-feature value P2 of the server model product name; obtaining the sub-feature weight WC corresponding to the server processor manufacturer and the sub-feature value C of the server processor manufacturer; Obtaining the sub-feature weight WA corresponding to the server system architecture type and the sub-feature value A of the server system architecture type; Calculate the comprehensive feature value N through the formula: N = WM×M + WS×S + WP1×P1 + WB×B + WP2×P2 + WC×C + WA×A.
6. The server system startup method according to claim 5, wherein Arrange the sub-weights corresponding to the hardware features in each dimension according to the priority of matching the system image file corresponding to the hardware feature information in each dimension, and the sub-weights corresponding to the hardware features in each dimension are a geometric sequence with a common ratio of 10; The general term formula of the geometric sequence is as follows: an = 10 n-1 , where a is the sub - weight corresponding to the hardware characteristics of each dimension, and n is an integer greater than or equal to 1.
7. The server system startup method according to claim 5, wherein Verifying the comprehensive feature value to determine the target system image file for starting the server of the system to be installed includes: Verifying the comprehensive feature value to determine whether the comprehensive feature value is the first preset value; If so, import a new architecture type on the server of the system to be installed, and match the system image file corresponding to the new architecture in the startup directory of the new architecture type; if not, verify the sub-feature values corresponding to the comprehensive feature value bit by bit from right to left in the decimal sequence.
8. The server system startup method according to claim 7, wherein The verifying the sub-feature values corresponding to the comprehensive feature value bit by bit from right to left in the decimal sequence includes: When the sub-feature value corresponding to the comprehensive feature value is the second preset value for the first time, the hardware feature information dimension corresponding to the sub-feature value is used as the target hardware feature information dimension, and the system image file corresponding to the target hardware feature information dimension is used to start the server of the system to be installed; When the sub-feature value corresponding to the comprehensive feature value is the third preset value, it is determined that there is a record of modification of the system image file matched by the hardware feature information dimension corresponding to the sub-feature value.
9. The server system startup method according to claim 1, wherein Starting the server of the system to be installed through the target system image file includes: Obtaining the target system image file; Writing the target system image file into the server physical medium through the installation tool; Set an installation mode corresponding to the target system image file in the operating system of the system server to be installed; Adjust the boot order of the hardware of the system server to be installed, and set the USB flash drive or optical disc as the first boot item of the system server to be installed; Save the settings and restart the server, and the system server to be installed boots from the target system image file; When the target system image file is a Linux image file, enter the installation interface or provide the server rescue mode; Repair the server boot file through the Linux repair tool in the target system image file.
10. The server system startup method according to claim 1, characterized in that, Create a system image file set on the system server to be installed according to the service type, including: Store the system image files corresponding to all service types in the configuration file of the system server to be installed to obtain a system image file boot list; Set the system image file boot list as the system image file set; Among them, the system image file set includes system image files corresponding to and matching the hardware feature information in each dimension.
11. The server system startup method according to claim 1, wherein The method further includes: When verifying the comprehensive eigenvalue, determining the target system image file for the system server to be installed to boot, and when the method of booting the system server to be installed through the target system image file fails, then boot the system server to be installed through the network pre-boot program; The booting of the system server to be installed through the network pre-boot program includes: Allocate an IP address to the system server to be installed through the first server; Download the boot file of the system server to be installed through the second server; Configure the first server and the second server; Create the root directory of the second server, copy the boot file, start the File Transfer Protocol service, and set the boot option of the system server to be installed; Mount the system image file and copy the system image file to the Web server, and start the software of the Web server; After the client obtains the IP address, download the core file for network booting from the second server side and display the installation menu; After selecting the installation menu option, load the core file and the root file, and automatically start the system server to be installed through the system image file.
12. The server system startup method according to claim 11, wherein After the booting of the system server to be installed through the network pre-boot program, it includes: Check for problems with the boot system of the server through the network pre-boot program; When the client cannot obtain an IP address, detect whether the first server is running and / or whether the firewall of the first server has a preset port enabled; When the kernel file fails to load, detect whether the path in the passed boot parameters is correct; When the automatic installation of the system server to be installed through the system image file is interrupted, check whether the syntax of the automatic installation configuration file is correct through the configuration file verification tool.
13. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for implementing the steps of the server system boot method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein when the computer program is executed by a processor, the steps of the server system startup method according to any one of claims 1 to 12 are implemented.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the server system startup method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Operation system installation method and device
CN114115917A
Operating system filling method and system and electronic equipment
CN116126361A
Automatic operating system deployment method, device and system
CN119248296A
Starting image providing system and method, boot node device, boot server device, and program
JP2006011506A