Server starting method and device, electronic equipment and storage medium
By automatically judging and adjusting the startup sequence of the server, the problem of manual adjustment is solved, and the server's startup efficiency and flexibility is improved.
Patent Information
- Application Number
- CN202510889930.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, manual adjustment of the start-up priority between equipment groups is time-consuming and labor-intensive, resulting in low server operation efficiency.
In response to the startup command, it is automatically judged whether it is a single startup, and in the case of a single startup, the default startup sequence is stored in the preset array, and temporarily adjusts it to the preset startup sequence, completes the startup of the device group, and restores the default sequence after completion.
It realizes rapid response when temporary changes in startup sequence is required, and automatically regresses to standard processes in normal circumstances, improving the flexibility and efficiency of the server startup process and reducing the time cost and potential errors caused by manual intervention.
Smart Images

Figure CN120407032A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for starting a server. Background Art
[0002] There is a startup priority among the peripheral devices of the server, and the startup priority is fixed when the server leaves the factory.
[0003] Currently, temporary adjustment of the startup priority between device groups is usually done manually by operation and maintenance personnel. This method is time-consuming and labor-intensive, resulting in low server operation efficiency. Summary of the Invention
[0004] The present application provides a server startup method, apparatus, electronic device, and storage medium to at least solve the problem in the related art of manually adjusting the startup priority between device groups, which is time-consuming and labor-intensive and leads to low server operation efficiency.
[0005] This application provides a method for starting a server, including: In response to a startup command, starting the target server; wherein the startup command includes a preset startup sequence; When it is determined that the startup command is a single startup, storing a default startup sequence in a preset array, and adjusting the default startup sequence to the preset startup sequence; The device group is started up based on the preset startup sequence, and after the startup of the device group is completed, the preset startup sequence is adjusted to the default startup sequence based on the preset array.
[0006] Optionally, before starting the target server in response to the start command, the method further includes: In response to the single boot instruction, the boot command is generated and stored in the baseboard controller so that the basic input and output system can obtain the boot command.
[0007] Optionally, when determining that the startup command is a single startup, storing a default startup sequence in a preset array, and adjusting the default startup sequence to the preset startup sequence includes: The basic input and output system obtains a return value of the start command in the baseboard controller; determining whether the start command is a single start according to the return value, and creating the preset array if it is determined that the start command is a single start; The default startup sequence is stored in the preset array, and the default startup sequence is adjusted to the preset startup sequence.
[0008] Optionally, after starting the target server in response to a startup command, the method further includes: The basic input / output system obtains the return value of the startup command in the baseboard controller; Determine whether the startup command is a single startup according to the return value. In the case where it is determined that the startup command is a single startup, set the next startup item parameter to the preset startup order; Perform startup of the device group according to the preset startup order included in the next startup item parameter.
[0009] Optionally, the performing startup of the device group according to the preset startup order included in the next startup item parameter includes: Obtain the next startup item parameter, and determine whether to start the pre-boot execution environment based on the value of the next startup item parameter; In the case where it is determined to start the pre-boot execution environment, perform startup of the device group according to the preset startup order included in the next startup item parameter.
[0010] Optionally, after performing startup of the device group based on the preset startup order and adjusting the preset startup order to the default startup order based on the preset array after the startup of the device group is completed, the method further includes: Read the default startup order based on the system configuration management tool, and determine whether the default startup order has changed.
[0011] Optionally, after performing startup of the device group according to the preset startup order included in the next startup item parameter in the case where it is determined to start the pre-boot execution environment, the method further includes: Read the default startup order based on the system configuration management tool, and determine whether the default startup order has changed.
[0012] Optionally, after storing the startup command in the baseboard controller, the method further includes: Delete the startup command when the storage duration of the startup command in the baseboard controller is greater than or equal to a preset time threshold.
[0013] Optionally, after storing the startup command in the baseboard controller, the method further includes: Delete the startup command when the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system obtains the startup command.
[0014] Optionally, when the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system obtains the startup command, deleting the startup command further includes: Determining whether the parameters of the startup command are valid based on the Intelligent Platform Management Interface (IPMI) command.
[0015] Optionally, the startup command is for Pre-Execution Environment (PXE) startup.
[0016] This application also provides a startup device for a server, including: A startup unit, configured to start a target server in response to a startup command; wherein the startup command includes a preset startup sequence; An adjustment unit, configured to, when it is determined that the startup command is a single startup, store the default startup sequence in a preset array and adjust the default startup sequence to the preset startup sequence; An execution unit, configured to start a device group based on the preset startup sequence and, after the device group starts up, adjust the preset startup sequence to the default startup sequence based on the preset array.
[0017] Optionally, the device further includes: A generation unit, configured to, before the startup unit starts the target server in response to a startup command, generate the startup command in response to a single startup instruction and store the startup command in the baseboard controller so that the basic input / output system can obtain the startup command.
[0018] Optionally, the adjustment unit is further configured to: The basic input / output system obtains the return value of the startup command in the baseboard controller; Determine whether the startup command is a single startup according to the return value, and create the preset array when it is determined that the startup command is a single startup; Store the default startup sequence in the preset array and adjust the default startup sequence to the preset startup sequence.
[0019] Optionally, the device further includes: An acquisition unit, configured to, after the startup unit starts the target server in response to a startup command, the basic input / output system obtains the return value of the startup command in the baseboard controller; A setting unit, configured to determine whether the startup command is a single startup according to the return value, and set the next startup item parameter to the preset startup sequence when it is determined that the startup command is a single startup; A startup unit, configured to start the device group according to the preset startup sequence included in the next startup item parameter.
[0020] Optionally, the execution unit is further configured to: Obtain the next startup item parameter, and determine whether to start for the pre-boot execution environment based on the value of the next startup item parameter; When it is determined to start for the pre-boot execution environment, start the device group according to the preset startup sequence included in the next startup item parameter.
[0021] Optionally, the device further includes: A determination unit, configured to, after the adjustment unit starts the device group according to the preset startup sequence and adjusts the preset startup sequence to the default startup sequence based on the preset array after the device group starts up, read the default startup sequence based on the system configuration management tool, and determine whether the default startup sequence has changed.
[0022] Optionally, the device further includes: The determination unit is further configured to, when the setting unit determines to start for the pre-boot execution environment, after starting the device group according to the preset startup sequence included in the next startup item parameter, read the default startup sequence based on the system configuration management tool, and determine whether the default startup sequence has changed.
[0023] Optionally, the device further includes: A deletion unit, configured to delete the startup command when the storage duration of the startup command in the baseboard controller is greater than or equal to a preset time threshold after the generation unit stores the startup command in the baseboard controller.
[0024] Optionally, the device further includes: The deletion unit is further configured to delete the startup command when the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system obtains the startup command after the generation unit stores the startup command in the baseboard controller.
[0025] Optionally, the deletion unit is further configured to: Determine whether the parameters of the startup command are valid based on the Intelligent Platform Management Interface command.
[0026] Optionally, the startup command is for the pre-boot execution environment to start.
[0027] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of the startup method of any one of the above servers when executing the computer program.
[0028] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any one of the above-mentioned server startup methods.
[0029] The present application also provides a computer program product including a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned server startup methods.
[0030] With the present application, since the system can automatically determine whether to perform single-time priority startup according to a preset startup command and automatically restore the default order after execution, it avoids the cumbersome operation of manually adjusting the priorities one by one by the operation and maintenance personnel. Therefore, it can solve the problems in the prior art that manually adjusting the startup priorities of device groups is time-consuming and laborious, resulting in low server operation efficiency. This automated single-time startup order adjustment mechanism enables quick response and execution in scenarios where the startup order needs to be temporarily changed, and can automatically return to the standard process under normal circumstances, thereby improving the flexibility and efficiency of the server startup process, reducing the time cost and potential errors brought by manual intervention, and achieving the technical effect of improving the overall operation efficiency of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0032] Figure 1 It is a schematic diagram of a hardware architecture provided for an embodiment of the present application; Figure 2 It is a flowchart of a server startup method provided for an embodiment of the present application; Figure 3 It is a schematic diagram of a server startup process provided for an embodiment of the present application; Figure 4 It is a schematic diagram of another server startup process provided for an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of a server startup device provided for an embodiment of the present application; Figure 6 It is a schematic diagram of the structure of another server startup device provided for an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] 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 belong to the protection scope of the present application.
[0034] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, such 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 and are not used to describe a specific order or sequence.
[0035] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0036] Please refer to Figure 1 , Figure 1 which is a schematic diagram of a hardware architecture provided by an embodiment of the present application. As Figure 1As shown in the figure, it includes a Central Processing Unit (CPU) and a server. The server integrates a Baseboard Management Controller (BMC) and a Basic Input Output System (BIOS), and is connected to peripheral devices such as a storage device group, a network card device group, and an optical drive device group. Among them, the BMC and the BIOS interact through the Intelligent Platform Management Interface (IPMI) protocol. The BIOS and the CPU can be connected and interact through the Peripheral Component Interconnect (PCI), Serial Peripheral Interface (SPI), or Quad Serial Peripheral Interface (QSPI). The BMC and the CPU interact through the Redfish protocol. The CPU and the storage device group (composed of multiple hard disk devices), the network card device group, and the optical drive device group (including a Compact Disc Read-Only Memory (CD-ROM) or a Digital Video Disc-Read Only Memory (DVD-ROM)) are connected and interact through PCI, and are connected and interact with other device groups through the Universal Serial Bus (USB). The BMC and the network card device group can interact through the Low Pin Count (LPC) or PCI interface. Through protocols such as IPMI and Redfish and interfaces such as PCI and USB, this architecture realizes the management and control of the BIOS and the CPU by the BMC, the scheduling of the startup process by the BIOS, and the data interaction between the CPU and peripheral devices, providing hardware support for the transmission of startup commands, the execution of the preset startup order, and the collaborative work of device groups.
[0037] An embodiment of this application provides a server startup method. In combination with the execution process of the server startup method, the method will be described in detail (technical terms involved must be explained).
[0038] Figure 2 It is a schematic flowchart of a server startup method provided by an embodiment of this application.
[0039] As Figure 2 shown, the method includes the following steps: Step 101: In response to a startup command, start a target server; wherein the startup command includes a preset startup sequence; In some embodiments, the startup command may be generated by a remote management module or a local control unit to specify a priority sequence of device groups to be started this time.
[0040] Step 102: If it is determined that the start command is a single start, a default start sequence is stored in a preset array, and the default start sequence is adjusted to the preset start sequence; See also Figure 3 , Figure 3 A schematic diagram of a server startup process provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, when the boot command is identified as a single boot mode, the default boot sequence fixed at the factory of the server is stored in a preset data structure, and the priority order of the current boot process is temporarily adjusted to the preset order specified in the boot command. By temporarily storing the default boot sequence in a preset array independent of the permanent storage area in the form of data mapping, it is ensured that the original order is not directly modified; at the same time, based on the temporary properties of a single boot, the device group priority of the current boot process is dynamically adjusted, such as temporarily promoting the pre-boot execution environment startup item to the first place to meet the special needs of this boot. In this process, the preset array serves as a temporary mirror of the default order, and its storage and calling logic is controlled by the validity period of the boot command, such as limiting the effective duration of a single boot through a timing mechanism, thereby ensuring the stability of the server's default permanent startup items while achieving dynamic adjustment of the boot sequence.
[0041] Step 103 : Start the device group based on the preset startup sequence, and adjust the preset startup sequence to the default startup sequence based on the preset array after the device group startup is completed.
[0042] Please continue reading Figure 3 After the device group is started, the default boot order stored in the preset data structure is called to restore the current boot priority order to the original configuration of the server when it left the factory. When the server completes the current boot according to the preset boot order and enters the operating system, the management module and the boot firmware read the pre-archived default boot order data from the temporary storage area through an interactive protocol to overwrite the temporarily adjusted boot priority and ensure that the subsequent boot process of the server still follows the factory default settings. The preset data structure serves as a mirror storage unit for the default boot order. Its data calling mechanism and the detection logic of the boot completion status work together to ensure that the temporary effectiveness of a single boot requirement and the permanence of the default boot item are maintained through an automatic recovery mechanism, avoiding the continuous impact of temporary adjustments on the server boot policy, and providing a closed-loop solution for the dynamic management and stability of the boot order.
[0043] In some embodiments, before starting the target server in response to the start command, the method further includes: In response to the single boot instruction, the boot command is generated and stored in the baseboard controller so that the basic input and output system can obtain the boot command.
[0044] In some embodiments, in response to a single boot command input through a remote management interface or a local console, a boot command including a preset boot sequence is generated, and the command is transmitted to a baseboard management controller (BMC) through a management protocol and stored in a non-volatile storage area.
[0045] In some embodiments, when determining that the startup command is a single startup, storing a default startup sequence in a preset array and adjusting the default startup sequence to the preset startup sequence includes: The basic input and output system obtains a return value of the start command in the baseboard controller; determining whether the start command is a single start according to the return value, and creating the preset array if it is determined that the start command is a single start; The default startup sequence is stored in the preset array, and the default startup sequence is adjusted to the preset startup sequence.
[0046] Please continue reading Figure 3 , when it is determined that the boot command is a single boot, the default boot order is stored in a preset array and adjusted to the preset boot order. During the boot process, the BIOS obtains the return value of the boot command from the BMC through a preset interaction protocol. The return value contains the type identifier and priority parameters of the boot command; based on the type identifier in the return value, the BIOS determines whether the boot command is in single boot mode. When it is determined to be a single boot, a preset array independent of the default boot item storage area is created in the memory; then, the BIOS reads the default boot order fixed at the factory of the server and stores it in the preset array, forming a temporary mirror image of the original order, and dynamically adjusts the currently effective boot order to the preset order specified in the boot command.
[0047] In some embodiments, after starting the target server in response to the start command, the method further includes: The basic input and output system obtains the return value of the start command in the baseboard controller; determining whether the startup command is a single startup according to the return value, and setting the next startup item parameter to the preset startup sequence if it is determined that the startup command is a single startup; The device group is started according to the preset startup sequence included in the next startup item parameter.
[0048] See also Figure 4 , Figure 4 A schematic diagram of another server startup process provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, during the server boot process, the BIOS retrieves the next boot parameter stored in the BMC and parses the parameter value to determine whether to trigger the Pre-Execution Environment (PXE) boot logic. If the parameter value is PXE, the current boot type is confirmed to be PXE, and the BIOS executes the device group boot process based on the preset boot order contained in the parameter. If the parameter value is empty or does not contain a PXE identifier, the default boot order hardened in the server is used. This mechanism stores the preset boot order in a temporary parameter independent of the permanent boot item. Combined with the BMC's timer clear mechanism (for example, automatic expiration after 3 minutes), this ensures that PXE boot is only temporarily effective during a single boot cycle and does not affect the permanent nature of the default boot item. This allows for dynamic management of the boot order while preserving the original configuration.
[0049] In some embodiments, executing startup of the device group according to the preset startup sequence included in the next startup item parameter includes: Obtaining the next startup item parameter, and determining whether to start the pre-boot execution environment based on the value of the next startup item parameter; When it is determined that the startup is performed in the pre-boot execution environment, the device group is started according to the preset startup sequence included in the next startup item parameter.
[0050] In some embodiments, during the server boot process, the BIOS retrieves the next boot item parameter stored in the BMC and parses the parameter value to determine whether to trigger the pre-boot execution environment boot logic. If the parameter value is PXE, the current boot type is confirmed to be PXE boot. Based on the preset boot order contained in the parameter, the BIOS temporarily raises the priority of the network card device group to the first position and executes the device group boot process. If the parameter value is empty or does not contain a PXE identifier, the default boot order hardened in the server is used. This mechanism stores the preset boot order in a temporary parameter independent of the permanent boot item, combined with the BMC's timer clearing mechanism, to ensure that the PXE boot is only temporarily effective during a single boot cycle and does not affect the permanence of the default boot item, thus achieving dynamic management of the boot order and preserving the original configuration.
[0051] In some embodiments, after starting up the device group based on the preset startup sequence, and adjusting the preset startup sequence to the default startup sequence based on the preset array after the device group startup is completed, the method further includes: The default startup sequence is read based on a system configuration management tool to determine whether the default startup sequence is changed.
[0052] After completing the device group startup based on the preset startup sequence and restoring the startup sequence to the default value through the preset array, the method also includes: reading the default startup sequence data stored in the preset array through the system configuration management tool (SCE), and comparing it with the original startup sequence fixed in the server factory to determine whether the default startup sequence has been permanently changed. Specifically, when the server enters the operating system, the SCE tool accesses the preset array created by the BIOS during a single startup process through the preset interface. The array stores the default startup sequence temporarily archived before startup (such as "HDD group → Network card group → CD / DVD-ROM group → Other group"); if the array data read is completely consistent with the server's factory configuration, it proves that the default startup sequence has not been changed due to this single startup operation. Otherwise, an abnormal alarm mechanism is triggered. This mechanism uses the preset array as a real-time mirror of the default order, combined with the standardized reading process of the SCE tool, to form a closed-loop verification of changes in the startup order. This not only ensures that operation and maintenance personnel can accurately obtain the original, unmodified startup configuration, but also guarantees the permanence of the default startup items through data comparison logic, avoiding startup order confusion caused by temporary adjustments, and providing a verifiable technical solution for the reliability management of server startup policies.
[0053] In some embodiments, when it is determined that the device group is started in the pre-boot execution environment, after starting the device group according to the preset startup sequence included in the next startup item parameter, the method further includes: The default startup sequence is read based on a system configuration management tool to determine whether the default startup sequence is changed.
[0054] Optionally, after determining PXE boot and completing the device group boot in the preset order in the next boot item parameters, access the preset array created by the BIOS during the boot process through the SCE, read the factory default boot order of the server stored in the array (such as "HDD group → network card group → CD / DVD-ROM group → Other group"), and compare it with the original boot configuration solidified in the server to determine whether the default boot order has changed permanently. Specifically, when the server enters the operating system, the SCE tool reads the real-time mirror data of the preset array through the preset interface - the array has temporarily stored the default order during a single PXE boot and has not been modified by the temporary adjustments in the boot process. If the read array data is consistent with the original configuration, it proves that the default boot order has not changed due to this PXE boot operation; otherwise, the abnormal detection logic is triggered to prompt the possible risk of permanent change of the boot item. This mechanism forms a closed-loop verification of the boot order change by using the preset array as an isolated storage unit for the default order and combining the standardized reading process of the SCE tool: it not only ensures that the operation and maintenance personnel can accurately obtain the unmodified original boot configuration, but also guarantees the permanence of the default boot item through the data comparison mechanism, avoiding the continuous impact of the temporary adjustment of a single boot on the server boot strategy, and providing a verifiable technical solution for the reliable management of the boot order.
[0055] In some embodiments, after storing the first boot command in the baseboard controller, the method further includes: Deleting the boot command when the storage duration of the boot command in the baseboard controller is greater than or equal to a preset time threshold.
[0056] The BMC monitors the storage duration of the boot command in non-volatile storage areas, such as NVRAM or EEPROM, in real time. When it detects that the storage duration reaches or exceeds a preset time threshold, such as 3 minutes, it automatically deletes the boot command. While receiving and storing the boot command, the BMC starts counting based on the internal timing module; when the time difference between the timing value and the storage time reaches the preset threshold, the BMC sends a delete instruction to the NVRAM / EEPROM through the storage management interface to clear the data of the boot command. This mechanism ensures that a single boot command remains valid only within a limited time window, preventing temporary settings from continuously affecting the server boot process due to unexpected restarts or long periods of non-booting. After the deletion operation is completed, the BMC synchronously updates the status flag so that when the basic input and output system (BIOS) queries through the IPMI protocol, it can obtain the return value indicating that the boot command has expired, thereby continuing to use the default boot sequence fixed at the server factory and maintaining the permanence and stability of the boot item configuration. This threshold can be flexibly adjusted according to the data center operation and maintenance scenario. For example, in high-frequency single startup requirements, the threshold can be shortened to improve response efficiency, or in low-frequency scenarios, the threshold can be extended to increase operation fault tolerance time. Through dynamic timing and automatic clearing mechanisms, a balance between the temporary nature and reliability of startup commands can be achieved.
[0057] In some embodiments, after storing the first startup command in the baseboard controller, the method further includes: When the storage time of the startup command in the baseboard controller is less than the preset time threshold and the basic input and output system obtains the startup command, the startup command is deleted.
[0058] The BMC starts timing after receiving the boot command. When the BIOS reads the command parameters through the interactive protocol within the timing period, the BMC clears the boot command data in the NVRAM / EEPROM after completing the data transmission and updates the status flag to "executed". This operation ensures that a single boot command becomes invalid only after being effectively acquired by the BIOS, preventing unused commands from continuously occupying storage resources or accidentally affecting subsequent boot processes. The deletion logic and the timing mechanism work together - if the storage time does not reach the threshold but the BIOS has acquired the command, the boot command is deleted because it is "executed"; if the storage time exceeds the threshold, it is automatically deleted regardless of whether it has been acquired, thus forming a double protection mechanism, which not only guarantees the temporary validity of a single boot command, but also maintains the cleanliness of the BMC storage space through immediate deletion, ensuring the dynamic adjustment of the server boot policy and the permanent non-interference of the default boot item, and providing a reliable timing and clearing strategy for the automated operation and maintenance of batch servers in the data center.
[0059] In some embodiments, when the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system obtains the startup command, deleting the startup command further includes: Determining whether the parameters of the startup command are valid based on Intelligent Platform Management Interface (IPMI) commands.
[0060] When the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the BIOS obtains the command, the logic for deleting the startup command further includes: verifying the validity of the parameters of the startup command through IPMI commands. Specifically, when the BIOS reads the startup command from the BMC through the IPMI protocol, the BMC first triggers the IPMI command verification process - through system commands, query whether the stored startup parameters conform to the preset format, such as whether the parameter values corresponding to PXE startup are valid. If the returned parameter values are consistent with the preset startup sequence and the check code is correct, it is determined that the parameters are valid, and the BMC immediately deletes the startup command in the NVRAM / EEPROM after transmitting the command data to the BIOS; if the parameter values are abnormal, such as non-PXE identification, data verification failure, or format error, the command is ignored and the default startup sequence is maintained. At the same time, the BMC clears the invalid parameters to avoid mis-triggering. This mechanism completes the verification of parameter validity synchronously when the startup command is obtained by the BIOS through the standardized command interaction of the IPMI protocol, ensuring that the single startup logic is executed and the command is deleted only when the parameters are legal. This not only avoids startup anomalies caused by invalid parameters but also maintains the cleanliness of the BMC storage through the immediate deletion mechanism, ensuring the reliability of the server startup policy and the permanence of the default startup item.
[0061] In some embodiments, the startup command is for Pre-Boot Execution Environment (PXE) startup.
[0062] 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. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation.
[0063] The embodiments of the present application further provide a startup device for a server, Figure 5 which is a schematic structural diagram of a startup device for a server provided by the embodiments of the present application, as Figure 5 shown, A startup unit 21, configured to start a target server in response to a startup command; wherein, the startup command includes a preset startup sequence; An adjustment unit 22, configured to store the default startup sequence in a preset array and adjust the default startup sequence to the preset startup sequence when it is determined that the startup command is a single startup; An execution unit 23, configured to start a device group based on the preset startup sequence, and adjust the preset startup sequence to the default startup sequence based on the preset array after the device group starts up successfully.
[0064] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 6 shown, the device further includes: A generation unit 24, configured to generate the first startup command in response to a single startup instruction before the startup unit 21 starts the target server in response to a startup command, and store the startup command in the baseboard controller so that the basic input / output system can obtain the startup command.
[0065] Further, in a possible implementation manner of the embodiments of the present disclosure, the adjustment unit 22 is further configured to: The basic input / output system obtains the return value of the startup command in the baseboard controller; Determine whether the startup command is a single startup according to the return value, and create the preset array when it is determined that the startup command is a single startup; Store the default startup sequence into the preset array, and adjust the default startup sequence to the preset startup sequence.
[0066] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 6 shown, the device further includes: An acquisition unit 25, configured to, after the startup unit 21 starts the target server in response to a startup command, the basic input / output system obtains the return value of the startup command in the baseboard controller; A setting unit 26, configured to determine whether the startup command is a single startup according to the return value, and set the next startup item parameter to the preset startup sequence when it is determined that the startup command is a single startup; A startup unit 27, configured to start the device group according to the preset startup sequence included in the next startup item parameter.
[0067] Further, in a possible implementation manner of the embodiments of the present disclosure, the execution unit 23 is further configured to: Obtain the next startup item parameter, and determine whether it is a pre-start execution environment startup based on the value of the next startup item parameter; When it is determined that it is a pre-start execution environment startup, start the device group according to the preset startup sequence included in the next startup item parameter.
[0068] Further, in a possible implementation manner of the embodiments of the present disclosure, asFigure 6 As shown, the device further includes: A determination unit 28, configured to, after an adjustment unit 22 starts a device group based on the preset startup sequence and adjusts the preset startup sequence to the default startup sequence based on the preset array after the device group startup is completed, read the default startup sequence based on a system configuration management tool, and determine whether the default startup sequence has changed.
[0069] Further, in a possible implementation manner of the embodiments of the present disclosure, the device further includes: The determination unit 28 is further configured to, after the setup unit 26 determines to start in a pre-boot execution environment, start the device group according to the preset startup sequence included in the next startup item parameter, and then read the default startup sequence based on a system configuration management tool, and determine whether the default startup sequence has changed.
[0070] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 6 shown, the device further includes: A deletion unit 29, configured to, after a generation unit 24 stores the first startup command in a baseboard controller, delete the startup command when the storage duration of the startup command in the baseboard controller is greater than or equal to a preset time threshold.
[0071] Further, in a possible implementation manner of the embodiments of the present disclosure, the device further includes: The deletion unit 29 is further configured to, after the generation unit 24 stores the first startup command in the baseboard controller, delete the startup command when the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system obtains the startup command.
[0072] Further, in a possible implementation manner of the embodiments of the present disclosure, the deletion unit 29 is further configured to: Determine whether the parameters of the startup command are valid based on an Intelligent Platform Management Interface command.
[0073] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 5 shown, the startup command is a pre-boot execution environment startup.
[0074] For the description of the features in the corresponding embodiments of the startup device of the server, reference may be made to the relevant description in the corresponding embodiments of the startup method of the server, which will not be elaborated here one by one.
[0075] An embodiment of the present application further 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 any of the above-mentioned server startup method embodiments.
[0076] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-mentioned server startup method embodiments when running.
[0077] In an exemplary embodiment, the above-mentioned 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.
[0078] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-mentioned server startup method embodiments.
[0079] An embodiment of the present application further 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, it implements the steps in any of the above-mentioned server startup method embodiments.
[0080] 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 the present application.
[0081] The above has introduced in detail a server startup method, device, electronic device, and storage medium provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A method for starting a server, characterized in that, Including: In response to a startup command, start the target server; wherein, the startup command includes a preset startup sequence. When it is determined that the startup command is a single startup, store the default startup sequence in a preset array, and adjust the default startup sequence to the preset startup sequence. Execute the startup of the device group based on the preset startup sequence, and after the device group startup is completed, adjust the preset startup sequence to the default startup sequence based on the preset array.
2. The startup method of the server according to claim 1, wherein, Before starting the target server in response to a startup command, the method further includes: In response to a single startup instruction, generate the startup command and store the startup command in the baseboard controller so that the basic input / output system can obtain the startup command.
3. The startup method of the server according to claim 2, characterized in that, The step of when it is determined that the startup command is a single startup, storing the default startup sequence in a preset array, and adjusting the default startup sequence to the preset startup sequence includes: The basic input / output system obtains the return value of the startup command in the baseboard controller. Determine whether the startup command is a single startup according to the return value, and when it is determined that the startup command is a single startup, create the preset array. Store the default startup sequence in the preset array, and adjust the default startup sequence to the preset startup sequence.
4. The startup method of the server according to claim 1, wherein After starting the target server in response to a startup command, the method further includes: The basic input / output system obtains the return value of the startup command in the baseboard controller. Determine whether the startup command is a single startup according to the return value, and when it is determined that the startup command is a single startup, set the next startup item parameter to the preset startup sequence. Execute the startup of the device group according to the preset startup sequence included in the next startup item parameter.
5. The startup method of the server according to claim 4, characterized in that The step of executing the startup of the device group according to the preset startup sequence included in the next startup item parameter includes: Obtain the next startup item parameter, and determine whether it is a pre-boot execution environment startup based on the value of the next startup item parameter. When it is determined that it is a pre-boot execution environment startup, execute the startup of the device group according to the preset startup sequence included in the next startup item parameter.
6. The startup method of the server according to claim 1, characterized in that After executing the startup of the device group based on the preset startup sequence, and after the device group startup is completed, adjusting the preset startup sequence to the default startup sequence based on the preset array, the method further includes: Read the default startup sequence based on the system configuration management tool, and determine whether the default startup sequence has changed.
7. The startup method of the server according to claim 4, wherein After executing the startup of the device group according to the preset startup sequence included in the next startup item parameter when it is determined that it is a pre-boot execution environment startup, the method further includes: Read the default startup sequence based on the system configuration management tool, and determine whether the default startup sequence has changed.
8. The startup method of the server according to claim 2, wherein, After storing the startup command in the baseboard controller, the method further includes: When the storage duration of the startup command in the baseboard controller is greater than or equal to a preset time threshold, delete the startup command.
9. The startup method of the server according to claim 8, characterized in that, After storing the startup command in the baseboard controller, the method further includes: When the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system acquires the startup command, delete the startup command.
10. The startup method of the server according to claim 9, wherein, When the storage duration of the startup command in the baseboard controller is less than the preset time threshold and the basic input / output system acquires the startup command, deleting the startup command further includes: Determine whether the parameters of the startup command are valid based on the Intelligent Platform Management Interface command.
11. The startup method of the server according to any one of claims 1-10, characterized in that, The startup command is for Pre-Boot eXecution Environment startup.
12. A startup device for a server, characterized in that, It includes: A startup unit, configured to start a target server in response to a startup command; wherein, the startup command includes a preset startup sequence; An adjustment unit, configured to store the default startup sequence in a preset array and adjust the default startup sequence to the preset startup sequence when it is determined that the startup command is a single startup; An execution unit, configured to start a device group based on the preset startup sequence and adjust the preset startup sequence to the default startup sequence based on the preset array after the device group starts up.
13. An electronic device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the startup method of the server according to any one of claims 1 to 11 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 the computer program, when executed by a processor, implements the steps of the startup method of the server according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the startup method of the server according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for adjusting starting priority among equipment groups
CN119847774A
Starting method for pre-starting execution environment, computer equipment and related products
CN119902811A
Cited By
Server starting method and device, electronic equipment, medium and program product
CN120723341A
Service file processing method and electronic equipment
CN120994273A
A service file processing method and electronic device
CN120994273B