Server starting method and device, electronic equipment, medium and program product
By controlling the restart mode of multiple startup items according to the startup configuration items when the server startup fails, the problem of insufficient flexibility in handling server startup failures is solved, and more efficient startup failure handling is achieved.
Patent Information
- Application Number
- CN202511208755.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-27
AI Technical Summary
The existing method for handling server startup failures is not flexible enough and is difficult to adapt to diverse application scenarios.
After the operating system fails to start through the target startup item of the server, the restart mode of multiple startup items is controlled according to the configuration status of the startup configuration item to implement different startup failure processing.
Improved the flexibility of server startup failure handling and enhanced the robustness and flexibility of the startup process.
Smart Images

Figure CN120723341A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a server startup method, device, electronic device, medium, and program product. Background Art
[0002] With the advancement of information technology, the hardware architecture and software systems of modern computing devices are becoming increasingly complex. The boot process of modern computing devices, such as servers, is also attracting increasing attention. Currently, servers typically boot their operating systems through a startup item. If this startup item fails to boot the operating system, traditional methods for handling boot failures (retrying a fixed number of times or shutting down the server) are difficult to adapt to diverse application scenarios. Summary of the Invention
[0003] The present application provides a server startup method, device, electronic device, medium and program product to at least solve the problem of insufficient flexibility in handling server startup failure in related technologies.
[0004] The present application provides a server startup method, comprising: starting the server's operating system through a target startup item of the server, wherein the server includes multiple startup items having a startup sequence, and the target startup item is the first startup item in the startup sequence; in the event that startup of the operating system fails through the target startup item, controlling the multiple startup items according to the configuration status of the startup configuration item, wherein the startup configuration item is used to configure a control method for restarting the operating system through the multiple startup items.
[0005] The present application also provides a server startup device, including: a startup module, used to start the server's operating system through the server's target startup item, wherein the server includes multiple startup items with a startup sequence, and the target startup item is the first startup item in the startup sequence; a control module, used to control the multiple startup items according to the configuration status of the startup configuration item when the startup of the operating system fails through the target startup item, wherein the startup configuration item is used to configure a control method for restarting the operating system through multiple startup items.
[0006] The present application also 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.
[0007] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server startup methods are implemented.
[0008] 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.
[0009] Through the present application, the operating system of the server is started through the target startup item of the server. In the case that the startup of the operating system fails through the target startup item, multiple startup items are controlled according to the configuration status of the startup configuration item for configuring the control method for restarting the operating system through multiple startup items. Different startup failure processing can be achieved by configuring the configuration status of different startup configuration items, thereby improving the flexibility of the server's startup failure processing method. Therefore, the technical problem of insufficient flexibility in the server's startup failure processing method in the related art can be solved, thereby achieving the technical effect of improving the flexibility of the server's startup failure processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] 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 any creative work.
[0011] Figure 1 This is a hardware structure diagram of the server startup of the embodiment of the present application;
[0012] Figure 2 is a flow chart of a method for starting a server according to an embodiment of the present application;
[0013] Figure 3 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 1 ;
[0014] Figure 4 This is a schematic diagram of a server startup item list according to an embodiment of the present application. Figure 1 ;
[0015] Figure 5 This is a schematic diagram of the startup interface in the first state according to an embodiment of the present application. Figure 1 ;
[0016] Figure 6 This is a schematic diagram of the startup interface in the first state according to an embodiment of the present application. Figure 2 ;
[0017] Figure 7 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 2 ;
[0018] Figure 8This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 1 ;
[0019] Figure 9 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 2 ;
[0020] Figure 10 This is a schematic diagram of a server startup item list according to an embodiment of the present application. Figure 2 ;
[0021] Figure 11 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 3 ;
[0022] Figure 12 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 4 ;
[0023] Figure 13 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 5 ;
[0024] Figure 14 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 3 ;
[0025] Figure 15 is a schematic diagram of a startup interface in the third state according to an embodiment of the present application;
[0026] Figure 16 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 4 ;
[0027] Figure 17 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 5 ;
[0028] Figure 18 This is a process of determining the second retry information according to an embodiment of the present application Figure 1 ;
[0029] Figure 19 This is a process of determining the second retry information according to an embodiment of the present application Figure 2 ;
[0030] Figure 20 This is a process of determining the second retry information according to an embodiment of the present application Figure 3 ;
[0031] Figure 21This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 1 ;
[0032] Figure 22 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 2 ;
[0033] Figure 23 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 3 ;
[0034] Figure 24 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 4 ;
[0035] Figure 25 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 5 ;
[0036] Figure 26 This is a structural block diagram of a server startup device according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0038] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or 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 particular order or sequence.
[0039] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0040] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the server startup method depends, the specific application environment architecture or specific hardware architecture is described here.
[0041] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of the server startup of the embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the startup method of the server in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] An embodiment of the present application provides a method for starting a server, and the method is described in detail in conjunction with the execution flow of the method for starting a server.
[0045] The following is an explanation of the professional terms that appear in this application:
[0046] BIOS (Basic Input / Output System) is the first program that runs when a computer starts up. It is responsible for initializing the hardware, detecting hardware devices, and loading the operating system. The BIOS is stored in ROM (Read-Only Memory) on the motherboard and provides the most basic interaction layer between the hardware and the operating system, ensuring the computer system can start up and run smoothly.
[0047] A Baseboard Management Controller (BMC) is a specialized microcontroller used to monitor and manage the health and status of hardware in servers, workstations, and other computing platforms. A BMC can remotely monitor and control servers through the Intelligent Platform Management Interface (IPMI) protocol. This includes monitoring temperature, voltage, fan speed, and power supply status, as well as performing remote control operations such as power on, power off, and reboot.
[0048] IPMI: Intelligent Platform Management Interface, an industry-standard specification for remotely monitoring and managing system-level events, particularly for servers and other computing devices.
[0049] Redfish, the "Redfish" protocol, standard, or technology, is a standardized management interface for unified management of servers, storage, and network devices in modern data centers. It provides a RESTful (Representational State Transfer) API (Application Programming Interface) that makes hardware management more flexible and efficient.
[0050] In this embodiment, a method for starting a server is provided. Figure 2 is a flow chart of a method for starting a server according to an embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:
[0051] Step S202: starting the operating system of the server through the target startup item of the server, wherein the server includes multiple startup items having a startup sequence, and the target startup item is the first startup item in the startup sequence;
[0052] Step S204 , when the operating system fails to be started through the target startup item, multiple startup items are controlled according to the configuration state of the startup configuration item, wherein the startup configuration item is used to configure a control method for restarting the operating system through the multiple startup items.
[0053] Through the above steps, the server's operating system is started through the server's target startup item. In the case that the operating system fails to start through the target startup item, multiple startup items are controlled according to the configuration status of the startup configuration item for configuring the control method for restarting the operating system through multiple startup items. Different startup failure processing can be achieved by configuring the configuration status of different startup configuration items, thereby improving the flexibility of the server's startup failure processing method. Therefore, the technical problem of insufficient flexibility in the server's startup failure processing method in the related technology can be solved, thereby achieving the technical effect of improving the flexibility of the server's startup failure processing method.
[0054] Optionally, in this embodiment, the server startup method can be, but is not limited to, applied to the control system of the server, and can be, but is not limited to, the process steps of the method given in this application executed by the control system of the server to achieve efficient server startup control.
[0055] Optionally, in this embodiment, the server control system may be, but is not limited to, a comprehensive management platform integrating software and hardware functions. It is responsible for monitoring and managing the server's operating status, including hardware initialization, configuration, performance adjustment, and fault diagnosis. Specifically, the server control system may be, but is not limited to, an out-of-band system. An out-of-band system may refer to, but is not limited to, a system outside the server's in-band system. An out-of-band system is independent of the operating system and can provide the lowest-level, direct hardware management and control for the device.
[0056] Optionally, in this embodiment, the server's control system may be, but is not limited to, a BIOS. The BIOS may be, but is not limited to, a ROM chip embedded on the server's mainboard and a set of programs running on it. This set of programs includes the computer's most important basic input and output programs, system setup information, a post-boot self-test program, and a system startup program. The BIOS provides the lowest-level, direct hardware configuration and control for the device. Currently, the BIOS is primarily used for device power-on self-test, hardware initialization, driver loading, and system booting. It typically exits automatically after the device enters the system.
[0057] Optionally, in this embodiment, the server control system may also use, but is not limited to, UEFI (Unified Extensible Firmware Interface). UEFI is a modern, BIOS-replaceable firmware interface standard for interaction between the operating system and firmware. UEFI aims to improve upon the limitations of traditional BIOS and provide a more secure, efficient, and scalable boot environment.
[0058] In the embodiment provided in step S202, startup items may be, but are not limited to, also referred to as boot options or boot devices. These refer to different hardware devices or network locations that can be used to load the operating system during the server startup process. Boot items can include various types, including hard disk, network boot, and USB (Universal Serial Bus) devices.
[0059] Optionally, in this embodiment, multiple startup items with a startup sequence may be set for the server, but is not limited to being set. For example, five startup items may be set for the server, namely startup item A, startup item B, startup item C, startup item D, and startup item E. The startup sequence among them may be, but is not limited to, startup item A -> startup item B -> startup item C -> startup item D -> startup item E. The control system of the server may, but is not limited to, attempt to load the operating system from each device according to this order when the server starts.
[0060] Optionally, in this embodiment, during the startup process of the server, the available startup items of the server and the order of the available startup items of the server can be changed, but not limited to, by entering the configuration interface of the control system.
[0061] Optionally, in this embodiment, the server operating system can be started through the server's first startup item, i.e., the target startup item, after the server boots up to the stage where the operating system is to be started, i.e., after the server's control system completes the initialization of the server's hardware devices, but is not limited to.
[0062] Optionally, in this embodiment, the server control system initializes the server's hardware devices, which may include, but is not limited to, the following: When the server is powered on, the control system first performs a power-on self-test, checking whether the server's hardware devices, such as the CPU (Central Processing Unit), memory, hard disk, and graphics card, are functioning properly. If a hardware failure is detected, the control system will sound an alarm or display an error message; the control system will detect and initialize various hardware devices, allocating resources (such as interrupts, DMA (Direct Memory Access) channels, and I / O (Input / Output) ports) to them. For example, it will set the initial state of the memory and detect hard disk partition information; the control system will also adjust the hardware's operating status based on parameters configured by the user in the control system's configuration interface (such as time and security settings). After hardware initialization is complete, the server's startup may enter the operating system startup phase, which may be, but is not limited to, the operating system startup phase.
[0063] In the embodiment provided in step S204, when the operating system fails to be started through the target startup item, multiple startup items can be controlled according to the configured control method of restarting the operating system through multiple startup items to further attempt to start the operating system.
[0064] Optionally, in this embodiment, the configuration state of the startup configuration item may include, but is not limited to, multiple states. Different states may represent, but are not limited to, different control methods for restarting the operating system through multiple startup items. The user may, but is not limited to, select the configuration state of the startup configuration item on the control system configuration interface to select different server startup failure response methods, thereby achieving flexible startup failure handling.
[0065] In an exemplary embodiment, controlling multiple startup items according to the configuration status of the startup configuration item can be achieved in the following manner, but is not limited to: when the configuration status is the first state, polling the reference startup item in the startup order, wherein the reference startup item is a startup item other than the target startup item among the multiple startup items; when the startup of the operating system fails through the reference startup item, stopping the startup of the operating system and displaying a first prompt message on the startup interface of the server, wherein the first prompt message is used to prompt that there is no bootable device and the startup control system of the server will stop running without rebooting the operating system.
[0066] Optionally, in this embodiment, Figure 3 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 1 .like Figure 3As shown, it is possible, but not limited to, when the configuration state is the first state, to first attempt to boot the operating system through the target boot item according to the boot sequence. If the target boot item fails to boot the operating system, the reference boot items other than the target boot item are tested to see if the operating system can be successfully booted. If any boot item successfully boots the operating system, the operating system is successfully entered and the control system stops running. If all reference boot items fail to boot the operating system, the operating system is stopped, the server's boot interface is left at a blank page, and a first prompt message is displayed on the server's boot interface. In the above process, it is possible, but not limited to, printing the process of attempting to boot the operating system through each boot item on the server's boot interface, or printing part of the process of attempting to boot the operating system through each boot item on the server's boot interface (i.e., selectively printing the process of attempting to boot the operating system through a portion of the boot items on the boot interface, and not printing the process of attempting to boot the operating system through another portion of the boot items on the boot interface). It is possible, but not limited to, displaying a first prompt message on the boot interface to indicate that there is no bootable device and the server's boot control system will stop running without rebooting if all the server's boot items fail to boot the operating system. Specifically, the first prompt information may be, but is not limited to, "There is currently no bootable device", or may be, but is not limited to, "No bootable device.system will stop without reboot (There is no bootable device, the system will stop running and will not restart automatically)", and this application does not make specific limitations on this.
[0067] Optionally, in this embodiment, Figure 4 This is a schematic diagram of a server startup item list according to an embodiment of the present application. Figure 1 .like Figure 4 As shown, multiple server startup items and the startup order of the startup items can be configured on the control system configuration interface, and a startup item list can be displayed. For server A, the currently available startup items can include startup item A, startup item B, startup item C, startup item D, and startup item E, and the startup order can be, but is not limited to, startup item A -> startup item B -> startup item C -> startup item D -> startup item E. Figure 5 This is a schematic diagram of the startup interface in the first state according to an embodiment of the present application. Figure 1 .like Figure 5 As shown, the operating system can be started through startup item A first, but is not limited to being started through startup item B after failure, and so on, until the operating system is started through startup item E, and the startup failure process is displayed on the startup interface. Figure 6 This is a schematic diagram of the startup interface in the first state according to an embodiment of the present application. Figure 2 .like Figure 6 As shown, it is possible but not limited to stopping the startup of the operating system when the operating system cannot be started through the startup item E, and displaying the first prompt information on the startup interface of the server.
[0068] With the above, when the target boot item fails to boot, it can automatically and intelligently switch to the reference boot item for retry, following the polling process in the boot order. This method improves the server's boot flexibility and robustness, and can, to a certain extent, automatically resolve boot interruptions caused by the failure of a specific boot item. If the operating system cannot be successfully booted even after polling all reference boot items, the boot process will be stopped and the first prompt message will be displayed on the boot interface, informing the user that there is no bootable device. This mechanism ensures that when all possible boot options fail to work properly, the severity of the problem can be quickly understood and manual intervention measures can be taken in a timely manner.
[0069] In an exemplary embodiment, controlling multiple startup items according to the configuration state of the startup configuration item can be achieved, but is not limited to, in the following manner: when the configuration state is the second state, polling multiple startup items according to the type of the target startup item, the first retry parameter, and the startup order, wherein the first retry parameter is used to indicate the maximum number of attempts to start the operating system through the startup item of the target type, and the startup item of the target type is used to boot the server into the pre-boot execution environment; in the event that polling multiple startup items according to the type of the target startup item, the first retry parameter, and the startup order fails, retrying the multiple startup items according to the first retry parameter and the startup order.
[0070] Optionally, in this embodiment, when the configuration state is the second state, it is possible but not limited to first polling multiple startup items based on the type of the target startup item (i.e., whether the target startup item is a startup item of the target type), the first retry parameter, and the startup order. If polling multiple startup items fails to start the operating system, then retry to start the operating system through multiple startup items based on the type of the target startup item, the first retry parameter, and the startup order.
[0071] Optionally, in this embodiment, Figure 7 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 2 .like Figure 7As shown, it is possible, but not limited to, when the configuration state is the second state, to first try to boot the operating system through the target boot item according to the boot order. If the target boot item fails to boot the operating system, the operating system is tried to boot through multiple boot items. If all boot items fail, the attempt is restarted from the beginning. When the configuration state is the second state, the process of controlling multiple boot items may, but is not limited to, also involve a first retry parameter. The first retry parameter may, but is not limited to, be visible only when the configuration state is the second state. Its optional values may, but are not limited to, include 1-99, where 1-98 may, but is not limited to, represent that the maximum number of attempts to boot the operating system through the target type of boot item is 1-98 times, and 99 may, but is not limited to, represent that the maximum number of attempts to boot the operating system through the target type of boot item is unlimited.
[0072] Optionally, in this embodiment, the startup items can be divided into target-type startup items and other types of startup items, but are not limited to booting the server into a preboot execution environment. The target-type startup items can include but are not limited to PXE (Preboot eXecution Environment) startup items.
[0073] Optionally, in this embodiment, the first retry parameter may be, but is not limited to, used to indicate a maximum number of attempts to start the operating system through a startup item of the target type.
[0074] In an exemplary embodiment, polling multiple startup items according to the type of the target startup item, the first retry parameter and the startup order can be implemented in the following manner, but is not limited to: when the target startup item belongs to the target type, polling other startup items in the startup order, wherein the other startup items are startup items of the target type in the reference startup items, and the reference startup items are startup items other than the target startup items in the multiple startup items; when the operating system fails to be started through other startup items, repeatedly polling candidate startup items in the startup order and the number of retries until the operating system is successfully started or the number of repeated polling of the candidate startup items reaches the number of retries, wherein the number of retries is equal to the first retry parameter minus one, and the candidate startup item is a startup item of the target type in the multiple startup items; when the number of polling reaches the retry number, polling alternative startup items in the startup order, wherein the alternative startup items are startup items other than the candidate startup items in the multiple startup items.
[0075] Optionally, in this embodiment, when the target startup item, i.e., the startup item that has been attempted to start the operating system, is of the target type, the process of polling multiple startup items based on the type of the target startup item (i.e., whether the target startup item is of the target type), the first retry parameter, and the startup order can be divided into three stages: the first stage is to poll startup items other than the target startup item (i.e., other startup items) of the target type in accordance with the startup order; the second stage is to repeatedly poll all startup items of the target type in the multiple startup items based on the number of retries and the startup order; and the third stage is to poll all startup items of the non-target type in the multiple startup items based on the startup order. In the above polling process, as long as the operating system is successfully started through any startup item, the subsequent process does not need to be executed, i.e., there is no need to poll the remaining startup items that have not been polled.
[0076] Optionally, in this embodiment, in the above-mentioned server A, startup item A, startup item B and startup item C can be but are not limited to target type startup items, startup item D and startup item E can be but are not limited to non-target type startup items, and the first retry parameter can be but are not limited to be configured as 2. Figure 8 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 1 .like Figure 8 As shown, it is possible, but not limited to, to poll startup items B and C (i.e., other startup items) in the startup sequence when startup item A (i.e., the target startup item) fails to start the operating system. If startup item C also fails after startup item B fails to start the operating system, it is possible, but not limited to, to repeatedly poll startup items A, B, and C (i.e., candidate startup items) in the startup sequence until the operating system is successfully started or the number of repeated polling of startup items A, B, and C reaches the number of retries (equal to the first retry parameter minus one). Since the first retry parameter configured for this startup of Server A is 2, the number of retries is 1, so it is only necessary to poll startup items A, B, and C (i.e., candidate startup items) once more. After the number of polling reaches one (i.e., the number of retries), it is possible, but not limited to, to poll startup items D and E (i.e., alternative startup items) in the startup sequence. It is possible, but not limited to, to print and display the above process of failing to start the operating system through each startup item on the server's startup interface.
[0077] With the above, if the initial attempt to boot a target boot item fails, the system quickly switches to a similar boot item for polling. If the target boot item fails to boot the operating system after multiple attempts, the system switches to a non-target boot item for polling. This ensures that various valid paths are used to achieve booting within limited resources.
[0078] In an exemplary embodiment, polling other startup items according to the startup order or repeatedly polling candidate startup items according to the startup order and the number of retries can be implemented in the following manner, but is not limited to: repeatedly performing the following steps until each startup item in the startup items to be polled is polled or the operating system is successfully started, wherein the startup items to be polled include other startup items or candidate startup items:
[0079] The startup item that is not currently polled and is at the front of the startup order among the startup items to be polled is determined as the current startup item; the network configuration information of the server is repeatedly obtained from the network server until the network configuration information is successfully obtained or the first repetition number of times of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter; when the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0080] Optionally, in this embodiment, when polling the startup items of the target type, control of a second retry parameter may be involved, but is not limited to. The second retry parameter may be used, but is not limited to, to indicate the maximum number of attempts to obtain network configuration information from the network server, that is, the maximum number of attempts to obtain network configuration information from the network server when attempting to boot the operating system through each startup item of the target type.
[0081] Optionally, in this embodiment, when booting an operating system through a target-type boot item, a connection may be established with a network server to obtain network configuration information from the network server. Subsequently, the network configuration information may be used to interact with a network boot server to obtain a boot program from the network boot server to further boot the operating system. Optionally, the target type may be, but is not limited to, a PXE type, the network server may be, but is not limited to, a DHCP (Dynamic Host Configuration Protocol) server, and the network boot server may be, but is not limited to, a PXE server.
[0082] Optionally, in this embodiment, in the aforementioned first stage, polling other startup items in the startup order can be achieved but is not limited to the following steps: repeat the following steps until each startup item in the other startup items is polled or the operating system is successfully started: determine the startup item in the other startup items that is not currently polled and is at the front of the startup order as the current startup item; repeatedly obtain the network configuration information of the server from the network server until the network configuration information is successfully obtained or the number of times the network configuration information is repeatedly obtained from the network server (i.e., the first number of repetitions) reaches a second retry parameter; when the network configuration information is obtained, start the operating system through the current startup item according to the network configuration information.
[0083] Optionally, in this embodiment, in the aforementioned second stage, repeated polling of candidate startup items according to the startup order and retry number can be achieved, but is not limited to, by the following steps: repeatedly executing the following steps until each startup item in the candidate startup items is polled or the operating system is successfully started: determining the startup item in the candidate startup items that is not currently polled and is at the front of the startup order as the current startup item; repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or the number of times the network configuration information is repeatedly obtained from the network server (i.e., the first number of repetitions) reaches a second retry parameter; in the case of obtaining the network configuration information, starting the operating system through the current startup item according to the network configuration information.
[0084] Optionally, in this embodiment, Figure 9 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 2 .like Figure 9 As shown, it is possible but not limited to displaying a printout (e.g., "Starting the operation through the target type startup item") on the server startup interface when attempting to start the operating system through the target type startup item (including polling other startup items according to the startup sequence and repeatedly polling candidate startup items according to the startup sequence and the number of retries). Figure 9 ), and may, but is not limited to, display the second retry parameter configured for the target type of startup item on the server's startup interface. It may, but is not limited to, performing multiple DHCP connection timeout retries during PXE startup through the network port of startup item A until network configuration information is obtained or the number of timeout retries (i.e., the first retry count) reaches the limit (i.e., the second retry parameter) (i.e., repeatedly obtaining the server's network configuration information from the network server until the network configuration information is successfully obtained or the first retry count of repeatedly obtaining the network configuration information from the network server reaches the second retry parameter). Optionally, if network configuration information cannot be obtained through startup item A multiple times, it may, but is not limited to, displaying a failure to obtain network configuration information on the server's startup interface. Afterwards, you may, but are not limited to, attempt to boot the operating system through startup item B. The process of attempting to boot the operating system through startup item B is similar to the process of attempting to boot the operating system through startup item A. You may, but are not limited to, also display the process of attempting to boot the operating system through startup item B on the server's startup interface, that is, the server's startup interface will display: printing of starting to boot the operating system through startup item B, second retry parameters, and display of failure to obtain network configuration information if network configuration information cannot be successfully obtained through the network port of startup item B. Afterwards, the process of attempting to boot the operating system through startup item C, startup item A, startup item B, and startup item C according to the startup sequence and the number of retries is similar to the previous process, and the display on the server's startup interface is similar to the previous process, and will not be repeated here.
[0085] Through the above content, by setting the second retry parameter, when the network configuration information acquisition fails, a certain number of repeated attempts will be made, which greatly improves the possibility of successfully acquiring the network configuration information when the network is unstable or the communication between the server and the network device is abnormal, thereby increasing the success rate of PXE boot.
[0086] In an exemplary embodiment, polling multiple startup items according to the type of the target startup item, the first retry parameter, and the startup order can be implemented in the following manner, but is not limited to:
[0087] If the target boot item does not belong to the target type, repeat the following steps until each boot item in the reference boot item is polled or the operating system is successfully started. The reference boot item is a boot item in the multiple boot items other than the target boot item:
[0088] Determine the startup item in the reference startup item that is not currently polled and is at the front of the startup order as the current startup item; if the current startup item does not belong to the target type, start the operating system through the current startup item; if the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the second repetition number of the following steps reaches the first retry parameter: poll the candidate startup items in the startup order, wherein the candidate startup items are the startup items in the reference startup items that belong to the target type.
[0089] Optionally, in this embodiment, Figure 10 This is a schematic diagram of a server startup item list according to an embodiment of the present application. Figure 2 .like Figure 10 As shown, multiple server startup items and the startup order of the startup items can be configured on the control system configuration interface, and a startup item list can be displayed. For server B, the currently available startup items can include startup item F, startup item G, startup item H, and startup item I. The startup order can be, but is not limited to, startup item F -> startup item G -> startup item H -> startup item I. Startup item G and startup item H can be, but are not limited to, of the target type, and startup item F and startup item I can be, but are not limited to, not of the target type. Figure 11 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 3 .like Figure 11As shown, the first retry parameter of Server B can be, but is not limited to, configured as 2. The operating system can be, but is not limited to, first booting the operating system through boot item F (i.e., the target boot item). If booting the operating system through boot item F fails and boot item F does not belong to the target type, boot item G, which is not currently polled and is at the front of the boot order among the multiple boot items of Server B other than boot item F, is determined as the current boot item. If boot item G belongs to the target type, the following steps are repeated until the operating system is successfully booted or the second number of repetitions of the following steps reaches the first retry parameter: polling boot item G and boot item H (i.e., the candidate boot item) in the boot order. If the second number of repetitions reaches the first retry parameter, boot item I can be, but is not limited to, again determined as the current boot item. Boot item I does not belong to the target type, and the operating system is booted through boot item I. The above boot process can be, but is not limited to, printed and displayed on the server's boot interface.
[0090] In an exemplary embodiment, polling candidate startup items in the startup order may be implemented in the following manner, but is not limited to:
[0091] Repeat the following steps until all candidate boot items are polled or the operating system is successfully started:
[0092] The startup item among the candidate startup items that is not currently polled and is at the front of the startup order is determined as the current startup item; the network configuration information of the server is repeatedly obtained from the network server until the network configuration information is successfully obtained or the third repetition number of times of repeatedly obtaining the network configuration information from the network server reaches the second retry parameter; when the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0093] Optionally, in this embodiment, if Figure 11As shown, the process of polling startup item G and startup item H (i.e., candidate startup items) in the startup order may include, but is not limited to: determining the startup item G that is not currently polled and is the first in the startup order among startup item G and startup item H as the current startup item; repeatedly obtaining the network configuration information of the server from the network server through the network port of startup item G until the network configuration information is successfully obtained or the number of times of repeatedly obtaining the network configuration information from the network server through the network port of startup item G (i.e., the third repetition number) reaches the second retry parameter; in case the network configuration information is obtained, starting the operating system through startup item G according to the network configuration information; in case the operating system fails to be started through startup item G or the number of times of obtaining the network configuration information from the network server through the network port of startup item G reaches the second retry parameter In the case of a retry parameter, the startup item H, which is not currently polled and is the earliest in the startup order, among the startup items G and H, is determined as the current startup item; the network configuration information of the server is repeatedly obtained from the network server through the network port of the startup item H until the network configuration information is successfully obtained or the number of times the network configuration information is repeatedly obtained from the network server through the network port of the startup item H (i.e., the third retry number) reaches the second retry parameter; when the network configuration information is obtained, the operating system is started through the startup item H according to the network configuration information; when the operating system fails to be started through the startup item G or the number of times the network configuration information is repeatedly obtained from the network server through the network port of the startup item H reaches the second retry parameter, it is determined that the polling of startup item G and startup item H (i.e., the candidate startup items) is exhausted.
[0094] In an exemplary embodiment, retrying multiple startup items according to the first retry parameter and the startup sequence may be implemented in the following manner, but is not limited to: repeatedly performing the following steps until the operating system is successfully started:
[0095] A second prompt message is displayed on the startup interface of the server, wherein the second prompt message is used to prompt to restart the operating system in the second state after the target duration; when the duration for displaying the second prompt message reaches the target duration, multiple startup items are retried according to the first retry parameter and the startup sequence.
[0096] Optionally, in this embodiment, Figure 12 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 4 . Figure 13 This is a schematic diagram of the startup interface in the second state according to an embodiment of the present application. Figure 5 .like Figure 12 As shown, for server A, it is possible but not limited to displaying a second prompt message on the server's startup interface when all the initial attempts to start the operating system through the multiple startup items have failed according to the startup sequence. Figure 13As shown, for server B, similarly, it is possible but not limited to displaying a second prompt message on the server's startup interface when the initial attempts to start the operating system through startup items F, G, H, and I in the startup sequence all fail.
[0097] Optionally, in this embodiment, the second prompt information can be, but is not limited to, used to prompt the operating system to be restarted in the second state after the target time. Specifically, when the target time is 5 seconds, the second prompt information can be, but is not limited to, "No bootable device. A bootable device will be automatically found after 5 seconds", or can also be, but is not limited to, "Nobootable device.system will find bootable device automatically after 5seconds (No bootable device. The system will automatically find a bootable device after 5 seconds)", and this application does not make specific restrictions on this. Optionally, the countdown process of the target time can be displayed on the server's startup interface, but is not limited to, to prompt the user that the next round of re-attempting to start the operating system through multiple startup items of the server is about to begin.
[0098] Optionally, in this embodiment, when the duration of displaying the second prompt information reaches the target duration, multiple startup items may be retried according to the first retry parameter and the startup sequence, but is not limited to the above.
[0099] Optionally, in this embodiment, the steps of displaying the second prompt information and retrying multiple startup items according to the startup sequence may be repeated but is not limited to, until the operating system is successfully started.
[0100] Through the above content, by repeatedly displaying the second prompt information during the repeated execution of the steps, the user can understand the retry method of retrying multiple startup items, thereby improving the user's usage experience.
[0101] In an exemplary embodiment, retrying multiple startup items according to the first retry parameter and the startup order can be implemented in the following manner, but is not limited to: repeatedly performing the following steps until each of the multiple startup items is retried or the operating system is successfully started:
[0102] Determine the startup item that has not been retried and is at the front of the startup order among multiple startup items as the current startup item; if the current startup item does not belong to the target type, restart the operating system through the current startup item; if the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the fourth repetition number of the following steps reaches the first retry parameter: retry the candidate startup items in the startup order, wherein the candidate startup items are startup items that belong to the target type among multiple startup items, and the candidate startup items include the current startup item.
[0103] Optionally, in this embodiment, if Figure 12 As shown, the process of retrying multiple startup items according to the first retry parameter and the startup order may include, but is not limited to: starting the operating system through startup item A, startup item B and startup item C in the startup order; if the operating system is not successfully started through startup item A, startup item B and startup item C, since the first retry parameter configured for server A is 2, the operating system may be started again through startup item A, startup item B and startup item C in the startup order, but is not limited to; if the operating system is not successfully started through startup item A, startup item B and startup item C again, the operating system is started through startup item D; if the operating system is not successfully started through startup item D, the operating system is started through startup item E; if the operating system is not successfully started through startup item E, it is determined that each of the multiple startup items of server A has been retried.
[0104] Optionally, in this embodiment, if Figure 13 As shown, the process of retrying multiple startup items according to the first retry parameter and the startup sequence may include, but is not limited to: starting the operating system through startup item F; if the operating system fails to start through startup item F, starting the operating system through startup items G and H according to the startup sequence; if the operating system fails to start through both startup items G and H, since the first retry parameter configured for server B is 2, the process may include, but is not limited to, starting the operating system through startup items G and H according to the startup sequence again. If the operating system fails to start through startup items G and H again, the operating system is started through startup item I. If the operating system fails to start through startup item I, it is determined that each of the multiple startup items of server B has been retried.
[0105] In an exemplary embodiment, the following method may be used, but is not limited to, to implement retrying candidate startup items in the startup order: repeatedly performing the following steps until each startup item in the candidate startup items is retried or the operating system is successfully started:
[0106] The startup item among the candidate startup items that has not been retried and is the first in the startup order is determined as the current startup item; the network configuration information of the server is repeatedly obtained from the network server until the network configuration information is successfully obtained or the fifth repetition number of obtaining the network configuration information from the network server reaches the second retry parameter; when the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0107] Optionally, in this embodiment, starting the operating system through startup item A, startup item B and startup item C in the startup order may include, but is not limited to: determining startup item A as the current startup item, repeatedly obtaining the network configuration information of the server from the network server through the network port of startup item A until the network configuration information is successfully obtained or the number of times the network configuration information is repeatedly obtained from the network server through the network port of startup item A (i.e., the fifth number of repetitions) reaches a second retry parameter; in case the network configuration information is obtained, starting the operating system through the current startup item, i.e., startup item A, according to the network configuration information; in case the number of times the network configuration information is repeatedly obtained from the network server through the network port of startup item A (i.e., the fifth number of repetitions) reaches the second retry parameter or the operating system fails to be started through the current startup item, i.e., startup item A, according to the network configuration information, determining startup item B as the current startup item, repeatedly obtaining the network configuration information of the server from the network server through the network port of startup item B until the network configuration information is successfully obtained or the number of times the network configuration information is repeatedly obtained from the network server through the network port of startup item B (i.e., the fifth number of repetitions) reaches the second retry parameter; in In a case where the network configuration information is obtained, the operating system is started through the current startup item, i.e., startup item B, according to the network configuration information; if the number of times (i.e., the fifth number of repetitions) of repeatedly obtaining the network configuration information from the network server through the network port of startup item B reaches a second retry parameter or the operating system fails to be started through the current startup item, i.e., startup item B, according to the network configuration information, startup item C is determined as the current startup item, and the network configuration information of the server is repeatedly obtained from the network server through the network port of startup item C until the network configuration information is successfully obtained or the number of times (i.e., the fifth number of repetitions) of repeatedly obtaining the network configuration information from the network server through the network port of startup item C reaches the second retry parameter; in a case where the network configuration information is obtained, the operating system is started through the current startup item, i.e., startup item C, according to the network configuration information; if the number of times (i.e., the fifth number of repetitions) of repeatedly obtaining the network configuration information from the network server through the network port of startup item C reaches the second retry parameter or the operating system fails to be started through the current startup item, i.e., startup item C, according to the network configuration information, it is determined that each of startup items A, startup item B, and startup item C (i.e., candidate startup items) has been retried.
[0108] In an exemplary embodiment, controlling multiple startup items according to the configuration status of the startup configuration item can be achieved in the following manner, but is not limited to: when the configuration status is the third state, polling the reference startup item in the startup order, wherein the reference startup item is a startup item other than the target startup item among the multiple startup items; in the event that starting the operating system through the reference startup item fails, retrying the multiple startup items in the startup order.
[0109] Optionally, in this embodiment, Figure 14 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 3 .like Figure 14 As shown, it is possible, but not limited to, when the configuration state is the third state, to first try to start the operating system through the target startup item according to the startup sequence. If the operating system fails to be started through the target startup item, whether the operating system can be successfully started through the reference startup items other than the target startup item. If the operating system is successfully started through any startup item, the operating system is successfully entered and the control system stops running. If the operating system cannot be started through all the reference startup items, multiple startup items are retried according to the startup sequence.
[0110] In an exemplary embodiment, retrying multiple startup items in the startup order may be achieved, but is not limited to, in the following manner: repeatedly performing the following steps until the operating system is successfully started:
[0111] A third prompt message is displayed on the startup interface of the server, wherein the third prompt message is used to prompt to restart the operating system in a third state after a reference time; when the time for displaying the third prompt message reaches the reference time, the hardware device of the server is initialized; and multiple startup items are retried in the startup order.
[0112] Optionally, in this embodiment, if Figure 14 As shown, if both the target startup item and the reference startup item fail to start the operating system, you can, but are not limited to, first perform a cold restart (i.e., initialize the server's hardware devices), and then try to start the operating system again through multiple startup items in the startup sequence. If it still fails, perform another cold restart, and then retry multiple startup items after the cold restart, and so on, and repeat the above steps repeatedly until the operating system is successfully started.
[0113] Optionally, in this embodiment, when the configuration state of server A is the third state, the operating system is first started through startup item A (i.e., the target startup item) according to the startup sequence. If startup item A fails to start the operating system, the operating system is started through startup item B according to the startup sequence. If startup item B fails to start the operating system, the operating system is started through startup item C. This process is repeated until startup item E also fails to start the operating system, and it is determined that startup of the operating system through the reference startup item has failed. The above-mentioned failed attempt process may be printed and displayed on the server startup interface, but is not limited to.
[0114] Figure 15 Schematic diagram of the startup interface in the third state according to an embodiment of the present application. Figure 15As shown, in the case where the startup of the operating system fails through the reference startup item, a third prompt message may be displayed on the startup interface of the server, but is not limited to. The third prompt message may be used, but is not limited to, to prompt the operating system to be restarted according to the third state after the reference time. Specifically, when the reference time is 5 seconds, the third prompt message may be, but is not limited to, "No bootable device. It will automatically restart after 5 seconds", or may be, but is not limited to, "No bootable device.systemwill reboot automatically after 5 seconds (No bootable device. The system will automatically restart after 5 seconds)", which is not specifically limited in this application. Optionally, the countdown process of the reference time may be displayed on the startup interface of the server, but is not limited to, to prompt the user that the next round of re-attempts to start the operating system through multiple startup items of the server is about to begin.
[0115] Optionally, in this embodiment, when the duration of displaying the third prompt information reaches a reference duration, the server hardware device may be initialized and multiple startup items may be retried in the startup sequence, but is not limited to the above.
[0116] Optionally, in this embodiment, the steps of displaying the third prompt information, initializing the hardware device of the server, and retrying multiple startup items in the startup sequence may be repeated but is not limited to, until the operating system is successfully started.
[0117] Through the above, by initializing the server's hardware devices before polling multiple startup items each time, it is possible to resolve the small probability of recoverable failures or communication errors during the startup process and increase the possibility of successfully starting the operating system through multiple startup items.
[0118] In an exemplary embodiment, retrying multiple startup items in the startup order can be achieved, but is not limited to, by the following method: determining an initial value of a sixth repetition number to be 1, where the sixth repetition number is used to indicate the number of times the hardware device of the server has been initialized; and repeatedly performing the following steps until the operating system is successfully started or control of the multiple startup items is completed:
[0119] Detect the size relationship between the sixth repetition number and the third retry parameter; when the sixth repetition number is less than the third retry parameter, display a fourth prompt message on the server's startup interface, wherein the fourth prompt message is used to prompt to restart the operating system according to the third state after the candidate time length; when the length of time for displaying the fourth prompt message reaches the candidate time length, initialize the server's hardware device and update the sixth repetition number; retry multiple startup items in the startup order; when the sixth repetition number is equal to the third retry parameter, determine that the control of multiple startup items is completed.
[0120] Optionally, in this embodiment, Figure 16 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 4 .like Figure 16 As shown, the number of times the steps of displaying the third prompt message, initializing the server's hardware devices, and retrying multiple startup items in the startup order can be limited, but not limited to. When the number of repeated executions reaches the limit, the attempt to start the operating system will be stopped even if the operating system is not successfully started.
[0121] Optionally, in this embodiment, the sixth repetition number can be, but is not limited to, used to indicate the number of times the initialization of the server's hardware device has been performed. Since the initialization of the server's hardware device has been performed once (performed before starting the operating system through the target startup item) when executing the step of retrying multiple startup items in the startup order, the initial value of the sixth repetition number can be, but is not limited to, determined to be 1, and then the value of the sixth repetition number is updated after each execution of the initialization operation of the server's hardware device.
[0122] Optionally, in this embodiment, it is possible but not limited to displaying a fourth prompt message on the server's startup interface when the sixth repetition number is less than the third retry parameter, that is, when the number of repetitions of displaying the third prompt message, initializing the server's hardware devices, and retrying multiple startup items in the startup order does not reach a limit. The fourth prompt message may be, but is not limited to, used to prompt the operating system to be restarted according to the third state after the candidate time. Specifically, when the candidate time is 5 seconds, the fourth prompt message may be, but is not limited to, "No bootable device. It will automatically restart after 5 seconds", or may be, but is not limited to, "No bootable device.systemwill reboot automatically after 5 seconds (No bootable device. The system will automatically restart after 5 seconds)", which is not specifically limited in this application. Optionally, it is possible but not limited to displaying a countdown process for the candidate time on the server's startup interface to prompt the user that the next round of retrying to start the operating system through multiple startup items on the server is about to begin.
[0123] Optionally, in this embodiment, it is possible but not limited to the case where the sixth number of repetitions is equal to the third retry parameter, that is, the number of repetitions of displaying the third prompt message, initializing the server's hardware devices, and retrying multiple startup items in the startup sequence has reached a limit, it is determined that the control of multiple startup items is completed, and the steps of displaying the third prompt message, initializing the server's hardware devices, and retrying multiple startup items in the startup sequence are no longer performed, and the fifth prompt message is displayed on the server's startup interface. The fifth prompt message can be, but is not limited to, used to prompt that there is no bootable device and the server's startup control system will stop running without rebooting the operating system. Specifically, the fifth prompt message can be, but is not limited to, "There is currently no bootable device", or can also be, but is not limited to, "No bootable device.system will stop without reboot (There is no bootable device, the system will stop running and will not restart automatically)", and this application does not make specific restrictions on this.
[0124] Through the above content, by limiting the number of times the server's hardware devices are initialized, it is possible to avoid waste of resources caused by excessive retries.
[0125] In an exemplary embodiment, controlling multiple startup items according to the configuration state of the startup configuration item can be achieved, but is not limited to, in the following manner: when the configuration state is the fourth state, repeatedly performing the following steps until the operating system is successfully started or multiple startup items are polled:
[0126] Determine a startup item that currently fails to start the operating system as a backup startup item; obtain first retry information of the backup startup item, wherein the first retry information is used to indicate a first way to restart the operating system through the backup startup item, and multiple startup items include the backup startup item; restart the operating system through the backup startup item according to the first retry information, and output a restart log; obtain second retry information of the backup startup item, wherein the second retry information is used to indicate a second way to restart the operating system through the backup startup item; restart the operating system through the backup startup item according to the second retry information; in the event that the operating system fails to be restarted through the backup startup item according to the second retry information or in the event that the second retry information is not received within a period of time when the restart log is output, start the operating system through the next startup item, wherein the next startup item is the next startup item after the backup startup item in the startup order.
[0127] Optionally, in this embodiment, since the startup order reflects to a certain extent the user's expectation of the priority of use of the startup items, generally speaking, users prefer to use the startup items that are ranked higher in the startup order to start the operating system. Therefore, the startup configuration item can be configured to the fourth state, but is not limited to, and when the configuration state is the fourth state, if the operating system fails to be started through the target startup item, an attempt can be made to repair the target startup item and use the target startup item to start the operating system as much as possible. Figure 17 This is a schematic diagram of a method for starting a server according to an embodiment of the present application. Figure 5 . Specifically, Figure 17 As shown, it is possible but not limited to starting the diagnostic mode when the configuration state is the fourth state, collecting startup logs, and attempting to repair the faulty startup item through log parsing and pattern recognition.
[0128] Optionally, in this embodiment, in order to avoid long waiting times affecting the startup time of the server, the operating system may be started through the next startup item if, but not limited to, no second retry information is received within the time period of the restart log output waiting time.
[0129] Optionally, in this embodiment, it is also possible but not limited to repeatedly restarting the operating system through the backup startup item according to the first retry information during the process of outputting the startup log and waiting to obtain the second retry information until the operating system is successfully started or the second retry information is received.
[0130] In an exemplary embodiment, obtaining the first retry information of the backup startup item can be achieved but is not limited to the following method: the control system of the server sends the startup item information of the backup startup item to the controller of the server, wherein the startup item information is used to indicate that the control system failed to start the operating system through the backup startup item; the controller generates the first retry information based on the server startup information and the startup item information, wherein the server startup information is used to indicate the first mode corresponding to each startup item, and the first mode includes a cold start mode and a hot start mode; the controller sends the first retry information to the control system, and the controller increases the log output level of the control system, wherein the higher the log output level of the control system, the more information is included in the log output by the control system.
[0131] Optionally, in this embodiment, it is possible but not limited to that when the operating system fails to start through a certain startup item (i.e., a backup startup item), the control system of the server first obtains the first retry information of the startup item, i.e., obtains the first method of retrying to start the operating system through the startup item for the first time. The first method may be, but is not limited to, a cold start method or a hot start method. The cold start method is to initialize the hardware device of the server first and then retry the startup item. The hot start method is to directly retry the startup item.
[0132] Optionally, in this embodiment, the server controller may be, but is not limited to, a control device that can be used for server management and monitoring. Similarly, the server controller may be, but is not limited to, an out-of-band system. Specifically, the server controller may be, but is not limited to, a BMC or a CPLD (Complex Programmable Logic Device). Among them, the BMC does not rely on the server's processor, BIOS, or operating system. The BMC hardware implementation may be an independent board installed on the server motherboard, or it may be integrated on the motherboard. The BMC is not restricted by the previous operating system-based management methods. For example, when the operating system is not responding or not loaded, the server can still be turned on and off, and server-related information can be extracted through the BMC.
[0133] Optionally, in this embodiment, if the BIOS (i.e., the server's control system) fails to boot the operating system using a backup boot option, the BIOS may send the currently unbootable boot option (i.e., the backup boot option) to the BMC (i.e., the server's controller) via IPMI, for intelligent decision-making. The BMC's decision is primarily based on extensive experience gained by server manufacturers, and it determines whether a cold reboot or a warm reboot should be performed. For example, if a low-probability recoverable failure or communication error during the boot process can be resolved by a cold reboot, the BMC will issue a cold reboot command. Otherwise, the BMC will issue a warm reboot command. When the BMC issues the reboot command (i.e., sends the first retry message), it also simultaneously changes the BIOS debug level (i.e., the log output level) from the default Disable (no process log printing) to Normal (most process log printing). This ensures that when the BIOS boots the operating system again using the backup boot option, it will output more information about the operating system boot process.
[0134] Through the above content, by analyzing and determining the first retry information by the controller, compared with the control system analyzing and generating the first retry information itself, it is possible to avoid the repair diagnosis process of the startup item affecting the normal operation of the control system.
[0135] Optionally, in this embodiment, after the server control system receives the first retry information, the control system may, but is not limited to, restart the operating system through the backup startup item based on the first retry information and output a restart log. If the operating system still cannot be started, it may, but is not limited to, obtain second retry information from the backup startup item to determine how to try to start the operating system again through the backup startup item.
[0136] In an exemplary embodiment, obtaining the second retry information of the backup startup item can be achieved, but is not limited to, in the following manner: a controller of a server receives a restart log; the controller extracts, from the restart log, log segments related to the backup startup item based on identifiers of each log segment in the restart log and server log information, to obtain a target log segment, wherein the server log information indicates the identifier of the log segment corresponding to each startup item, and the identifier of each log segment is determined by the control system of the server based on the startup module to which each log segment corresponds and added to each log segment; the controller extracts error information from the target log segment, wherein the error information indicates an abnormal phenomenon during startup of the operating system through the backup startup item; the controller determines, based on first probabilities of occurrence of each fault type and second probabilities of occurrence of an abnormal phenomenon after occurrence of each fault type, a fault type corresponding to the error information, to obtain a target fault type; the controller searches for a corresponding retry operation for the target fault type from among corresponding fault types and retry operations, to obtain a target retry operation, wherein the retry operation is used to adjust the startup mode of startup of the operating system through the backup startup item; the controller generates second retry information based on the target retry operation; and the controller sends the second retry information to the control system.
[0137] Optionally, in this embodiment, while the BIOS (control system) is restarting the operating system through an alternative boot item, the BMC (controller) will monitor the BIOS serial port log and perform targeted filtering and analysis based on the known failed boot items sent by the BIOS to the BMC. The BIOS will add a unique function name identifier as the print information output header to the print information of each functional module. The BMC will determine whether to save this part of the serial port log (target log segment) for subsequent analysis based on the output header. For example, if the PXE boot fails, the network boot module needs to be analyzed. Furthermore, based on the BMC monitoring the BIOS serial port log, a constructed fault probability model is added to the BMC side. The BMC will extract the observed error phenomena from the saved serial port log and then determine the fault type of the alternative boot item based on historical data and prior knowledge. The controller will then search for the corresponding retry operation based on the determined fault type. For example, the retry action for a "hard disk timeout" fault is to increase the boot wait time (for example, from the default 3 seconds to 10 seconds); the retry action for a "PCIe (Peripheral Component Interconnect Express) device initialization failure" fault is to reset the server power supply (via the BMC's IPMI command) after each retry; and the retry action for a "system file corruption" fault is to automatically attempt to boot from the recovery partition. The controller generates a second retry message based on the determined target retry action and sends it to the control system.
[0138] In an exemplary embodiment, the controller may determine the fault type of the fault corresponding to the error information based on each first probability of the occurrence of each fault type and each second probability of an abnormal phenomenon occurring after the occurrence of each fault type, and obtain a target fault type in the following manner, but is not limited to: calculate the product of each first probability and the corresponding second probability to obtain multiple fault probability parameters, wherein the fault probability parameters are used to indicate the probability of the error information corresponding to each fault type; and determine the fault type corresponding to the largest fault probability parameter as the target fault type.
[0139] Optionally, in this embodiment, the probability of the fault corresponding to each fault type of the error information can be calculated by, but not limited to, Formula 1, that is, the probability of the fault of each fault type occurring when the abnormal phenomenon indicated by the error information is observed, where: That is, the first probability, That is the second probability:
[0140] Formula 1: ;
[0141] Since P (error information) is the same for all fault types, the fault probability parameter P0 can be calculated using, but not limited to, Formula 2. The fault probability parameter can indicate :
[0142] Formula 2: .
[0143] Optionally, in an embodiment, the fault type corresponding to the largest P0 may be determined as the target fault type, but is not limited to it.
[0144] As an optional implementation, Figure 18 This is a process of determining the second retry information according to an embodiment of the present application Figure 1 .like Figure 18As shown, the BMC can, but is not limited to, dynamically adjust the diagnostic sequence based on monitored BIOS serial port logs, a constructed fault probability model, historical data, and prior knowledge. Specifically, the BMC can, but is not limited to, receive boot failure events, calculate the probability of each fault type according to Formula 2, prioritize them, and then control the BIOS to perform diagnostic actions based on the fault type's probability, from high to low (i.e., continuously sending different versions of second retry messages to the BIOS, controlling the BIOS to boot the operating system using the backup boot option based on the different second retry messages). Diagnostic actions can, but are not limited to, hardware connection checks and control system parameter adjustments. After attempting a reboot, if the issue is resolved and the system boots successfully, the above process is terminated and the BMC restores all modified BIOS option settings. If the system still fails to boot, a reinforcement learning model is invoked to perform advanced diagnostics based on the existing fault library, including hardware replacement simulation and firmware upgrade simulation. Note that this is only a simulation prediction operation. A diagnostic report is generated based on the results, and the simulation results, recommended solutions, and attempted solutions are all recorded in the report. The report is then pushed to the BMC web log interface and emailed to the operations and maintenance personnel, who then manually decide on the next steps.
[0145] Optionally, each time a startup failure occurs and the above retry repair strategy is called, a reinforcement learning algorithm may be used, but is not limited to, to evaluate the effect of each automatic repair and optimize the action selection strategy. Figure 19 This is a process of determining the second retry information according to an embodiment of the present application Figure 2 .like Figure 19 As shown, the system can monitor, but is not limited to, the diagnostic results of the backup startup item using the first retry information and repair it. It then queries the automatic repair action library and matches the repair action from the library. If a match is found, the repair process begins and the results of subsequent repair or attempted actions are monitored. If the startup is successful, a repair log is recorded and stored in the fault database. If the startup fails, the system re-diagnoses and records the repair failure count. If the problem persists after reaching a threshold (generally set to three times (empirically set)), manual intervention is triggered.
[0146] In an exemplary embodiment, after the controller searches for a corresponding retry operation for a target fault type from the fault types and retry operations with corresponding relationships, the following steps may be performed, but are not limited to: if a retry operation corresponding to the target fault type cannot be found, obtain a reference retry operation corresponding to the target fault type; and add the target fault type and reference retry operation with corresponding relationships to the fault types and retry operations with corresponding relationships.
[0147] Optionally, in this embodiment, in addition to the presence of a corresponding retry operation in the fault database, there may also be other fault types for which no corresponding retry operation exists, referred to as pending update types. Furthermore, if the target fault type is a pending update type, it may be determined that no retry operation corresponding to the target fault type can be found. Alternatively, if the fault probability parameters corresponding to multiple fault types in the fault database are relatively average, it may be determined that no corresponding fault type exists in the fault database and that no retry operation corresponding to the target fault type can be found.
[0148] Optionally, in this embodiment, if a retry operation corresponding to the target fault type cannot be found, a reference retry operation corresponding to the target fault type may be obtained, but is not limited to. Specifically, obtaining the reference retry operation corresponding to the target fault type may include, but is not limited to: searching for a reference retry operation corresponding to the target fault type from the controller's existing fault library through other matching methods. Alternatively, if a corresponding fault type does not exist in the fault library, a pending fault entry may be generated and displayed on the display interface of the server controller, awaiting manual operation. The manual operation may include, but is not limited to, inputting a fault type corresponding to the startup item fault and a reference retry operation. After receiving the manually input fault type and reference retry operation corresponding to the startup item fault, the corresponding target fault type (i.e., the manually input fault type corresponding to the startup item fault) and the reference retry operation may be added to the corresponding fault types and retry operations.
[0149] As an optional implementation, Figure 20 This is a process of determining the second retry information according to an embodiment of the present application Figure 3 .like Figure 20As shown, the preprocessing layer can, but is not limited to, first filter out invalid information from the raw serial port information (i.e., reboot logs) and standardize the log format. This involves filtering out irrelevant lines (such as highly detailed function return value printouts or BIOS copyright notices), standardizing timestamps and formatting differences, and extracting key event sequences (such as key stages of the POST (Power-On Self-Test) process and device initialization node information). Regular expressions and string matching algorithms are used for processing. The regularized matching layer then uses a predefined error pattern library to identify known faults and extract key parameters such as the hardware ID (identification number) and error code. If a match fails, the system proceeds to the semantic analysis layer, where models such as BERT (Bidirectional Encoder Representations from Transformers) are used for keyword extraction and text classification. Time series analysis is then used to mine the semantic features of the logs. An unsupervised anomaly detection model called Isolation Forest is then used to determine whether the fault type is new. Known faults (those for which a corresponding retry action can be found) are directly linked to the knowledge base (the aforementioned fault database) to generate solutions. New faults (those for which a corresponding retry action cannot be found) are created as pending entries for manual review. Upon successful review, the knowledge base is updated to ensure continuous model evolution. This entire process balances efficiency and accuracy through a multi-level detection strategy, leveraging unsupervised learning to address unknown anomalies and leveraging human-machine collaboration to capture expert experience. Ultimately, this enables rapid localization, automated remediation, and predictive maintenance of BIOS boot failures, significantly improving system reliability and operational efficiency.
[0150] In an exemplary embodiment, before starting the operating system of the server through the target startup item of the server, the following steps may be performed, but are not limited to:
[0151] Display the configuration interface of the control system of the server, wherein the configuration interface displays a configuration tab and a mode tab, wherein the configuration tab is used to configure the configuration status of the startup configuration item, and the mode tab is used to configure the type of the control system; in response to a confirmation operation triggered on the configuration interface, save the first option value of the configuration tab and the second option value of the mode tab; restart the server.
[0152] Optionally, in this embodiment, the configuration interface of the server's control system can be displayed on the display interface of the server, but is not limited to, or the configuration interface of the server's control system can be displayed on the remote interface of the server's controller through the remote control function of the server's controller, but is not limited to.
[0153] Optionally, in this embodiment, the configuration tab and the mode tab may be displayed by displaying the configuration interface of the control system, but is not limited to the display. Optionally, the configuration tab may be used, but is not limited to, for configuring the configuration state of the startup configuration item. For example, the configuration tab may be used, but is not limited to, for configuring the startup configuration item to a first state, a second state, a third state, or a fourth state. Optionally, the mode tab may be used, but is not limited to, for configuring the type of control system. For example, the mode tab may be used, but is not limited to, for configuring the control system to be BIOS or UEFI.
[0154] Optionally, in this embodiment, Figure 21 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 1 .like Figure 21 As shown, the configuration tab and mode tab may be displayed on the control system's configuration interface, but are not limited to the following. The optional values for the mode tab may include, but are not limited to, a first mode (corresponding to UEFI) and a second mode (corresponding to BIOS). The configuration tab may provide, but is not limited to, different configuration schemes to support different boot failure strategies, and support the BMC to modify BIOS options via the Redfish or IPMI protocol. Figure 22 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 2 .like Figure 22 As shown, the optional values of the configuration tab may include, but are not limited to, a first state, a second state, a third state, and a fourth state. Optionally, since the fourth state requires the controller to cooperate with the startup operation of the control system, the optional values of the configuration tab may be set to include only the first state, the second state, and the third state when the controller is busy or the user chooses not to use the controller to cooperate with the control system.
[0155] Through the above content, the configuration interface displays, providing users with the option of how to start the operating system through multiple startup items when the operating system fails to start through the first startup item, allowing users to flexibly select different startup failure handling strategies.
[0156] In an exemplary embodiment, the configuration interface of the control system of the display server can be implemented in the following manner, but is not limited to: when the first option value of the configuration tab is in the second state, at least one first tab is displayed on the configuration interface, wherein the second state is used to indicate that the control method for restarting the operating system through multiple startup items is configured to retry multiple startup items in the startup order until the operating system is successfully started, and at least one first tab is used to configure at least one functional parameter used in the process of controlling multiple startup items.
[0157] Optionally, in this embodiment, when the first option value of the configuration tab is in the second state, at least one first tab may be displayed on the configuration interface to configure at least one functional parameter used in controlling the multiple startup items. Optionally, the at least one functional parameter may include, but is not limited to, the aforementioned first retry parameter and the aforementioned second retry parameter.
[0158] In an exemplary embodiment, displaying at least one first tab on the configuration interface can be achieved, but is not limited to, in the following manner: when the second option value of the mode tab is the first mode, a first sub-tab and a second sub-tab are displayed on the configuration interface, wherein the first mode is used to configure the type of control system to be the first type, and the first type of control system has the function of re-obtaining network configuration information from the network server when the network configuration information of the server fails to be obtained from the network server, the first sub-tab is used to configure a first retry parameter, and the first retry parameter is used to indicate the maximum number of attempts to start the operating system through a target type startup item, and the target type startup item is used to boot the server into a pre-boot execution environment, the second sub-tab is used to configure a second retry parameter, and the second retry parameter is used to indicate the maximum number of attempts to obtain network configuration information from the network server, and the first tab includes the first sub-tab and the second sub-tab; when the second option value of the mode tab is the second mode, the first sub-tab is displayed on the configuration interface, wherein the second mode is used to configure the type of control system to be the second type, and the second type of control system does not have the function of re-obtaining network configuration information from the network server when the network configuration information fails to be obtained from the network server.
[0159] Optionally, in this embodiment, the optional values of the second sub-tab may include, but are not limited to, "Not Selectable", "1", "2", "3", and "4". The second sub-tab may be used to set, but are not limited to, the number of DHCP connection timeout retries for each enabled network port during PXE boot. When this parameter sets the number of retries to 1, 2, 3, and 4, the maximum time taken is 4s, 12s, 28s, and 60s, respectively; when set to "Not Selectable", it may be determined by, but is not limited to, the number of connection timeout retries designed by the network card manufacturer, and the control system does not perform any operation. It may be used to display, but is not limited to, a message prompt such as "No Valid offer received" on the server's startup interface when the set number of timeout retries (i.e., the second retry parameter) is exceeded, and the next network port startup item is attempted to be started.
[0160] Optionally, in this embodiment, Figure 23 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 3Since the first type of control system configured in the first mode has the function of re-acquiring the network configuration information from the network server when the network configuration information of the server fails to be obtained from the network server, Figure 23 As shown, when the first option value of the configuration tab is the second state and the second option value of the mode tab is the first mode, a first sub-tab for configuring the aforementioned first retry parameter and a second sub-tab for configuring the aforementioned second retry parameter are displayed on the configuration interface. The first type of control system may be, but is not limited to, UEFI.
[0161] Optionally, in this embodiment, Figure 24 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 4 Since the second type of control system configured in the second mode does not have the function of re-acquiring the network configuration information from the network server when the network configuration information of the server fails to be obtained from the network server, Figure 24 As shown, when the first option value of the configuration tab is the second state and the second option value of the mode tab is the second mode, only the first sub-tab for configuring the aforementioned first retry parameter is displayed on the configuration interface. The first type of control system may be, but is not limited to, a BIOS.
[0162] In an exemplary embodiment, the configuration interface of the control system of the display server can be implemented in the following manner, but is not limited to: when the first option value of the configuration tab is the third state, a second tab is displayed on the configuration interface, wherein the second tab is used to configure a third retry parameter, and the third retry parameter is used to indicate the maximum number of initialization times of the hardware device of the initialization server, and the third state is used to indicate that the control method of restarting the operating system through multiple startup items is configured to repeatedly execute the operation of initializing the hardware device of the server and retrying multiple startup items in the startup order until the operating system is successfully started.
[0163] Optionally, in this embodiment, Figure 25 This is a schematic diagram of a configuration interface of a control system according to an embodiment of the present application. Figure 5 .like Figure 25 As shown, when the first option value of the configuration tab is set to the third state, a second tab for configuring the aforementioned third retry parameter may be displayed on the configuration interface, but is not limited to. The configurable values of the second tab may be, but are not limited to, 2 to 99, where 2 may, but is not limited to, represent not performing multiple cold restarts but only a single cold restart attempt, 3 to 98 may, but are not limited to, represent performing more cold restart attempts, and 99 may, but is not limited to, represent unlimited cold restart attempts.
[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0165] The embodiment of the present application also provides a server startup device, Figure 26 This is a structural block diagram of a server startup device according to an embodiment of the present application. Figure 26 As shown, the device includes:
[0166] A startup module 2602 is configured to start an operating system of the server through a target startup item of the server, wherein the server includes multiple startup items having a startup sequence, and the target startup item is the first startup item in the startup sequence;
[0167] The control module 2604 is used to control multiple startup items according to the configuration status of the startup configuration item when the startup of the operating system fails through the target startup item, wherein the startup configuration item is used to configure the control method of restarting the operating system through multiple startup items.
[0168] By means of the above device, the operating system of the server is started through the target startup item of the server. In the case that the startup of the operating system fails through the target startup item, multiple startup items are controlled according to the configuration state of the startup configuration item for configuring the control method for restarting the operating system through multiple startup items. Different startup failure processing can be achieved by configuring the configuration states of different startup configuration items, thereby improving the flexibility of the server's startup failure processing method. Therefore, the technical problem of insufficient flexibility in the server's startup failure processing method in the related art can be solved, thereby achieving the technical effect of improving the flexibility of the server's startup failure processing method.
[0169] In an exemplary embodiment, a control module includes: a first polling unit, used to poll a reference startup item in a startup order when the configuration state is a first state, wherein the reference startup item is a startup item other than a target startup item among multiple startup items; a first display unit, used to stop starting the operating system when starting the operating system through the reference startup item fails, and display a first prompt message on the startup interface of the server, wherein the first prompt message is used to prompt that there is no bootable device and the startup control system of the server will stop running without rebooting the operating system.
[0170] In an exemplary embodiment, a control module includes: a second polling unit, which is used to poll multiple startup items according to the type of the target startup item, a first retry parameter and a startup order when the configuration state is the second state, wherein the first retry parameter is used to indicate the maximum number of attempts to start the operating system through the startup item of the target type, and the startup item of the target type is used to boot the server to a pre-boot execution environment; and a first retry unit, which is used to retry the multiple startup items according to the first retry parameter and the startup order when polling multiple startup items according to the type of the target startup item, the first retry parameter and the startup order fails.
[0171] In an exemplary embodiment, the second polling unit is further configured to:
[0172] When the target startup item is of the target type, poll other startup items in the startup order, where the other startup items are startup items of the target type in the reference startup item, and the reference startup item is a startup item other than the target startup item in the multiple startup items;
[0173] In the event that the operating system fails to be started through other startup items, repeatedly polling the candidate startup items according to the startup order and the retry count until the operating system is successfully started or the polling count of the candidate startup items reaches the retry count, where the retry count is equal to the first retry parameter minus one, and the candidate startup item is a startup item of the target type among the multiple startup items;
[0174] When the polling times reaches the retry times, the candidate startup items are polled in the startup order, where the candidate startup items are startup items other than the candidate startup item in the multiple startup items.
[0175] In an exemplary embodiment, the second polling unit is further configured to:
[0176] Repeat the following steps until each startup item in the startup items to be polled is polled or the operating system is successfully started, where the startup items to be polled include other startup items or candidate startup items:
[0177] The startup item that is not currently polled and is at the front of the startup sequence among the startup items to be polled is determined as the current startup item;
[0178] Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or the first repetition number of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter;
[0179] When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0180] In an exemplary embodiment, the second polling unit is further configured to:
[0181] If the target boot item does not belong to the target type, repeat the following steps until each boot item in the reference boot item is polled or the operating system is successfully started. The reference boot item is a boot item in the multiple boot items other than the target boot item:
[0182] The startup item that is not currently polled and is at the front of the startup sequence among the reference startup items is determined as the current startup item;
[0183] When the current startup item does not belong to the target type, the operating system is started through the current startup item;
[0184] When the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the second repetition number of the following steps reaches the first retry parameter: poll the candidate startup items in the startup order, where the candidate startup items are startup items of the target type in the reference startup items.
[0185] In an exemplary embodiment, the second polling unit is further configured to:
[0186] Repeat the following steps until all candidate boot items are polled or the operating system is successfully started:
[0187] Determine the startup item among the candidate startup items that is not currently polled and is at the front of the startup sequence as the current startup item;
[0188] Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or a third number of repetitions of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter;
[0189] When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0190] In an exemplary embodiment, the first retry unit is further configured to:
[0191] Repeat the following steps until the operating system boots successfully:
[0192] Displaying a second prompt message on a startup interface of the server, wherein the second prompt message is used to prompt the user to restart the operating system in the second state after a target period of time;
[0193] When the duration of displaying the second prompt information reaches the target duration, the plurality of startup items are retried according to the first retry parameter and the startup sequence.
[0194] In an exemplary embodiment, the first retry unit is further configured to:
[0195] Repeat the following steps until each of the multiple boot items is retried or the operating system boots successfully:
[0196] Determine the most forward startup item in the startup sequence among the multiple startup items that has not been retried as the current startup item;
[0197] If the current startup item does not belong to the target type, restart the operating system through the current startup item;
[0198] When the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the fourth repetition number of the following steps reaches the first retry parameter: retry the candidate startup items in the startup order, wherein the candidate startup items are startup items of the target type among multiple startup items, and the candidate startup items include the current startup item.
[0199] In an exemplary embodiment, the first retry unit is further configured to:
[0200] Repeat the following steps until each candidate boot item is retried or the operating system is successfully started:
[0201] The startup item that has not been retried and is at the front of the startup sequence among the candidate startup items is determined as the current startup item;
[0202] Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or the fifth repetition number of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter;
[0203] When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
[0204] In an exemplary embodiment, the control module includes: a third polling unit, which is used to poll the reference startup item in the startup order when the configuration state is the third state, wherein the reference startup item is a startup item other than the target startup item among multiple startup items; and a second retry unit, which is used to retry multiple startup items in the startup order when the operating system startup fails to be started through the reference startup item.
[0205] In an exemplary embodiment, the second retry unit is further configured to:
[0206] Repeat the following steps until the operating system boots successfully:
[0207] Displaying a third prompt message on the startup interface of the server, wherein the third prompt message is used to prompt the operating system to be restarted according to the third state after a reference time;
[0208] When the duration of displaying the third prompt message reaches a reference duration, initializing the hardware device of the server;
[0209] Retry multiple boot items in the boot order.
[0210] In an exemplary embodiment, the second retry unit is further configured to:
[0211] Determine an initial value of a sixth repetition number as 1, wherein the sixth repetition number is used to indicate the number of times the initialization of the hardware device of the server has been performed;
[0212] Repeat the following steps until the operating system is successfully started or multiple startup items are controlled:
[0213] detecting a magnitude relationship between a sixth repetition number and a third retry parameter;
[0214] If the sixth repetition number is less than the third retry parameter, displaying a fourth prompt message on the startup interface of the server, wherein the fourth prompt message is used to prompt to restart the operating system according to the third state after the candidate time period; if the duration for which the fourth prompt message is displayed reaches the candidate time period, initializing the hardware device of the server and updating the sixth repetition number; and retrying the multiple startup items in the startup order;
[0215] When the sixth number of repetitions is equal to the third retry parameter, it is determined that the control of the multiple startup items is completed.
[0216] In an exemplary embodiment, the control module includes: an execution unit, configured to, when the configuration state is the fourth state, repeatedly execute the following steps until the operating system is successfully started or multiple startup items are polled:
[0217] Determine the startup item that fails to start the current operating system as a backup startup item;
[0218] Obtaining first retry information of a backup startup item, wherein the first retry information is used to indicate a first manner of restarting the operating system through the backup startup item, the multiple startup items including the backup startup item;
[0219] Restarting the operating system through the backup startup item according to the first retry information and outputting a restart log;
[0220] Obtaining second retry information of the backup startup item, wherein the second retry information is used to indicate a second way of restarting the operating system through the backup startup item;
[0221] restarting the operating system through the alternative startup item according to the second retry information;
[0222] In the case that the restart of the operating system through the backup startup item according to the second retry information fails or the second retry information is not received within the time period of the restart log output waiting time, the operating system is started through the next startup item, wherein the next startup item is the next startup item after the backup startup item in the startup sequence.
[0223] In an exemplary embodiment, the execution unit is further configured to:
[0224] The control system of the server sends startup item information of the backup startup item to the controller of the server, wherein the startup item information is used to indicate that the control system fails to start the operating system through the backup startup item;
[0225] The controller generates first retry information according to the server startup information and the startup item information, wherein the server startup information is used to indicate a first mode corresponding to each startup item, and the first mode includes a cold startup mode and a hot startup mode;
[0226] The controller sends the first retry information to the control system, and the controller increases the log output level of the control system. The higher the log output level of the control system, the more information is included in the log output by the control system.
[0227] In an exemplary embodiment, the execution unit is further configured to:
[0228] The restart log is received by the server controller;
[0229] The controller extracts the log segments related to the backup startup items from the restart log based on the identifiers of the log segments of the restart log and the server log information to obtain the target log segments, wherein the server log information is used to indicate the identifiers of the log segments corresponding to the startup items, and the identifiers of the log segments are determined by the server control system based on the startup modules corresponding to the log segments and added to the log segments;
[0230] The controller extracts error information from the target log segment, wherein the error information is used to indicate an abnormal phenomenon in the process of starting the operating system through the backup startup item;
[0231] The controller determines the fault type of the fault corresponding to the error information according to each first probability of occurrence of each fault type and each second probability of occurrence of an abnormal phenomenon after the occurrence of each fault type, and obtains a target fault type;
[0232] The controller searches for a corresponding retry operation for a target fault type from the fault types and retry operations that have a corresponding relationship, and obtains a target retry operation, wherein the retry operation is used to adjust a startup mode of starting the operating system through the backup startup item;
[0233] generating, by the controller, second retry information according to the target retry operation;
[0234] The controller sends the second retry information to the control system.
[0235] In an exemplary embodiment, the execution unit is further configured to:
[0236] Calculating the product of each first probability and the corresponding second probability to obtain a plurality of fault probability parameters, wherein the fault probability parameters are used to indicate the probability of the error information corresponding to each fault type;
[0237] The fault type corresponding to the maximum fault probability parameter is determined as the target fault type.
[0238] In an exemplary embodiment, the execution unit is further configured to:
[0239] If a retry operation corresponding to the target fault type cannot be found, obtaining a reference retry operation corresponding to the target fault type;
[0240] Add target fault types and reference retry actions with corresponding relationships to fault types and retry actions with corresponding relationships.
[0241] In an exemplary embodiment, the startup device of the server also includes: a display module, which is used to display the configuration interface of the server's control system before starting the server's operating system through the server's target startup item, wherein a configuration tab and a mode tab are displayed on the configuration interface, wherein the configuration tab is used to configure the configuration status of the startup configuration item, and the mode tab is used to configure the type of control system; a response module, which is used to respond to the confirmation operation triggered on the configuration interface, save the first option value of the configuration tab and the second option value of the mode tab; and a restart module, which is used to restart the server.
[0242] In an exemplary embodiment, the display module includes: a second display unit, used to display at least one first tab on the configuration interface when the first option value of the configuration tab is a second state, wherein the second state is used to indicate that the control method for restarting the operating system through multiple startup items is configured to retry multiple startup items in a startup order until the operating system is successfully started, and the at least one first tab is used to configure at least one functional parameter used in the process of controlling multiple startup items.
[0243] In an exemplary embodiment, the second display unit is further configured to:
[0244] When the second option value of the Mode tab is the first mode, a first sub-tab and a second sub-tab are displayed on the configuration interface, wherein the first mode is used to configure the type of the control system to be the first type, and the first type of control system has the function of re-obtaining the network configuration information of the server from the network server when the network configuration information of the server fails to be obtained from the network server; the first sub-tab is used to configure a first retry parameter, and the first retry parameter is used to indicate the maximum number of attempts to start the operating system through a startup item of a target type, and the startup item of the target type is used to boot the server into a pre-boot execution environment; the second sub-tab is used to configure a second retry parameter, and the second retry parameter is used to indicate the maximum number of attempts to obtain the network configuration information from the network server; the first tab includes the first sub-tab and the second sub-tab;
[0245] When the second option value of the mode tab is the second mode, the first sub-tab is displayed on the configuration interface, wherein the second mode is used to configure the control system type as the second type, and the second type of control system does not have the function of re-obtaining network configuration information from the network server when the network configuration information fails to be obtained from the network server.
[0246] In an exemplary embodiment, the display module includes: a third display unit, used to display a second tab on the configuration interface when the first option value of the configuration tab is a third state, wherein the second tab is used to configure a third retry parameter, the third retry parameter is used to indicate the maximum number of initialization times of the hardware device of the initialization server, and the third state is used to indicate that the control method for restarting the operating system through multiple startup items is configured to repeatedly execute the operation of initializing the hardware device of the server and retrying multiple startup items in the startup order until the operating system is successfully started.
[0247] For the description of the features in the embodiment corresponding to the server startup device, please refer to the relevant description of the embodiment corresponding to the server startup method, which will not be repeated here.
[0248] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned server startup method embodiments.
[0249] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned server startup method embodiments when running.
[0250] 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.
[0251] 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 of any of the above-mentioned server startup method embodiments are implemented.
[0252] 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 of any of the above-mentioned server startup method embodiments are implemented.
[0253] 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of this application.
[0254] The above is a detailed introduction to the server startup method, device, electronic device, medium and program product provided by the present application. Specific examples are used herein 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 core ideas 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: include: Starting an operating system of the server through a target startup item of the server, wherein the server includes a plurality of startup items having a startup sequence, and the target startup item is the first startup item in the startup sequence; In the case that starting the operating system through the target startup item fails, the multiple startup items are controlled according to the configuration state of the startup configuration item, wherein the startup configuration item is used to configure a control method for restarting the operating system through the multiple startup items.
2. The method for starting a server according to claim 1, wherein: The controlling of the plurality of startup items according to the configuration status of the startup configuration item includes: When the configuration state is the first state, polling a reference startup item according to the startup order, wherein the reference startup item is a startup item other than the target startup item among the multiple startup items; In the event that startup of the operating system through the reference startup item fails, the startup of the operating system is stopped, and a first prompt message is displayed on the startup interface of the server, wherein the first prompt message is used to prompt that there is no bootable device and the startup control system of the server will stop running without rebooting the operating system.
3. The method for starting a server according to claim 1, wherein: The controlling of the plurality of startup items according to the configuration status of the startup configuration item includes: When the configuration state is the second state, polling the plurality of startup items according to the type of the target startup item, a first retry parameter, and the startup order, wherein the first retry parameter is used to indicate a maximum number of attempts to start the operating system through a startup item of a target type, and the startup item of the target type is used to boot the server into a pre-boot execution environment; In a case where polling the plurality of startup items fails according to the type of the target startup item, the first retry parameter, and the startup sequence, the plurality of startup items are retried according to the first retry parameter and the startup sequence.
4. The method for starting a server according to claim 3, wherein: The polling of the plurality of startup items according to the type of the target startup item, the first retry parameter, and the startup order includes: If the target startup item belongs to the target type, polling other startup items according to the startup order, wherein the other startup items are startup items belonging to the target type in the reference startup items, and the reference startup items are startup items other than the target startup item in the plurality of startup items; If starting the operating system through the other startup items fails, repeatedly polling candidate startup items according to the startup order and the number of retries until the operating system is successfully started or the number of repeated polling of candidate startup items reaches the number of retries, wherein the number of retries is equal to the first retry parameter minus one, and the candidate startup item is a startup item of the target type among the multiple startup items; When the polling number reaches the retry number, polling the alternative startup items according to the startup order, wherein the alternative startup items are startup items other than the candidate startup item among the multiple startup items.
5. The method for starting a server according to claim 4, wherein: The polling of other startup items according to the startup sequence or repeatedly polling candidate startup items according to the startup sequence and the number of retries includes: Repeat the following steps until each startup item in the startup items to be polled is polled or the operating system is successfully started, wherein the startup items to be polled include the other startup items or the candidate startup items: Determine the startup item that is not currently polled and is at the front of the startup sequence among the startup items to be polled as the current startup item; Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or a first repetition number of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter; When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
6. The method for starting a server according to claim 3, wherein: The polling of the plurality of startup items according to the type of the target startup item, the first retry parameter, and the startup order includes: If the target startup item does not belong to the target type, repeatedly performing the following steps until each startup item in the reference startup item is polled or the operating system is successfully started, wherein the reference startup item is a startup item in the plurality of startup items excluding the target startup item: Determine the startup item among the reference startup items that is not currently polled and is the first in the startup sequence as the current startup item; In a case where the current startup item does not belong to the target type, starting the operating system through the current startup item; In the case that the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the second number of repetitions of the following steps reaches the first retry parameter: poll the candidate startup items in the startup order, wherein the candidate startup items are startup items in the reference startup items that belong to the target type.
7. The method for starting a server according to claim 6, wherein: The polling candidate startup items according to the startup order includes: Repeat the following steps until all the candidate startup items are polled or the operating system is successfully started: Determine the startup item among the candidate startup items that is not currently polled and is at the front of the startup sequence as the current startup item; Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or a third number of repetitions of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter; When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
8. The method for starting a server according to claim 3, wherein: The retrying the plurality of startup items according to the first retry parameter and the startup sequence includes: Repeat the following steps until the operating system in question boots successfully: Displaying a second prompt message on a startup interface of the server, wherein the second prompt message is used to prompt the operating system to be restarted in the second state after a target period of time; When the duration of displaying the second prompt information reaches the target duration, the plurality of startup items are retried according to the first retry parameter and the startup sequence.
9. The method for starting a server according to claim 8, wherein: The retrying the plurality of startup items according to the first retry parameter and the startup sequence includes: Repeat the following steps until each of the plurality of startup items is retried or the operating system is successfully started: Determine the startup item that is the first in the startup order and has not been retried as the current startup item; If the current startup item does not belong to the target type, restarting the operating system through the current startup item; In the case that the current startup item belongs to the target type, repeat the following steps until the operating system is successfully started or the fourth repetition number of the following steps reaches the first retry parameter: retry the candidate startup items in the startup order, wherein the candidate startup items are startup items belonging to the target type among multiple startup items, and the candidate startup items include the current startup item.
10. The method for starting a server according to claim 9, wherein: The retrying the candidate startup items according to the startup order includes: Repeat the following steps until each startup item in the candidate startup items is retried or the operating system is successfully started: Determine the startup item among the candidate startup items that is not currently retried and is the first in the startup sequence as the current startup item; Repeatedly obtaining the network configuration information of the server from the network server until the network configuration information is successfully obtained or a fifth repetition number of repeatedly obtaining the network configuration information from the network server reaches a second retry parameter; When the network configuration information is obtained, the operating system is started through the current startup item according to the network configuration information.
11. The method for starting a server according to claim 1, wherein: The controlling of the plurality of startup items according to the configuration status of the startup configuration item includes: When the configuration state is the third state, polling a reference startup item according to the startup order, wherein the reference startup item is a startup item other than the target startup item among the multiple startup items; In the case that starting the operating system through the reference startup item fails, the plurality of startup items are retried in the startup sequence.
12. The method for starting a server according to claim 11, wherein: The retrying the plurality of startup items according to the startup order includes: Repeat the following steps until the operating system in question boots successfully: Displaying a third prompt message on the startup interface of the server, wherein the third prompt message is used to prompt the operating system to be restarted according to the third state after a reference time period; When the duration of displaying the third prompt information reaches the reference duration, initializing the hardware device of the server; The plurality of startup items are retried according to the startup order.
13. The method for starting a server according to claim 11, wherein: The retrying the plurality of startup items according to the startup order includes: Determine an initial value of a sixth repetition number as 1, wherein the sixth repetition number is used to indicate the number of times the initialization of the hardware device of the server has been performed; Repeat the following steps until the operating system is successfully started or the control of multiple startup items is completed: detecting a magnitude relationship between the sixth number of repetitions and a third retry parameter; If the sixth repetition number is less than the third retry parameter, displaying a fourth prompt message on the startup interface of the server, wherein the fourth prompt message is used to prompt to restart the operating system according to the third state after a candidate time period; if the duration for which the fourth prompt message is displayed reaches the candidate time period, initializing the hardware device of the server and updating the sixth repetition number; and retrying the plurality of startup items according to the startup order; When the sixth repetition number is equal to the third retry parameter, it is determined that the control of the plurality of startup items is completed.
14. The method for starting a server according to claim 1, wherein: The controlling of the plurality of startup items according to the configuration status of the startup configuration item includes: When the configuration state is the fourth state, repeatedly perform the following steps until the operating system is successfully started or multiple startup items are polled: Determine the startup item that currently fails to start the operating system as a backup startup item; Obtaining first retry information of the backup startup item, wherein the first retry information is used to indicate a first manner of restarting the operating system through the backup startup item, and the plurality of startup items include the backup startup item; Restarting the operating system through the backup startup item according to the first retry information, and outputting a restart log; Obtaining second retry information of the backup startup item, wherein the second retry information is used to indicate a second way of restarting the operating system through the backup startup item; restarting the operating system through the backup startup item according to the second retry information; In the event that restarting the operating system through the backup startup item according to the second retry information fails or in the event that the second retry information is not received within the time period of outputting the restart log waiting time, the operating system is started through the next startup item, wherein the next startup item is the next startup item after the backup startup item in the startup order.
15. The method for starting a server according to claim 14, characterized in that: The obtaining the first retry information of the standby startup item includes: The control system of the server sends startup item information of the backup startup item to the controller of the server, wherein the startup item information is used to indicate that the control system fails to start the operating system through the backup startup item; The controller generates the first retry information according to the server startup information and the startup item information, wherein the server startup information is used to indicate the first mode corresponding to each of the startup items, and the first mode includes a cold startup mode and a hot startup mode; The controller sends the first retry information to the control system, and the controller increases the log output level of the control system, wherein the higher the log output level of the control system, the more information included in the log output by the control system.
16. The method for starting a server according to claim 14, wherein: The obtaining the second retry information of the standby startup item includes: Receiving the restart log by a controller of the server; The controller extracts the log segment associated with the backup startup item from the restart log based on the identifiers of the log segments of the restart log and the server log information to obtain a target log segment, wherein the server log information is used to indicate the identifiers of the log segments corresponding to the respective startup items, and the identifiers of the respective log segments are determined by the control system of the server based on the startup modules corresponding to the respective log segments and added to the respective log segments; Extracting error information from the target log segment by the controller, wherein the error information is used to indicate an abnormal phenomenon in the process of starting the operating system through the backup startup item; The controller determines, based on each first probability of occurrence of each fault type and each second probability of occurrence of the abnormal phenomenon after the occurrence of each fault type, the fault type corresponding to the error information, to obtain a target fault type; The controller searches for a corresponding retry operation for the target fault type from the fault types and retry operations having a corresponding relationship, and obtains a target retry operation, wherein the retry operation is used to adjust a startup mode of starting the operating system through the backup startup item; generating, by the controller, the second retry information according to the target retry operation; The controller sends the second retry information to the control system.
17. The method for starting a server according to claim 16, wherein: The controller determines the fault type of the fault corresponding to the error information based on each first probability of occurrence of each fault type and each second probability of occurrence of the abnormal phenomenon after the occurrence of each fault type, to obtain a target fault type, including: Calculating the product of each first probability and the corresponding second probability to obtain a plurality of fault probability parameters, wherein the fault probability parameters are used to indicate the probability of the error information corresponding to each fault type; The fault type corresponding to the largest fault probability parameter is determined as the target fault type.
18. The method for starting a server according to claim 16, wherein: After the controller searches for a corresponding retry operation for the target fault type from the fault types and retry operations having a corresponding relationship, the method further includes: If no retry operation corresponding to the target fault type can be found, obtaining a reference retry operation corresponding to the target fault type; The target fault type and the reference retry operation having a corresponding relationship are added to the fault types and retry operations having a corresponding relationship.
19. The method for starting a server according to claim 1, wherein: Before starting the operating system of the server through the target startup item of the server, the method further includes: Displaying a configuration interface of the control system of the server, wherein the configuration interface displays a configuration tab and a mode tab, wherein the configuration tab is used to configure the configuration state of the startup configuration item, and the mode tab is used to configure the type of the control system; In response to a confirmation operation triggered on the configuration interface, saving a first option value of the configuration tab and a second option value of the mode tab; Restart the server in question.
20. The server startup method according to claim 19, characterized in that: The configuration interface of the control system of the server is displayed, including: When the first option value of the configuration tab is in the second state, at least one first tab is displayed on the configuration interface, wherein the second state is used to indicate that the control method for restarting the operating system through multiple startup items is configured to retry multiple startup items in the startup order until the operating system is successfully started, and the at least one first tab is used to configure at least one functional parameter used in the process of controlling the multiple startup items.
21. The method for starting a server according to claim 20, wherein: The displaying of at least one first tab on the configuration interface includes: When the second option value of the mode tab is the first mode, a first sub-tab and a second sub-tab are displayed on the configuration interface, wherein the first mode is used to configure the type of the control system to be the first type, and the control system of the first type has the function of re-obtaining the network configuration information of the server from the network server when the network configuration information of the server fails to be obtained from the network server; the first sub-tab is used to configure a first retry parameter, and the first retry parameter is used to indicate the maximum number of attempts to start the operating system through a startup item of a target type, and the startup item of the target type is used to boot the server into a pre-boot execution environment; the second sub-tab is used to configure a second retry parameter, and the second retry parameter is used to indicate the maximum number of attempts to obtain the network configuration information from the network server; the first tab includes the first sub-tab and the second sub-tab; When the second option value of the mode tab is the second mode, a first sub-tab is displayed on the configuration interface, wherein the second mode is used to configure the type of the control system to be the second type, and the control system of the second type does not have the function of re-obtaining the network configuration information from the network server when the network configuration information fails to be obtained from the network server.
22. The method for starting a server according to claim 19, wherein: The configuration interface of the control system of the server is displayed, including: When the first option value of the configuration tab is the third state, a second tab is displayed on the configuration interface, wherein the second tab is used to configure a third retry parameter, the third retry parameter is used to indicate the maximum number of initialization times for initializing the hardware device of the server, and the third state is used to indicate that the control method for restarting the operating system through multiple startup items is configured to repeatedly execute the operation of initializing the hardware device of the server and retrying multiple startup items in the startup order until the operating system is successfully started.
23. A server startup device, characterized in that: include: a startup module, configured to start an operating system of the server through a target startup item of the server, wherein the server includes a plurality of startup items having a startup sequence, and the target startup item is the first startup item in the startup sequence; A control module is used to control multiple startup items according to the configuration status of the startup configuration item when the startup of the operating system fails through the target startup item, wherein the startup configuration item is used to configure the control method of restarting the operating system through multiple startup items.
24. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the server startup method according to any one of claims 1 to 22 when executing the computer program.
25. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server startup method according to any one of claims 1 to 22 are implemented.
26. 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 22 are implemented.
Citation Information
Patent Citations
Alarm device and method for illegal operating system startup item, equipment and medium
CN111984490A
Network card equipment polling method, system and related device
CN113517996A
UEFI (Unified Extensible Firmware Interface) quick start implementation method
CN115202751A
Operating system (OS) starting method, equipment and medium
CN119127318A
Server startup item starting method and device
CN119917180A
Cited By
Multi-BIOS (Basic Input / Output System) starting switching method and equipment, storage medium and computer program product
CN121433987A