Server boot method, device, storage medium, and program product
Patent Information
- Application Number
- PCT/CN2025/098963
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-20
- Filing Date
- 2025-06-04
- Publication Date
- 2026-09-24
Smart Images

Figure CN2025098963_24092026_PF_FP_ABST
Abstract
Description
Server startup methods, devices, storage media, and program products
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510333029.X, filed on March 20, 2025, entitled “Server Startup Method, Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to server startup methods, devices, storage media, and program products. Background Technology
[0004] Servers can expand their hardware capabilities, improve data interaction efficiency, and ensure system reliability through peripheral devices, thereby ensuring stable operation in complex scenarios.
[0005] In related technologies, when a server starts up, each peripheral device can be started accordingly, and each peripheral device has a corresponding default boot order. If it is necessary to change the target boot order of each peripheral device, the boot order can be manually adjusted by entering the Basic Input Output System (BIOS) Setup interface during the server startup process. However, in data centers, manually adjusting the boot order of tens of thousands of servers results in low efficiency for adjusting the boot order of peripheral devices. Summary of the Invention
[0006] According to an embodiment of this application, in a first aspect, a method for starting a server is provided, applied to a server, the server including multiple peripheral devices, the method comprising:
[0007] Receive the server startup command;
[0008] Based on the server startup command, determine the response data corresponding to the startup control request. The response data is used to indicate whether a startup control request exists. The startup control request is used to adjust the target startup order of multiple peripheral devices.
[0009] Based on the response data, obtain the startup control information corresponding to the startup control request, and the startup flag bit corresponding to the startup control request; and
[0010] Start-up processes are performed on multiple peripheral devices based on startup control information and startup flags.
[0011] Secondly, a server startup device is provided, applied to a server, the server including multiple peripheral devices, the device including a first receiving module, a first determining module, a first acquiring module and a startup processing module:
[0012] The first receiving module is used to receive the server startup command;
[0013] The first determining module is used to determine the response data corresponding to the startup control request based on the server startup command. The response data is used to indicate whether a startup control request exists. The startup control request is used to adjust the target startup order of multiple peripheral devices.
[0014] The first acquisition module is used to acquire, based on the response data, the startup control information corresponding to the startup control request, and the startup flag bit corresponding to the startup control request; and
[0015] The startup processing module is used to perform startup processing on multiple peripheral devices based on startup control information and startup flag bits.
[0016] Thirdly, an electronic device is also provided, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the server startup methods described in the first aspect.
[0017] Fourthly, this application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the server startup methods described in the first aspect.
[0018] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the server startup methods described in the first aspect.
[0019] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the specification, drawings, and claims. Attached Figure Description
[0020] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 is a schematic diagram of the application scenario provided in the embodiments of this application;
[0022] Figure 2 is a schematic diagram of the server structure provided in an embodiment of this application;
[0023] Figure 3 is a flowchart illustrating the server startup method provided in an embodiment of this application;
[0024] Figure 4 is a flowchart illustrating a server startup method provided in some other embodiments of this application;
[0025] Figure 5 is a schematic diagram of the architecture of the server startup method provided in the embodiment of this application;
[0026] Figure 6 is a schematic diagram of the server startup device provided in an embodiment of this application;
[0027] Figure 7 is a schematic diagram of the structure of another server startup device provided in an embodiment of this application;
[0028] Figure 8 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;
[0029] Figure 9 is a schematic diagram of the structure of the non-transitory computer-readable storage medium provided in the embodiments of this application;
[0030] Figure 10 is a schematic diagram of the structure of the computer program product provided in the application embodiment. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0032] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0033] Servers can expand their hardware capabilities, improve data interaction efficiency, and ensure system reliability through peripheral devices, thereby ensuring stable operation in complex scenarios.
[0034] For servers with different architectures, servers can be configured with multiple peripheral devices. These peripheral devices can 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 drives, Serial Advanced Technology Attachment hard disks (SATA) hard drives, Compact Disc-Read Only Memory (CD-ROM), Digital Versatile Disc-Read Only Memory (DVD-ROM), Universal Serial Bus (USB) network cards, USB hard drives, etc.
[0035] Each peripheral device has a specific priority, and during server startup, these peripherals can be started according to their respective priorities. In related technologies, a preset startup order for each peripheral device can be stored in the server, and the peripherals are started according to this preset order. If the startup order of the peripheral devices needs to be changed, the startup order can be manually adjusted in the Basic Input Output System (BIOS) Setup interface during server startup. However, in data centers, manually adjusting the startup order of tens of thousands of servers results in low efficiency.
[0036] In this embodiment, after receiving the server's startup command, if a startup control request exists, the startup control information and startup flag corresponding to the startup control request are used to start multiple peripheral devices. This allows modification of the target startup order of multiple peripheral devices, improving the efficiency of startup order adjustment. Simultaneously, the preset startup order of the multiple peripheral devices is not modified, ensuring that the next startup will proceed according to the preset startup order.
[0037] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] The specific application environment architecture or hardware architecture upon which the server heat dissipation control method depends is described here. Refer to Figures 1 and 2.
[0039] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application. Referring to Figure 1, it includes a server 101 and a remote control device 102.
[0040] Server 101 can communicate with remote control device 102. Server 101 can receive startup control requests sent by remote control device 102. Startup control requests can be used to adjust the target startup order of multiple peripheral devices.
[0041] Figure 2 is a schematic diagram of the server structure provided in an embodiment of this application. Referring to 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.
[0042] The two CPUs (CPU0 and CPU1) communicate via the CCIX / UPI / GMI bus. CCIX stands for Cache Coherent Interconnect for Accelerators, designed to accelerate data transfer between processors and accelerators. UPI stands for Ultra Path Interconnect, a high-speed interconnect technology used to connect multiple processors, enabling efficient communication and data sharing in multiprocessor systems. GMI stands for Global Memory Interconnect, a high-speed interconnect technology designed to connect processors and memory, providing high-bandwidth and low-latency memory access capabilities.
[0043] The two CPUs are connected to multiple peripheral devices via the Peripheral Component Interconnect (PCI) interface, as shown in Figure 2. CPU0 is connected to four NVMe hard drives (NVMe hard drive 0, NVMe hard drive 1, NVMe hard drive 2 and NVMe hard drive 3) and network card 0, while CPU1 is connected to CD-ROM 0 and four NVMe hard drives (NVMe hard drive 4, NVMe hard drive 5, NVMe hard drive 6 and NVMe hard drive 7).
[0044] The BMC connects to CPU0 via the LPC / PCI bus, where LPC stands for Low Pin Count Interface. The BMC communicates with the BIOS via the Intelligent Platform Management Interface (IPMI) protocol. The BMC can also communicate with CPU0 via a preset interface management protocol (i.e., the Redfish protocol) to manage and monitor CPU0 and its related devices.
[0045] The BIOS communicates with CPU0 via LPC / SPI / QSPI buses. SPI stands for Serial Peripheral Interface; QSPI stands for Quad SPI, which expands the number of data lines compared to SPI, supporting higher bandwidth and more complex operating modes. CPU1 connects to a USB keyboard via USB interface 1 and to a USB flash drive via USB interface 2.
[0046] In the BMC management interface of the remote control device 102, the user can set the target boot order of multiple peripheral devices. The remote control device 102 can generate a boot control request and send it to the server 101. The BMC of the server 101 can receive the boot control request, which includes boot control information, and can store the boot control request in the first storage device.
[0047] After receiving the server startup command, server 101 can determine the response data corresponding to the startup control request based on the server startup command. The response data can be used to indicate whether a startup control request exists. Server 101 can obtain the startup control information corresponding to the startup control request and the startup flag bit corresponding to the startup control request based on the response data, and perform startup processing on multiple peripheral devices based on the startup control information and the startup flag bit.
[0048] Figure 3 is a flowchart illustrating a server startup method according to an embodiment of this application. Referring to Figure 3, the method may include:
[0049] S301, Receive server startup command.
[0050] Before receiving the server startup command, a startup control request can be received, which includes 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 longer than the preset duration, the flag data corresponding to the startup flag bit can be updated to the second flag data.
[0051] In this application, the validity period of the startup control request is monitored by a startup flag. Once the startup control request times out, it is invalidated, which can prevent malicious requests from occupying server resources or attacking the server through startup control requests, thereby improving server security.
[0052] The server can receive startup control requests from remote control devices when it is powered off or when the server's operating system is running.
[0053] When the server is powered off, the received boot control request can be ipmitool.exe chassis bootdev PXE; when the server's operating system is powered on, the received boot control request can be ipmitool.exe –I lanplus -H XX.XX.XX.XX (BMC IP address) –U BMC username –P BMC password chassis bootdev PXE.
[0054] The executable file "ipmitool.exe" is the IPMI tool, used to interact with the server's Baseboard Management Controller (BMC) via command line. "I lanplus" specifies the lanplus interface type, an enhanced IPMI protocol that supports encrypted communication (such as RMCP+), offering greater security than traditional lan interfaces. "HXX.XX.XX.XX" specifies the server's BMC management IP address and must be replaced with the actual BMC IP. "U BMC username" and "P BMC password" provide credentials for logging into the BMC. For example, the username is ADMIN, and the password must be entered according to the actual configuration and is case-sensitive. "chassis" indicates chassis-related functions, the "bootdev" subcommand is used to configure the boot device, and "PXE" specifies that the next boot will be from the network (Preboot eXecution Environment).
[0055] The BMC can operate 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 power on / off, restart, or force reset the server through the BMC.
[0056] The server can receive start control requests sent by remote control devices through the BMC.
[0057] In some embodiments, when the server's operating system is running, a startup control request can be sent to the BMC through the operating system.
[0058] Startup control requests can be used to adjust the target startup order of multiple peripheral devices in a server.
[0059] The boot control information can be stored in the first storage device corresponding to the BMC. The first storage device can be a non-volatile memory, which can retain data even after power failure. This means that the first storage device can still maintain data integrity after the power is turned off.
[0060] The first storage device can be a non-volatile random access memory (NVRAM) or an electrically erasable programmable read-only memory (EEPROM).
[0061] After receiving the startup control request, the BMC determines the flag data corresponding to the startup flag bit as the first flag data and starts automatic timing. If the startup time exceeds the preset time, the BMC can update the flag data corresponding to the startup flag bit to the second flag data and delete the startup control information from the first storage device, regardless of whether the multiple peripheral devices in the server have been started.
[0062] The first flag data can be used to indicate that the start control request has not timed out, and the second flag data can be used to indicate that the start control request has timed out.
[0063] Startup duration can be used to indicate the duration for which a startup control request has been received.
[0064] In some possible implementations, the preset duration can be 3 minutes.
[0065] The server startup command can be either the Power Cycle command or the power button command.
[0066] The Power Cycle command refers to the ability to execute the chassis power cycle command via IPMI. The Power Cycle command will first completely cut off the server power (entering the S5 shutdown state), and then wait for about 1-10 seconds before powering it back on, which is equivalent to simulating a complete power cycle of physical power outage and power restoration.
[0067] The power button command refers to the short press operation of the physical power button, which corresponds to the IPMI power on command. It only triggers the power-on process and does not go through a complete power-off phase.
[0068] S302. Based on the server startup command, determine the response data corresponding to the startup control request.
[0069] After the remote control device sends a start control request to the BMC, the BMC will generate response data. The response data can indicate whether a start control request exists. The start control request is used to adjust the target start order of multiple peripheral devices.
[0070] After receiving the server startup command, the server can start the BIOS. The BIOS can read the response data from the BMC through the first interface management protocol.
[0071] The BIOS performs a Power-On Self Test (POST) during startup to check if the hardware is functioning correctly, and then loads the bootloader according to the set boot order.
[0072] In this application, the BIOS can load and start the boot program corresponding to multiple peripheral devices according to the target boot order corresponding to the boot control request.
[0073] S303. Based on the response data, obtain the startup control information corresponding to the startup control request and the startup flag bit corresponding to the startup control request.
[0074] Startup control information may include the number of startup attempts and the target startup order for multiple peripheral devices.
[0075] The flag data corresponding to the start flag bit may include first flag data and second flag data. The first flag data can be used to indicate that the start duration corresponding to the start control request is less than or equal to the preset duration, and the second flag data can be used to indicate that the start duration is greater than the preset duration.
[0076] S304. Based on the startup control information and startup flag, perform startup processing on multiple peripheral devices.
[0077] In some possible embodiments, the startup flag can be used to determine whether the startup control request is invalid; if not, the startup control information can be used to start multiple peripheral devices; if so, the startup order can be used to start multiple peripheral devices.
[0078] Specifically, the startup control request becomes invalid if no startup control request is received, or if the startup duration of the startup control request times out.
[0079] The server startup method provided in this application, upon receiving a server startup command, can, if a startup control request exists, process the startup of multiple peripheral devices according to the startup control information and startup flags corresponding to the startup control request. This allows modification of the startup order of multiple peripheral devices, improving the efficiency of startup order adjustment and enabling dynamic adjustment of server startup. Simultaneously, it does not modify the preset startup order of the multiple peripheral devices, ensuring that the next startup will proceed according to the preset startup order.
[0080] Figure 4 is a flowchart illustrating another server startup method provided in an embodiment of this application. Referring to Figure 4, the method may include:
[0081] S401, Receive server startup command.
[0082] The execution process of S401 can be found in the execution process of S301, and will not be repeated here.
[0083] S402. Based on the server startup command, determine the first interface management protocol between the basic input / output system and the baseboard management controller.
[0084] The first interface management protocol can be the IPMI protocol, which can be used as the core protocol between remote monitoring and hardware management.
[0085] Among them, the Baseboard Management Controller (BMC) can be used for remote monitoring.
[0086] The BIOS is the first firmware to run when a server boots up, responsible for initializing the hardware and booting the operating system. The BIOS can load the operating system's bootloader according to a preset boot order (such as hard drive, USB, network PXE).
[0087] In this application, the baseboard management controller and the basic input / output system communicate through a first interface management protocol. When multiple peripheral devices are started in the basic input / output system according to a preset startup order, the baseboard management controller can adjust the preset startup order.
[0088] S403. Obtain response data from the baseboard management controller according to the first interface management protocol.
[0089] The Basic Input / Output System (BIOS) can obtain response data through the first interface management protocol. The data structure of the response data in the Baseboard Management Controller (BMC) can be the data structure set in the first interface management protocol.
[0090] In some possible embodiments, the response data can be a first value or a second value, where the first value indicates the presence of a start control request and the second value indicates the absence of a start control request. For example, the first value can be 0 and the second value can be 1.
[0091] In some embodiments, the bit value of the first bit (i.e., bit0) of the response data can be obtained to indicate whether a start control request exists. For example, if bit0 is 1, a start control request exists; if bit0 is 0, a start control request does not exist.
[0092] It is worth noting that the default interface management protocol may adjust the startup order of the server's peripheral devices.
[0093] Specifically, it can be determined whether a first startup sequence exists in the preset interface management protocol; if not, response data is obtained through the first interface management protocol. If yes, the first startup sequence is obtained; and startup processing is performed on multiple peripheral devices according to the first startup sequence.
[0094] The default interface management protocol can be the Redfish protocol. The Redfish protocol is a server management standard based on the representational state transfer (REST) architecture, which was developed under the leadership of the Distributed Management Task Force (DMTF). It aims to provide an open, scalable and secure out-of-band management solution for modern data centers.
[0095] The first startup order is the default startup order in the Redfish protocol.
[0096] If a first boot order exists in the Redfish protocol, the first boot order shall be given priority. If it does not exist, multiple peripheral devices shall be booted according to the boot control request in this application.
[0097] It is worth noting that the target boot order is the boot order corresponding to the boot control request, while the preset boot order is the boot order in the BIOS. The priority of each boot order is as follows: the first boot order is greater than the target boot order, and the target boot order is greater than the preset boot order.
[0098] S404. Determine if the response data is the first value.
[0099] If so, proceed to step S405;
[0100] If not, then start according to the preset startup sequence.
[0101] S405. If so, then obtain the boot control information from the first storage device and obtain the boot flag bit from the baseboard management controller.
[0102] The start flag can be used to indicate whether the start control request has timed out.
[0103] After receiving a start control request, the Baseboard Management Controller (BMC) will time the start duration of the received start control request. If the start duration exceeds the preset duration, the start control request will time out, and the flag data of the start flag bit will be determined as the second flag data.
[0104] In some possible embodiments, the first flag data can be 1 and the second flag data can be 0.
[0105] For example, before receiving a startup control request, the startup flag can be 0. After receiving the startup control request, the startup flag can be updated to 1. If the startup duration exceeds the preset duration, the startup flag can be updated to 0.
[0106] In some possible embodiments, a third flag data is also included, which indicates that no start control request exists. The first flag data can be 01, the second flag data can be 10, and the third flag data can be 00.
[0107] For example, before receiving a startup control request, the startup flag can be 00. After receiving the startup control request, the startup flag can be updated to 01. If the startup duration exceeds the preset duration, the startup flag can be updated to 10.
[0108] In some possible embodiments, the BMC may include multiple startup parameters, including flag data corresponding to a startup flag bit. The flag data corresponding to the startup flag bit can be obtained from the multiple startup parameters by querying the command.
[0109] In this application, queries can be performed via remote control commands or system commands. Remote control commands, executed within the server's operating system, communicate directly with the local BMC without requiring an external network connection, but the ipmitool tool must be installed on the system. System commands, on the other hand, instruct users to remotely connect to the BMC from external devices (such as remote control terminals or automation platforms), suitable for cross-network management.
[0110] For example, if the boot flag is the 5th boot parameter, the boot flag can be obtained using the following two commands: 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 username –P BMC password chassis bootparam get 5.
[0111] The command "chassis bootparam get 5" is used to query boot parameter number 5, which corresponds to Boot Flags in the IPMI specification. It is used to view the current boot device configuration and its effective scope.
[0112] In some possible embodiments, if the boot control information is obtained from the first storage device, the boot control information in the first storage device can be deleted to alleviate the storage pressure on the first storage device.
[0113] S406. Determine whether the startup control request is invalid based on the startup flag bit.
[0114] In some possible embodiments, 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.
[0115] In some possible embodiments, 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 or the third flag data, the start control request is invalid.
[0116] If so, then the multiple peripheral devices will be started according to the preset startup sequence;
[0117] If not, proceed to step S407.
[0118] S407. If not, determine the startup type corresponding to the startup control request based on the number of startups.
[0119] The startup control information can include the number of startups. When setting the target startup order of multiple peripheral devices in the remote control device, the user can set the number of startups for the startup control request.
[0120] Boot types can include single boot and multiple boots.
[0121] If the number of startups is 1, the startup type is single startup; if the number of startups is greater than 1, the startup type is multiple startup.
[0122] It is worth noting that, under normal circumstances, users can set single startup and permanent startup. Permanent startup can be a special case of multiple startups. Setting the number of startups to a large value will enable permanent startup.
[0123] S408. If the startup type is single startup, then multiple peripheral devices will be started according to the target startup order.
[0124] The target boot order can be a boot order queue for multiple peripheral devices, and each peripheral device is started sequentially according to the boot order queue.
[0125] In some possible embodiments, the boot order queue may include multiple peripheral device groups, each peripheral device group including at least one peripheral device. The boot order queue may prioritize each peripheral device group, and for any given peripheral device group, each peripheral device may be prioritized.
[0126] Multiple peripheral devices can be grouped in different ways, such as by the interface type of the connected devices and the type definition of the devices.
[0127] In some possible embodiments, the peripheral devices may include a network interface card (NIC) group, a hard disk drive (HDD) group, a CD / DVD-ROM (CD / DVD-ROM) group, and an "Others" group. The NIC group may include PCI interface NICs, OCP NICs, HCA cards, or HBA cards, etc.; the HDD group may include NVMe storage devices; the CD / DVD-ROM group may include optical drives or DVD devices; and the "Others" group may include the remaining devices.
[0128] For example, the default boot order can be network card device group, hard disk device group, CD / DVD-ROM device group, and other device group; the target boot order can be hard disk device group, CD / DVD-ROM device group, network card device group, and other device group.
[0129] In some possible embodiments, peripheral devices can be grouped using different interface types. For example, USB-type devices and PCI-type devices, where USB-type devices can include USB network cards, USB hard drives, USB flash drives, etc., and PCI-type devices can include PCI interface network cards and PCI interface OCP network cards.
[0130] In this application, at least one peripheral device in each peripheral device group can be started sequentially.
[0131] It is worth noting that no modifications are made to the hotkey functions in this application. When a hotkey input is received, the hotkey function must be executed immediately. For example, the F11 hotkey is used to select the boot device, and the Del hotkey is used to enter the BIOS Setup interface.
[0132] The BIOS Setup interface is the configuration interface that appears when the computer starts up. It is mainly used to manage and adjust hardware settings to ensure that the system runs normally.
[0133] S409. If the boot type is multiple boots, the target boot sequence is stored in the second storage device.
[0134] If the boot type is multiple boots, then the target boot order needs to be stored in the second storage device so that the target boot order can be directly retrieved from the second storage device the next time it boots.
[0135] The second storage device can be the NVRAM area of the BIOS.
[0136] In some possible implementations, the current number of times the server is started can be recorded. When the current number of starts equals the number of starts corresponding to multiple starts, the target startup sequence in the second storage device is deleted.
[0137] S410. Based on the target startup sequence, perform startup processing on multiple peripheral devices.
[0138] The execution process of step S410 can be found in the execution process of step S408, and will not be repeated here.
[0139] In some possible embodiments, after booting multiple peripheral devices, the operating system can be started through a pre-boot execution environment; in the operating system, a preset boot order is obtained and the preset boot order is verified.
[0140] During server startup, the Preboot Execution Environment (PXE) can be used to allow a computer to obtain and boot the operating system from a remote server over a network when it lacks local storage devices (such as hard drives).
[0141] PXE can be built into the BIOS firmware. During startup, the BIOS loads the PXE client program from the network card ROM into memory, and PXE initiates network requests.
[0142] In the operating system, the default startup order can be obtained through the Server Configuration Engine (SCE) tool.
[0143] SCE is a utility program that can access the underlying firmware configuration of a server even 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.
[0144] At this time, the preset startup order remains the default startup order, and the startup control request will not modify the preset startup order.
[0145] In some possible embodiments, the operating system can be started in the following manner: generating an event function corresponding to the startup control request; simulating the hotkey of the pre-boot execution environment based on the event function to generate a virtual hotkey for starting the pre-boot execution environment; and starting the operating system based on the virtual hotkey.
[0146] At the end of the BIOS Driver Execution Environment (DXE) phase, an event function called End of DXE Event is typically created. This event function can be a custom event group, and its core function is to notify the system to prepare to enter the BDS (Boot Device Selection) phase after all drivers have been loaded and initialized in the DXE phase, and to gradually transfer control to the operating system.
[0147] Hotkeys are shortcuts in computer systems that trigger specific functions through predefined key combinations. Their core goal is to improve efficiency by reducing the number of steps required, and they are widely used at different levels, including firmware (such as BIOS / UEFI), operating systems (such as Windows / macOS), and applications (such as Photoshop).
[0148] In some possible implementations, the preset boot order can be updated to the target boot order.
[0149] When verifying the preset startup order, the target startup order has been modified to the preset startup order, which meets the expected startup order.
[0150] After the server is started according to the boot control request, the server can be restarted or shut down and then powered on again. When the BIOS restarts, it will boot normally according to the preset boot order and enter the operating system. The operating system reads the preset boot order through the SCE tool. The preset boot order can be the network card device group, hard disk device group, CD / DVD-ROM device group, and other device group, which is consistent with the default boot order.
[0151] After entering the operating system, the SCE tool is used to export the preset boot order and confirm whether it is consistent with the default and permanent boot order. When the boot is complete and restarted, the server's BIOS will boot according to the default and permanent grouping information (i.e., the preset boot order) during the boot process. When entering the system again, the SCE tool is used to export the boot item grouping order information and confirm whether it is the permanent default boot item grouping order. This can avoid manually operating the BIOS Setup interface to adjust the boot order and eliminate the need to adjust the default permanent boot order. It can also realize the PXE function boot function. In addition, it can ensure that the hotkey function is executed with high priority over the IPMI command for a single boot during the boot process, which can improve the reliability of server boot.
[0152] After IPMI single boot setup is complete, hotkey functions can still be executed. Simply use the SCE tool to export whether the preset boot order meets expectations. The hotkey functions will not be changed, making operation convenient.
[0153] The server startup method provided in this application, upon receiving a server startup command, can determine whether a startup control request is invalid based on a startup flag. If it is valid, the startup type corresponding to the startup control request can be determined based on the number of startups. Based on the startup type and the target startup order, multiple peripheral devices are then started. This allows modification of the target startup order of multiple peripheral devices, improving the efficiency of startup order adjustment. Furthermore, determining whether a startup control request is invalid using a startup flag can prevent malicious requests from consuming server resources or attacking the server through startup control requests, thus improving server security.
[0154] Figure 5 is a schematic diagram of the architecture of a server startup method provided in an embodiment of this application. Referring to Figure 5, the server may include an operating system, a Baseboard Management Controller (BMC), and a Basic Input / Output System (BIOS). The BMC can receive startup control requests, which can be sent via a remote control device when the server is powered off, or sent within the operating system when it is powered on. The BMC can store the startup control requests in a first storage device and enable a timing function to determine the startup duration corresponding to the startup control request.
[0155] If the startup time is less than the preset time, and the Basic Input / Output System (BIOS) receives the server startup command, the BIOS can install the First Interface Management Protocol (IPMI) during the DXE stage and determine whether the installation was successful. After successful installation, if the preset interface management protocol (Redfish protocol) supports sequential startup of peripheral devices and a first startup order exists, then multiple peripheral devices are started according to the first startup order. If the preset interface management protocol does not support sequential startup of peripheral devices and a first startup order does not exist, or if the preset interface management protocol does not support sequential startup of peripheral devices, the BIOS can obtain response data from the baseboard management controller.
[0156] If the response data is the second value, multiple peripheral devices are started according to the preset startup sequence. If the response data is the first value, startup control information is obtained from the first storage device, and a startup flag is obtained from the baseboard management controller. The startup flag can be used to determine whether the startup control request has failed. If it has, multiple peripheral devices are started according to the preset startup sequence. If not, the startup type corresponding to the startup control request is determined based on the number of startups in the startup control information.
[0157] If the boot type is single boot, multiple peripheral devices are booted according to the target boot order. If the boot type is multiple boot, the target boot order is stored in the second storage device, and multiple peripheral devices are booted according to the target boot order. If hotkey commands are input during the boot process, the hotkey commands are processed first.
[0158] The Basic Input / Output System (BIOS) can generate event functions corresponding to boot control requests. Based on these event functions, it simulates the hotkeys for the pre-boot execution environment, generating a virtual hotkey to start the pre-boot execution environment. Using this virtual hotkey, the operating system is then started. Within the operating system, a preset boot order can be obtained and verified.
[0159] Figure 6 is a schematic diagram of a server startup device provided in an embodiment of this application. Referring to Figure 6, the server startup device 600 includes a first receiving module 601, a first determining module 602, a first acquiring module 603, and a startup processing module 604.
[0160] The first receiving module 601 is used to receive the server startup command;
[0161] The first determining module 602 is used to determine the response data corresponding to the startup control request based on the server startup command. The response data is used to indicate whether a startup control request exists. The startup control request is used to adjust the target startup order of multiple peripheral devices.
[0162] The first acquisition module 603 is used to acquire, based on the response data, the startup control information corresponding to the startup control request and the startup flag bit corresponding to the startup control request;
[0163] The startup processing module 604 is used to perform startup processing on multiple peripheral devices based on startup control information and startup flag bits.
[0164] In some possible embodiments, the startup processing module 604 is specifically used for:
[0165] Determine whether the startup control request is invalid based on the startup flag bit;
[0166] If not, then start multiple peripheral devices according to the startup control information.
[0167] In some possible embodiments, the flag data corresponding to the start flag bit includes first flag data and second flag data. The first flag data is used to indicate that the start duration corresponding to the start control request is less than or equal to a preset duration, and the second flag data is used to indicate that the start duration is greater than the preset duration.
[0168] The startup processing module 604 is specifically used for:
[0169] If the flag data corresponding to the start flag bit is the first flag data, then the start control request has not expired;
[0170] If the flag data corresponding to the start flag bit is the second flag data, then the start control request fails.
[0171] In some possible embodiments, the startup control information includes the number of startup attempts and the target startup order of multiple peripheral devices; the startup processing module 604 is specifically used for:
[0172] The startup type corresponding to the startup control request is determined based on the number of startups. The startup type includes single startup and multiple startups.
[0173] Based on the boot type and target boot order, multiple peripheral devices are booted.
[0174] In some possible embodiments, the startup processing module 604 is specifically used for:
[0175] If the startup type is single startup, then multiple peripheral devices will be started according to the target startup order;
[0176] If the boot type is multiple boots, the target boot order is stored in the second storage device, and multiple peripheral devices are booted according to the target boot order.
[0177] Figure 7 is a schematic diagram of another server startup device provided in an embodiment of this application. Referring to Figure 7, the server startup device 600 further includes a startup module 605, a second acquisition module 606, and a verification processing module 607.
[0178] The startup module 605 is used to start the server's operating system through the pre-boot execution environment;
[0179] The second acquisition module 606 is used to acquire the preset boot order in the operating system;
[0180] The verification processing module 607 is used to verify the preset startup sequence.
[0181] In some possible embodiments, the startup module 605 is specifically used for:
[0182] Generate the event function corresponding to the startup control request;
[0183] Based on the event function, the hotkeys for the pre-startup execution environment are simulated to generate virtual hotkeys for starting the pre-startup execution environment;
[0184] Start the operating system using the virtual hotkey.
[0185] In some possible embodiments, the server further includes a basic input / output system and a baseboard management controller; the first determining module 602 is specifically used for:
[0186] Based on the server startup command, determine the first interface management protocol between the basic input / output system and the baseboard management controller;
[0187] According to the first interface management protocol, the response data in the baseboard management controller is obtained.
[0188] In some possible embodiments, the first determining module 602 is specifically used for:
[0189] Determine if the preset interface management protocol has a first startup sequence;
[0190] If not, the response data is obtained through the first interface management protocol.
[0191] In some possible embodiments, the first determining module 602 is specifically used for:
[0192] If so, then obtain the first startup order;
[0193] According to the first startup sequence, multiple peripheral devices are started.
[0194] In some possible embodiments, the first acquisition module 603 is specifically used for:
[0195] Determine if the response data is the first value, which indicates that a start control request exists;
[0196] If so, the boot control information is obtained from the first storage device, and the boot flag is obtained from the baseboard management controller.
[0197] In some possible embodiments, the apparatus further includes a second receiving module, a storage module, a second determining module, and an updating module:
[0198] The second receiving module is used to receive a startup control request, which includes startup control information.
[0199] The storage module is used to store startup control information in the first storage device;
[0200] The second determining module is used to determine the flag data corresponding to the start flag bit as the first flag data;
[0201] The update module is used to update the flag data corresponding to the startup flag bit to the second flag data if the startup duration is longer than the preset duration. The startup duration is used to indicate the duration of receiving the startup control request.
[0202] For a description of the features in the embodiment corresponding to the server startup device, please refer to the relevant description in the embodiment corresponding to the server startup method, which will not be repeated here.
[0203] Figure 8 is a schematic diagram of the structure of an electronic device provided in this application. As shown in Figure 8, 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, memory 802, and communication component 803 are connected via a bus.
[0204] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to execute the above-described server startup method embodiment.
[0205] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0206] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0207] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0208] 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. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0209] Embodiments of this application also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described server startup method embodiments when it runs.
[0210] In one or more exemplary embodiments, the aforementioned non-transitory computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0211] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described server startup method embodiments.
[0212] Embodiments of this application also provide another computer program product, including a non-transitory computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described server startup method embodiments.
[0213] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0214] The above provides a detailed description of a server startup method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for starting a server, characterized in that, Applied to a server, the server including multiple peripheral devices, the method includes: Receive the server startup command; Based on the server startup command, determine the response data corresponding to the startup control request. The response data is used to indicate whether the startup control request exists. The startup control request is used to adjust the target startup order of the multiple peripheral devices. Based on the response data, obtain the startup control information corresponding to the startup control request, and the startup flag bit corresponding to the startup control request; and The startup process is performed on the plurality of peripheral devices based on the startup control information and the startup flag.
2. The method according to claim 1, characterized in that, Based on the startup control information and the startup flag, the plurality of peripheral devices are started, including: Based on the startup flag, determine whether the startup control request has failed; and In response to the fact that the startup control request has not expired, the startup process is performed on the plurality of peripheral devices according to the startup control information.
3. The method according to claim 2, characterized in that, The flag data corresponding to the start flag bit includes first flag data and second flag data. The first flag data is used to indicate that the start duration corresponding to the start control request is less than or equal to a preset duration, and the second flag data is used to indicate that the start duration is greater than the preset duration. Based on the startup flag, determining whether the startup control request is invalid includes: If the flag data corresponding to the start flag bit is the first flag data, it is determined that the start control request has not expired; as well as If the flag data corresponding to the start flag bit is the second flag data, the start control request is determined to be invalid.
4. The method according to claim 2, characterized in that, The startup control information includes the number of startups and the target startup order of the multiple peripheral devices; Based on the startup control information, the startup process for the plurality of peripheral devices is performed, including: Based on the number of startups, the startup type corresponding to the startup control request is determined, and the startup type includes single startup and multiple startups; as well as The startup process is performed on the plurality of peripheral devices according to the startup type and the target startup order.
5. The method according to claim 4, characterized in that, The step of performing startup processing on the plurality of peripheral devices according to the startup type and the target startup order includes: In response to the boot type being single boot, boot processing is performed on the plurality of peripheral devices according to the target boot order; and In response to the boot type being the multiple boots, the target boot order is stored in the second storage device, and the multiple peripheral devices are booted according to the target boot order.
6. The method according to claim 1, characterized in that, After the startup process of the plurality of peripheral devices is performed, the process also includes: The server's operating system is started through the pre-boot execution environment; and In the operating system, a preset boot order is obtained, and the preset boot order is verified.
7. The method according to claim 6, characterized in that, The process of starting the server's operating system through the pre-boot execution environment includes: Generate the event function corresponding to the startup control request; Based on the event function, the hotkeys for the pre-startup execution environment are simulated to generate a virtual hotkey to start the pre-startup execution environment; and The operating system is launched using the virtual hotkey.
8. The method according to claim 1, characterized in that, The server also includes a basic input / output system and a baseboard management controller; the step of determining the response data corresponding to the startup control request based on the server startup command includes: Based on the server startup command, the first interface management protocol between the basic input / output system and the baseboard management controller is determined; and According to the first interface management protocol, the response data in the baseboard management controller is obtained.
9. The method according to claim 8, characterized in that, The step of obtaining response data from the baseboard management controller according to the first interface management protocol includes: Determine if the preset interface management protocol has a first startup sequence; and In response to the absence of a first startup order in the preset interface management protocol, 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 a first startup sequence, the method further includes: In response to the existence of a first startup order in the preset interface management protocol, the first startup order is obtained; and The plurality of peripheral devices are started according to the first startup sequence.
11. The method according to claim 1, characterized in that, The step of obtaining the startup control information corresponding to the startup control request and the startup flag bit corresponding to the startup control request based on the response data includes: Determine whether the response data is a first value, where the first value indicates the existence of the startup control request; and In response to the response data being a first value, 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 startup command, the following is also included: Receive the startup control request, the startup control request including 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; and In response to a startup duration exceeding a preset duration, the flag data corresponding to the startup flag bit is updated to second flag data, wherein the startup duration is used to indicate the duration for which the startup control request is received.
13. The method according to claim 12, characterized in that, Receiving the startup control request includes: The startup control request is received through the baseboard management controller.
14. The method according to claim 13, characterized in that, Receiving the startup control request includes: With the server's operating system running, the startup control request is sent to the baseboard management controller via the operating system.
15. The method according to claim 12, characterized in that, After updating the flag data corresponding to the start flag bit to the second flag data, the method further includes: Regardless of whether the multiple peripheral devices in the server have been started, the startup control information is deleted from the first storage device.
16. The method according to claim 2, characterized in that, Also includes: In response to the failure of the startup control request, the multiple peripheral devices are started according to a preset startup sequence.
17. The method according to claim 11, characterized in that, Also includes: If the response data is not the first value, the multiple peripheral devices are started according to a preset startup order.
18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the server startup method as described in any one of claims 1 to 17.
19. A non-transitory computer-readable storage medium, characterized in that, The non-transitory 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 as described in any one of claims 1 to 17.
20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the server startup method as described in any one of claims 1 to 17.