Server starting method and device, storage medium and program product
By receiving server startup commands and obtaining startup control information and flag bits, dynamic startup sequence adjustments are made to the peripheral devices of tens of thousands of servers in the data center, solving the problem of low manual adjustment efficiency, improving the startup sequence adjustment efficiency and preset sequence preset order is retained.
Patent Information
- Application Number
- CN202510333029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-03-20
AI Technical Summary
In the data center, the startup sequence of peripheral devices of tens of thousands of servers requires manual adjustment, resulting in low efficiency in adjusting the startup sequence.
By receiving the server startup command, it is determined whether there is a startup control request, obtains the startup control information and the startup flag bits, and starts multiple peripheral devices based on these information, thereby realizing the modification of the target startup sequence.
It improves the efficiency of adjusting the startup sequence of peripheral devices, ensures dynamic adjustment of the startup sequence, and retains the preset startup sequence to ensure that the next startup is carried out in the preset sequence.
Smart Images

Figure CN119861985A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a server startup method, device, storage medium and program product. Background Art
[0002] The server can expand hardware capabilities, improve data interaction efficiency, and ensure system reliability through peripheral devices to ensure stable operation of the server in complex scenarios.
[0003] In the related art, when the server is started, each peripheral device can be started accordingly, and when each peripheral device is started, it has its corresponding default startup order. If you need to change the target startup order of each peripheral device, you can enter the Setup interface of the Basic Input Output System (BIOS) during the server startup process and manually adjust the startup order. However, in the data center, tens of thousands of servers adjust the startup order manually, which makes the adjustment efficiency of the startup order of peripheral devices low. Summary of the invention
[0004] The present application provides a server startup method, device, storage medium and program product to at least solve the problem of low efficiency in adjusting the startup sequence of peripheral devices in the related art.
[0005] In a first aspect, the present application provides a method for starting a server, which is applied to the server, and the server includes multiple peripheral devices. The method includes:
[0006] Receive server startup command;
[0007] Determine, according to the server startup command, response data corresponding to the startup control request, the response data is used to indicate whether there is a startup control request, and the startup control request is used to adjust the target startup sequence of multiple peripheral devices;
[0008] According to the response data, obtaining the start control information corresponding to the start control request and the start flag corresponding to the start control request;
[0009] According to the startup control information and the startup flag, startup processing is performed on multiple peripheral devices.
[0010] In a second aspect, the present application provides a server startup device, which is applied to the server, the server includes multiple peripheral devices, and the device includes a first receiving module, a first determining module, a first acquiring module and a startup processing module:
[0011] The first receiving module is used to receive a server startup command;
[0012] The first determination module is used to determine, according to the server startup command, response data corresponding to the startup control request, the response data is used to indicate whether there is a startup control request, and the startup control request is used to adjust the target startup sequence of multiple peripheral devices;
[0013] The first acquisition module is used to acquire the startup control information corresponding to the startup control request and the startup flag corresponding to the startup control request according to the response data;
[0014] The startup processing module is used to perform startup processing on multiple peripheral devices according to the startup control information and the startup flag.
[0015] In a third aspect, the present application further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server startup methods when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned server startup methods.
[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server startup methods when executed by a processor.
[0018] Through the server startup method, device, storage medium and program product provided by the present application, after receiving the server startup command, if there is a startup control request, multiple peripheral devices are started according to the startup control information and startup flag corresponding to the startup control request, so that the target startup sequence of multiple peripheral devices can be modified, and the adjustment efficiency of the startup sequence can be improved. At the same time, the preset startup sequence of multiple peripheral devices will not be modified, ensuring that the next startup can start multiple peripheral devices according to the preset startup sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of a process flow of a method for starting a server provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of another method for starting a server provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of the architecture of a method for starting a server provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of the structure of a server startup device provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of the structure of another server startup device provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0030] The server can expand hardware capabilities, improve data interaction efficiency, and ensure system reliability through peripheral devices to ensure stable operation of the server in complex scenarios.
[0031] For servers with different architectures, the server can be configured with multiple peripheral devices, which may include PCI network cards with Peripheral Component Interconnect (PCI) interfaces, PCI redundant array of independent disks (RAID) cards, PCI Open Compute Project (OCP) network cards, PCI non-volatile memory host controller interface specification (NVME) hard disks, serial advanced technology attachment hard disks (SATA) hard disks, compact disc-read only memory (CD-ROM), digital versatile disc-read only memory (DVD-ROM), universal serial bus (USB) network cards, USB hard disks, etc.
[0032] Each peripheral device has a specific corresponding priority. When the server starts, each peripheral device can be started according to the priority corresponding to each peripheral device. In the related art, the preset startup sequence corresponding to each peripheral device can be stored in the server. When each peripheral device is started, each peripheral device is started according to the preset startup sequence. If you need to change the startup sequence of each peripheral device, you can enter the Setup interface of the Basic Input Output System (BIOS) during the server startup process and manually adjust the startup sequence. However, in the data center, tens of thousands of servers adjust the startup sequence manually, which makes the adjustment efficiency of the startup sequence low.
[0033] In the embodiment of the present application, after receiving the server startup command, if there is a startup control request, multiple peripheral devices are started according to the startup control information and the startup flag corresponding to the startup control request, so that the target startup sequence of multiple peripheral devices can be modified, and the adjustment efficiency of the startup sequence can be improved. At the same time, the preset startup sequence of multiple peripheral devices will not be modified, ensuring that the next startup can start multiple peripheral devices according to the preset startup sequence.
[0034] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0035] In combination with the specific application environment architecture or specific hardware architecture on which the execution of the server heat dissipation control method depends, the specific application environment architecture or specific hardware architecture is described here. Figure 1 and Figure 2 .
[0036] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 , including a server 101 and a remote control device 102.
[0037] The server 101 may be connected to the remote control device 102 for communication. The server 101 may receive a start control request sent by the remote control device 102. The start control request may be used to adjust a target start sequence of multiple peripheral devices.
[0038] Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application. Figure 2 The server 101 may include two central processing units (CPUs), namely CPU0 and CPU1, a basic input output system (BIOS), a baseboard management controller (BMC), a preboot eXecution Environment (PXE) operating system, etc.
[0039] The two CPUs (CPU0 and CPU1) communicate through the CCIX / UPI / GMI bus, where CCIX is the abbreviation of Cache Coherent Interconnect for Accelerators, which is designed to accelerate data transmission between processors and accelerators. UPI is the abbreviation of Ultra Path Interconnect, which is a high-speed interconnect technology that can be used to connect multiple processors to achieve efficient communication and data sharing in multi-processor systems. GMI is the abbreviation of Global Memory Interconnect, which is a high-speed interconnect technology used to connect processors and memories, and is designed to provide high-bandwidth and low-latency memory access capabilities.
[0040] The two CPUs are connected to multiple peripheral devices through the Peripheral Component Interconnect (PCI) interface. Figure 2 , CUP0 is connected to 4 NVMe hard drives (NVMe hard drive 0, NVMe hard drive 1, NVMe hard drive 2 and NVMe hard drive 3) and network card 0, and CUP1 is connected to CD-ROM0 and 4 NVMe hard drives (NVMe hard drive 4, NVMe hard drive 5, NVMe hard drive 6 and NVMe hard drive 7).
[0041] BMC is connected to CPU0 through LPC / PCI bus, where LPC is short for Low Pin Count Interface. BMC communicates with BIOS through Intelligent Platform Management Interface (IPMI) protocol. BMC can also communicate with CPU0 through preset interface management protocol (ie, Redfish protocol) to manage and monitor CPU0 and its related devices.
[0042] BIOS and CPU0 communicate through LPC / SPI / QSPI bus, where SPI is short for Serial Peripheral Interface in English and QSPI is short for Quad SPI, which expands the number of data lines based on SPI and supports higher bandwidth and complex operation modes. CPU1 is connected to USB keyboard hotkey through USB interface 1 and to USB disk through USB interface 2.
[0043] In the BMC management interface of the remote control device 102, the user can set the target startup sequence of multiple peripheral devices, and the remote control device 102 can generate a startup control request and send the startup control request to the server 101. The BMC of the server 101 can receive the startup control request, which includes startup control information, and can store the startup control request in the first storage device.
[0044] After receiving the server startup command, the server 101 can determine the response data corresponding to the startup control request according to the server startup command, and the response data can be used to indicate whether there is a startup control request. The server 101 can obtain the startup control information corresponding to the startup control request and the startup flag corresponding to the startup control request according to the response data, and perform startup processing on multiple peripheral devices according to the startup control information and the startup flag.
[0045] Figure 3A flowchart of a method for starting a server provided in an embodiment of the present application. Figure 3 , the method may include:
[0046] S301, receiving a server startup command.
[0047] Before receiving the server startup command, a startup control request can be received, the startup control request including startup control information; the startup control information can be stored in a first storage device, and the flag data corresponding to the startup flag bit can be determined as the first flag data; if the startup duration is greater than the preset duration, the flag data corresponding to the startup flag bit can be updated to the second flag data.
[0048] In this application, the timeliness of the start control request is monitored through the start flag. Once the start control request times out, the start control request will be invalidated. This can prevent malicious requests from occupying server resources or attacking the server through the start control request, thereby improving the security of the server.
[0049] The server can receive a start control request sent by a remote control device when the server is in a shutdown state or when the operating system of the server is in a startup state.
[0050] When the server is powered off, the received startup control request may be ipmitool.exe chassisbootdev PXE; when the server operating system is powered on, the received startup control request may be ipmitool.exe –I lanplus -H XX.XX.XX.XX(BMC IP address) –U BMC user name –P BMC password chassis bootdev PXE.
[0051] Among them, "ipmitool.exe" is the executable file of the IPMI tool, which can be used to interact with the server's baseboard management controller (BMC) through the command line. "I lanplus" specifies the use of the lanplus interface type, which is an enhanced protocol of IPMI and supports encrypted communication (such as RMCP+), which is safer than the traditional lan interface. "H XX.XX.XX.XX" is used to specify the BMC management IP address of the server and needs to be replaced with the actual BMC IP. "U BMC Username" and "P BMC Password" are used to provide credentials for logging in to the BMC. For example, the username is ADMIN, and the password needs to be filled in according to the actual configuration and is case-sensitive. "chassis" indicates operating chassis-related functions, the "bootdev" subcommand is used to set the boot device, and "PXE" specifies booting from the network (Preboot eXecution Environment) at the next startup.
[0052] The BMC can run independently of the server's CPU, BIOS, and operating system. Even if the server loses power or the operating system crashes, the administrator can still remotely turn on, off, restart, or force reset the server through the BMC.
[0053] The server can receive a startup control request sent by a remote control device through the BMC.
[0054] In some embodiments, when the operating system of the server is turned on, a startup control request may be sent to the BMC through the operating system.
[0055] The boot control request can be used to adjust the target boot sequence of multiple peripheral devices in the server.
[0056] The startup control information may be stored in a first storage device corresponding to the BMC, and the first storage device may be a non-volatile memory that can retain data even after power failure, which means that after power is turned off, the first storage device can still maintain data integrity.
[0057] The first storage device may be a non-volatile random access memory (NVRAM) or an electrically erasable programmable read-only memory (EEPROM).
[0058] After receiving the startup control request, the BMC determines the flag data corresponding to the startup flag as the first flag data and performs automatic timing. When the startup duration exceeds the preset duration, the flag data corresponding to the startup flag can be updated to the second flag data, and the startup control information can be deleted in the first storage device, regardless of whether multiple preset devices in the server have been started.
[0059] The first flag data may be used to indicate that the start control request has not timed out, and the second flag data may be used to indicate that the start control request has timed out.
[0060] The startup duration may be used to indicate the duration of receiving the startup control request.
[0061] In some possible embodiments, the preset duration may be 3 minutes.
[0062] The server startup command may be a Power Cycle command or a power button command.
[0063] The Power Cycle command refers to the chassis power cycle command that can be executed through IPMI. The Power Cycle command will first completely cut off the server power supply (enter the S5 shutdown state), wait for about 1-10 seconds, and then power on again, which is equivalent to simulating a complete power cycle of physical power off and then on.
[0064] The power button command refers to the short press operation of the physical power button, which can correspond to the IPMI power on command, and only triggers the power-on process without going through the complete power-off stage.
[0065] S302: Determine response data corresponding to the startup control request according to the server startup command.
[0066] After the remote control device sends a startup control request to the BMC, the BMC generates response data, which may indicate whether a startup control request exists. The startup control request is used to adjust the target startup sequence of multiple peripheral devices.
[0067] After receiving the server startup command, the server may start the BIOS, and the BIOS may read the response data in the BMC through the first interface management protocol.
[0068] The BIOS performs a Power-On Self Test (POST) at startup to check whether the hardware is normal, and then loads the boot program according to the set boot sequence.
[0069] In the present application, the BIOS can load and start the boot programs corresponding to multiple peripheral devices according to the target boot sequence corresponding to the boot control request.
[0070] S303: Acquire the start control information corresponding to the start control request and the start flag corresponding to the start control request according to the response data.
[0071] The startup control information may include the startup times and the target startup sequence of the plurality of peripheral devices.
[0072] The flag data corresponding to the startup flag may include first flag data and second flag data. The first flag data may be used to indicate that the startup duration corresponding to the startup control request is less than or equal to a preset duration, and the second flag data may be used to indicate that the startup duration is greater than a preset duration.
[0073] S304: Perform startup processing on multiple peripheral devices according to the startup control information and the startup flag.
[0074] In some possible embodiments, the startup flag bit can be used to determine whether the startup control request is invalid; if not, multiple peripheral devices are started according to the startup control information; if so, multiple peripheral devices are started according to a preset startup sequence.
[0075] Specifically, when the start control request is not received or the start duration of the start control request times out, the start control request becomes invalid.
[0076] The server startup method provided by the embodiment of the present application can, after receiving the server startup command, start multiple peripheral devices according to the startup control information and startup flag corresponding to the startup control request if there is a startup control request, and can modify the startup sequence of multiple peripheral devices, improve the adjustment efficiency of the startup sequence, and realize dynamic adjustment of server startup. At the same time, the preset startup sequence of multiple peripheral devices will not be modified, ensuring that the next startup can start multiple peripheral devices according to the preset startup sequence.
[0077] Figure 4 A flowchart of another method for starting a server provided in an embodiment of the present application. Figure 4 , the method may include:
[0078] S401: Receive a server startup command.
[0079] The execution process of S401 can refer to the execution process of S301, which will not be repeated here.
[0080] S402: Determine a first interface management protocol between a basic input / output system and a baseboard management controller according to a server startup command.
[0081] The first interface management protocol may be an IPMI protocol, and the IPMI protocol may be used as a core protocol between remote monitoring and hardware management.
[0082] Among them, the baseboard management controller BMC can be used for remote monitoring.
[0083] BIOS can be the first firmware that runs when the server starts up, and can be responsible for initializing the hardware and booting the operating system. BIOS can load the boot program of the operating system according to the preset boot sequence (such as hard disk, USB, network PXE).
[0084] In the present application, the baseboard management controller and the basic input / output system communicate through the first interface management protocol, and the baseboard management controller can adjust the preset startup sequence when starting multiple peripheral devices in the basic input / output system according to the preset startup sequence.
[0085] S403: Acquire response data in the baseboard management controller according to the first interface management protocol.
[0086] The basic input and output system BIOS may obtain the response data through the first interface management protocol, wherein the data structure of the response data in the baseboard management controller BMC may be a data structure set in the first interface management protocol.
[0087] In some possible embodiments, the response data may be a first value or a second value, the first value is used to indicate the existence of the start control request, and the second value is used to indicate the absence of the start control request. For example, the first value may be 0, and the second value may be 1.
[0088] In some other embodiments, the number of bits of the first bit (i.e., bit0) of the response data may be obtained to indicate whether there is a start control request. For example, if bit0 is 1, there is a start control request; if bit0 is 0, there is no start control request.
[0089] It is worth noting that the startup sequence of the server's peripheral devices may be adjusted in the preset interface management protocol.
[0090] Specifically, it can be determined whether the preset interface management protocol has a first startup sequence; if not, the response data is obtained through the first interface management protocol. If yes, the first startup sequence is obtained; and the plurality of peripheral devices are started according to the first startup sequence.
[0091] The preset interface management protocol may be the Redfish protocol. The Redfish protocol is a server management standard based on the REpresentational State Transfer (REST) architecture and is developed by the Distributed Management Task Force (DMTF). The Redfish protocol is intended to provide an open, scalable, and secure out-of-band management solution for modern data centers.
[0092] The first startup sequence is the preset startup sequence in the Redfish protocol.
[0093] If the first startup sequence exists in the Redfish protocol, the first startup sequence is given priority. If not, multiple peripheral devices are started according to the startup control request in this application.
[0094] It is worth noting that the target boot order is the boot order corresponding to the boot control request, the preset boot order is the boot order in the BIOS, and the priority of each boot order is: the first boot order is greater than the target boot order, and the target boot order is greater than the preset boot order.
[0095] S404: Determine whether the response data is the first value.
[0096] If yes, execute step S405;
[0097] If not, start it according to the preset startup sequence.
[0098] S405: If yes, obtain the startup control information in the first storage device, and obtain the startup flag in the baseboard management controller.
[0099] The start flag bit can be used to indicate whether the start control request has timed out.
[0100] After receiving the startup control request, the baseboard management controller BMC will time the startup duration of the received startup control request. If the startup duration is greater than the preset duration, the startup control request times out and the flag data of the startup flag bit is determined as the second flag data.
[0101] In some possible embodiments, the first flag data may be 1, and the second flag data may be 0.
[0102] For example, before receiving the start control request, the flag data of the start flag bit can be 0. After receiving the start control request, the flag data of the start flag bit can be updated to 1. After the start duration is greater than the preset duration, the flag data of the start flag bit can be updated to 0.
[0103] In some possible embodiments, a third flag data is further included, and the third flag data is used to indicate that there is no start control request. The first flag data may be 01, the second flag data may be 10, and the third flag data may be 00.
[0104] For example, before receiving the start control request, the flag data of the start flag can be 00. After receiving the start control request, the flag data of the start flag can be updated to 01. After the start duration is greater than the preset duration, the flag data of the start flag can be updated to 10.
[0105] In some possible embodiments, the BMC may include multiple startup parameters, the multiple startup parameters include flag data corresponding to the startup flag bit, and the flag data corresponding to the startup flag bit can be obtained from the multiple startup parameters through a query command.
[0106] In this application, you can query through remote control commands or system commands, where remote control commands are used to instruct execution in the server's operating system to communicate directly with the local BMC without connecting through an external network, but the ipmitool tool must be installed in the system. System commands are used to instruct remote connection to the BMC from an external device (such as a remote control terminal or an automation platform), which is suitable for cross-network management.
[0107] For example, if the boot flag is the fifth boot parameter, you can use the following two commands to obtain the boot flag: remote control command: ipmitool.exe chassis bootparam get 5; or, system command: ipmitool.exe –I lanplus -H XX.XX.XX.XX(bmc ip address) –U BMC user name –P BMC password chassis bootparam get 5.
[0108] Among them, "chassis bootparam get 5" is used to instruct to query the 5th boot parameter, which corresponds to the Boot Flags in the IPMI specification and is used to view the current boot device configuration and effective range.
[0109] In some possible embodiments, after the startup control information is acquired in the first storage device, the startup control information in the first storage device may be deleted to relieve the storage pressure of the first storage device.
[0110] S406: Determine whether the startup control request is invalid according to the startup flag.
[0111] In some possible embodiments, if the flag data corresponding to the start flag is the first flag data, the start control request is not invalid; if the flag data corresponding to the start flag is the second flag data, the start control request is invalid.
[0112] In some possible embodiments, if the flag data corresponding to the start flag is the first flag data, the start control request is not invalid; if the flag data corresponding to the start flag is the second flag data or the third flag data, the start control request is invalid.
[0113] If yes, then the plurality of peripheral devices are started up according to a preset start-up sequence;
[0114] If not, execute step S407.
[0115] S407: If not, determine the startup type corresponding to the startup control request according to the startup times.
[0116] The startup control information may include the startup times. When the user sets the target startup sequence of multiple peripheral devices in the remote control device, the startup times of the startup control request may be set.
[0117] The startup type can include single startup and multiple startup.
[0118] If the number of startup times is 1, the startup type is single startup. If the number of startup times is greater than 1, the startup type is multiple startup.
[0119] It is worth noting that, usually, users can set single start and permanent start. Permanent start can be a special case of multiple starts. When the number of starts is set to a larger value, it is a permanent start.
[0120] S408: If the startup type is a single startup, the startup process is performed on the multiple peripheral devices according to the target startup sequence.
[0121] The target startup sequence may be a startup sequence queue of multiple peripheral devices, and each peripheral device is started in sequence according to the startup sequence queue.
[0122] In some possible embodiments, the startup sequence queue may include multiple peripheral device groups, each peripheral device group includes at least one peripheral device. In the startup sequence queue, each peripheral device group may be prioritized, and for any peripheral device group, each peripheral device may be prioritized.
[0123] Multiple peripheral devices may be grouped according to different methods, such as the type of interface connecting the device and the type definition of the device.
[0124] In some possible embodiments, each peripheral device may include a network card device group, a hard disk device group, a CD / DVD-ROM device group, and an Others device group. The network card device group may include a PCI interface network card, an OCP network card, an HCA card, or an HBA card, etc.; the hard disk device group may include an NVME type storage device; the CD / DVD-ROM device group may include an optical drive or a DVD device; and the Others device group may include the remaining devices.
[0125] For example, the preset boot sequence may be the network card device group, the hard disk device group, the CD / DVD-ROM device group, and the Others device group; the target boot sequence may be the hard disk device group, the CD / DVD-ROM device group, the network card device group, and the Others device group.
[0126] In some possible embodiments, different interface forms may be used to group peripheral devices, for example, USB devices and PCI devices, where USB devices may include USB network cards, USB hard disks, USB flash drives, etc., and PCI devices may include network cards with PCI interfaces and OCP network cards with PCI interfaces.
[0127] In the present application, at least one peripheral device in each peripheral device group may be started up in sequence.
[0128] It is worth noting that in this application, no modification is made to the hotkey function. When a hotkey input is received, the hotkey function needs to be executed immediately. For example, the F11 hotkey executes the boot device selection function, the Del hotkey executes the BIOS Setup interface function, etc.
[0129] The Setup interface of BIOS is the configuration interface entered when the computer starts. It is mainly used to manage and adjust hardware settings to ensure the normal operation of the system.
[0130] S409: If the startup type is multiple startups, store the target startup sequence in the second storage device.
[0131] If the startup type is multiple startups, the target startup sequence needs to be stored in the second storage device, so that the target startup sequence can be directly obtained from the second storage device during the next startup.
[0132] The second storage device may be an NVRAM area of BIOS.
[0133] In some possible embodiments, the current startup times of the server may be recorded, and when the current startup times are equal to the startup times corresponding to the multiple startups, the target startup sequence in the second storage device is deleted.
[0134] S410: Perform startup processing on multiple peripheral devices according to a target startup sequence.
[0135] The execution process of step S410 can refer to the execution process of step S408, which will not be repeated here.
[0136] In some possible embodiments, after the startup process of multiple peripheral devices is performed, the operating system can be started through the pre-start execution environment; in the operating system, a preset startup sequence is obtained and the preset startup sequence is checked.
[0137] During the server startup process, the Pre-boot Execution Environment (PXE) can be used to obtain and start the operating system from a remote server through the network when the computer has no local storage device (such as a hard disk).
[0138] PXE can be built into the BIOS firmware. During startup, the BIOS will load the PXE client program in the network card ROM into the memory, and PXE will initiate a network request.
[0139] In the operating system, you can use the Server Configuration Engine (SCE) tool to obtain the preset startup sequence.
[0140] The SCE tool is a utility that can access the underlying firmware configuration of the server after the operating system is running. Its core function is to read or modify hardware layer settings through the baseboard management controller (BMC) or firmware interface.
[0141] At this time, the preset startup sequence is still the default startup sequence, and the startup control request will not modify the preset startup sequence.
[0142] In some possible embodiments, the operating system can be started in the following manner: an event function corresponding to a start control request is generated; based on the event function, a hot key of a pre-boot execution environment is simulated to generate a virtual hot key for starting the pre-boot execution environment; and based on the virtual hot key, the operating system is started.
[0143] At the end of the Driver Execution Environment (DXE) phase of the BIOS, an event function named End of DXE Event is usually created. The event function can be a custom event group. Its core function is to notify the system to prepare to enter the BDS phase (Boot Device Selection) after all drivers are loaded and initialized in the DXE phase, and gradually transfer control to the operating system.
[0144] Hotkeys are shortcuts that trigger specific functions in a computer system through predefined key combinations. Their core goal is to improve efficiency by reducing the number of operation steps. They are widely used at different levels, such as firmware (such as BIOS / UEFI), operating systems (such as Windows / macOS), and applications (such as Photoshop).
[0145] In some possible embodiments, the preset startup sequence may be updated to the target startup sequence.
[0146] When the preset startup sequence is verified, the target startup sequence has been modified to the preset startup sequence, which is consistent with the expected startup sequence.
[0147] After the server is started according to the startup control request, the server can be restarted or shut down and then turned on. When the BIOS restarts, it starts normally according to the preset startup sequence and enters the operating system. The operating system reads the preset startup sequence through the SCE tool. The preset startup sequence can be the network card device group, hard disk device group, CD / DVD-ROM device group and Others device group, which conforms to the default startup sequence.
[0148] After entering the operating system, use the SCE tool to export the preset boot order and confirm whether it is consistent with the default and permanent boot order. When the boot is completed and restarted, the server's BIOS will boot according to the default and permanent grouping information (that is, the preset boot order) during the boot process. When entering the system again, use the SCE tool to export the boot item grouping order information and confirm whether it is the permanent default boot item grouping order. This can avoid manual operation of the BIOS Setup interface to adjust the boot order, and there is no need to adjust the default permanent boot order. The PXE function boot function can be realized. In addition, it can ensure that during the boot process, the hotkey function execution takes precedence over the actual demand for a single boot of the IPMI command, which can improve the reliability of server boot.
[0149] After the IPMI single boot setting is completed, the hotkey function can still be executed. You only need to use the SCE tool to export whether the preset boot sequence meets your expectations. This will not change the hotkey function, making the operation convenient.
[0150] The server startup method provided by the embodiment of the present application can determine whether the startup control request is invalid according to the startup flag after receiving the server startup command if there is a startup control request; if it is not invalid, the startup type corresponding to the startup control request can be determined according to the number of startups; and multiple peripheral devices can be started according to the startup type and the target startup sequence. The target startup sequence of multiple peripheral devices can be modified to improve the adjustment efficiency of the startup sequence. In addition, by judging whether the startup control request is invalid through the startup flag, malicious requests can be prevented from occupying server resources or attacking the server through the startup control request, thereby improving the security of the server.
[0151] Figure 5 A schematic diagram of the architecture of a method for starting a server provided in an embodiment of the present application. Figure 5The server may include an operating system, a baseboard management controller BMC and a basic input and output system BIOS. The baseboard management controller BMC may receive a startup control request. The startup control request may be sent through a remote control device when the server is powered off, or may be sent within the operating system when the operating system is powered on. The baseboard management controller BMC may store the startup control request in a first storage device, and enable a timing function to determine the startup duration corresponding to the startup control request.
[0152] If the basic input and output system BIOS receives the server startup command when the startup time is less than the preset time, the basic input and output system BIOS can install the first interface management protocol (i.e., IPMI protocol) in the DXE stage and determine whether the first interface management protocol is successfully installed. After the installation is successful, if the preset interface management protocol (i.e., Redfish protocol) supports the sequential startup of peripheral devices and there is a first startup sequence, the startup process of multiple peripheral devices is performed according to the first startup sequence; if the preset interface management protocol does not support the sequential startup of peripheral devices and there is no first startup sequence, or the preset interface management protocol does not support the sequential startup of peripheral devices, the basic input and output system BIOS can obtain the response data in the baseboard management controller.
[0153] If the response data is the second value, the multiple peripheral devices are started according to the preset start sequence; if the response data is the first value, the start control information is obtained in the first storage device, and the start flag is obtained in the baseboard management controller. It can be determined whether the start control request is invalid according to the start flag. If so, the multiple peripheral devices are started according to the preset start sequence; if not, the start type corresponding to the start control request is determined according to the start number in the start control information.
[0154] If the startup type is a single startup, the multiple peripheral devices are started according to the target startup sequence; if the startup type is multiple startups, the target startup sequence is stored in the second storage device, and the multiple peripheral devices are started according to the target startup sequence. If there is a hot key command input during the startup process, the hot key command is processed first.
[0155] The basic input and output system BIOS can generate an event function corresponding to the boot control request, simulate the hot key of the pre-boot execution environment according to the event function, generate a virtual hot key for starting the pre-boot execution environment, and start the operating system according to the virtual hot key. In the operating system, the preset boot sequence can be obtained and the preset boot sequence can be verified.
[0156] Figure 6 This is a schematic diagram of the structure of a server startup device provided in an embodiment of the present application. Figure 6 The server startup device 600 includes a first receiving module 601, a first determining module 602, a first obtaining module 603 and a startup processing module 604:
[0157] The first receiving module 601 is used to receive a server startup command;
[0158] The first determination module 602 is used to determine, according to the server startup command, response data corresponding to the startup control request, the response data is used to indicate whether there is a startup control request, and the startup control request is used to adjust the target startup sequence of multiple peripheral devices;
[0159] The first acquisition module 603 is used to acquire the startup control information corresponding to the startup control request and the startup flag corresponding to the startup control request according to the response data;
[0160] The startup processing module 604 is used to perform startup processing on multiple peripheral devices according to the startup control information and the startup flag.
[0161] In some possible embodiments, the startup processing module 604 is specifically used to:
[0162] According to the startup flag bit, determine whether the startup control request is invalid;
[0163] If not, the plurality of peripheral devices are started up according to the start control information.
[0164] In some possible embodiments, the flag data corresponding to the startup flag bit includes first flag data and second flag data, the first flag data is used to indicate that the startup duration corresponding to the startup control request is less than or equal to the preset duration, and the second flag bit data is used to indicate that the startup duration is greater than the preset duration;
[0165] The startup processing module 604 is specifically used for:
[0166] If the flag data corresponding to the start flag bit is the first flag data, the start control request is not invalid;
[0167] If the flag data corresponding to the start flag bit is the second flag data, the start control request is invalid.
[0168] In some possible embodiments, the startup control information includes the startup times and the target startup sequence of the plurality of peripheral devices; the startup processing module 604 is specifically used for:
[0169] According to the number of starts, determine the start type corresponding to the start control request, and the start type includes single start and multiple starts;
[0170] Perform startup processing on multiple peripheral devices according to the startup type and target startup sequence.
[0171] In some possible embodiments, the startup processing module 604 is specifically used to:
[0172] If the startup type is single startup, multiple peripheral devices are started according to the target startup sequence;
[0173] If the startup type is multiple startups, the target startup sequence is stored in the second storage device, and the startup process is performed on the multiple peripheral devices according to the target startup sequence.
[0174] Figure 7 This is a schematic diagram of the structure of another server startup device provided in an embodiment of the present application. Figure 7 The server startup device 600 further includes a startup module 605, a second acquisition module 606 and a verification processing module 607:
[0175] The startup module 605 is used to start the operating system of the server through the pre-start execution environment;
[0176] The second acquisition module 606 is used to acquire a preset startup sequence in the operating system;
[0177] The verification processing module 607 is used to verify the preset startup sequence.
[0178] In some possible embodiments, the startup module 605 is specifically used to:
[0179] Generate an event function corresponding to the start control request;
[0180] According to the event function, a hot key of the pre-boot execution environment is simulated to generate a virtual hot key for starting the pre-boot execution environment;
[0181] Start the operating system according to the virtual hot key.
[0182] In some possible embodiments, the server further includes a basic input and output system and a baseboard management controller; the first determination module 602 is specifically used for:
[0183] Determining a first interface management protocol between a basic input / output system and a baseboard management controller according to a server startup command;
[0184] According to the first interface management protocol, response data in the baseboard management controller is obtained.
[0185] In some possible embodiments, the first determining module 602 is specifically configured to:
[0186] Determine whether the preset interface management protocol has a first startup sequence;
[0187] If not, the response data is obtained through the first interface management protocol.
[0188] In some possible embodiments, the first determining module 602 is specifically configured to:
[0189] If yes, get the first startup sequence;
[0190] According to the first startup sequence, a startup process is performed on the plurality of peripheral devices.
[0191] In some possible embodiments, the first acquisition module 603 is specifically used for:
[0192] Determining whether the response data is a first value, where the first value is used to indicate that there is a start control request;
[0193] If yes, then the startup control information is obtained from the first storage device, and the startup flag is obtained from the baseboard management controller.
[0194] In some possible embodiments, the device further includes a second receiving module, a storage module, a second determining module, and an updating module:
[0195] The second receiving module is used to receive a start control request, where the start control request includes start control information;
[0196] The storage module is used to store the startup control information in the first storage device;
[0197] The second determining module is used to determine the flag data corresponding to the start flag bit as the first flag data;
[0198] The updating module is used to update the flag data corresponding to the startup flag bit to the second flag data if the startup duration is greater than the preset duration, and the startup duration is used to indicate the duration of receiving the startup control request.
[0199] For the description of the features in the embodiment corresponding to the server startup device, reference can be made to the relevant description of the embodiment corresponding to the server startup method, which will not be repeated here.
[0200] Figure 8 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 8 As shown, the electronic device 800 provided in this embodiment includes: at least one processor 801 and a memory 802. Optionally, the electronic device 800 further includes a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected via a bus.
[0201] In a specific implementation process, at least one processor 801 executes the computer execution instructions stored in the memory 802, so that at least one processor 801 executes the above-mentioned server startup method embodiment.
[0202] The specific implementation process of the processor 801 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0203] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0204] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0205] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0206] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned server startup method embodiments when running.
[0207] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0208] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned server startup method embodiments are implemented.
[0209] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned server startup method embodiments are implemented.
[0210] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0211] The above is a detailed introduction to a method for starting a server provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods 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 pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for starting a server, characterized in that: Applied to a server, the server includes a plurality of peripheral devices, and the method includes: Receive server startup command; Determine, according to the server startup command, response data corresponding to the startup control request, wherein the response data is used to indicate whether the startup control request exists, and the startup control request is used to adjust the target startup sequence of the plurality of peripheral devices; According to the response data, acquiring the startup control information corresponding to the startup control request and the startup flag corresponding to the startup control request; The plurality of peripheral devices are started up according to the start-up control information and the start-up flag.
2. The method according to claim 1, characterized in that According to the startup control information and the startup flag, the plurality of peripheral devices are started up, including: According to the startup flag bit, determining whether the startup control request is invalid; If not, the plurality of peripheral devices are started up according to the start-up control information.
3. The method according to claim 2, characterized in that The flag data corresponding to the startup flag bit includes first flag data and second flag data, the first flag data is used to indicate that the startup duration corresponding to the startup control request is less than or equal to the preset duration, and the second flag bit data is used to indicate that the startup duration is greater than the preset duration; Judging whether the startup control request is invalid according to the startup flag bit includes: If the flag data corresponding to the start flag bit is the first flag data, the start control request is not invalid; If the flag data corresponding to the start flag bit is the second flag data, the start control request is invalid.
4. The method according to claim 2, characterized in that: The startup control information includes the startup times and the target startup sequence of the plurality of peripheral devices; According to the startup control information, the plurality of peripheral devices are started up, including: Determine, according to the number of startups, a startup type corresponding to the startup control request, wherein the startup type includes a single startup and multiple startups; The plurality of peripheral devices are started up according to the start-up type and the target start-up sequence.
5. The method according to claim 4, characterized in that According to the startup type and the target startup sequence, the plurality of peripheral devices are started up, including: If the startup type is the single startup, the multiple peripheral devices are started according to the target startup sequence; If the startup type is the multiple startups, the target startup sequence is stored in a second storage device, and the startup process is performed on the multiple peripheral devices according to the target startup sequence.
6. The method according to claim 1, characterized in that After starting the plurality of peripheral devices, the method further includes: Start the server's operating system through the pre-boot execution environment; In the operating system, a preset startup sequence is obtained, and a verification process is performed on the preset startup sequence.
7. The method according to claim 6, characterized in that Start the pre-server operating system through the pre-start execution environment, including: Generate an event function corresponding to the start control request; According to the event function, simulating the hot key of the pre-boot execution environment to generate a virtual hot key for starting the pre-boot execution environment; The operating system is started according to the virtual hot key.
8. The method according to claim 1, characterized in that The server also includes a basic input and output system and a baseboard management controller; Determining, according to the server startup command, response data corresponding to the startup control request, including: determining, according to the server startup command, a first interface management protocol between the basic input and output system and the baseboard management controller; According to the first interface management protocol, response data in the baseboard management controller is obtained.
9. The method according to claim 8, characterized in that Acquiring response data in the baseboard management controller according to the first interface management protocol includes: Determine whether the preset interface management protocol has a first startup sequence; If not, the response data is obtained through the first interface management protocol.
10. The method according to claim 9, characterized in that After determining whether the preset interface management protocol has the first startup sequence, the method further includes: If yes, then obtain the first startup sequence; According to the first startup sequence, the plurality of peripheral devices are started up.
11. The method according to claim 1, characterized in that Acquiring, according to the response data, startup control information corresponding to the startup control request and a startup flag corresponding to the startup control request, including: Determining whether the response data is a first value, where the first value is used to indicate the existence of the start control request; If yes, the startup control information is obtained from the first storage device, and the startup flag is obtained from the baseboard management controller.
12. The method according to claim 1, characterized in that Before receiving the server start command, it also includes: receiving the startup control request, wherein the startup control request includes startup control information; The startup control information is stored in a first storage device, and the flag data corresponding to the startup flag bit is determined as the first flag data; If the startup duration is greater than the preset duration, the flag data corresponding to the startup flag is updated to second flag data, and the startup duration is used to indicate the duration of receiving the startup control request.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the server startup method as claimed in any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the server startup method according to any one of claims 1 to 12.
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 startup method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Starting sequence deployment method for multiple operating systems and related device
CN114546537A
Network card starting sequence control method and device, equipment and medium
CN116360871A
Startup item configuration method and device, computer equipment and storage medium
CN116521261A
Server starting method and device, server and storage medium
CN118672682A
Server hot key setting method, device and equipment and readable storage medium
CN119248118A
Cited By
Equipment starting control method, electronic equipment and server
CN121255299A
Starting control method, system and device for starting equipment of server
CN121349548A
Server control method, server and storage medium
CN121433758A
Server boot method, device, storage medium, and program product
WO2026194064A1