CN115658113A - Server self-starting method and device, readable storage medium and electronic equipment - Google Patents

Server self-starting method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN115658113A
CN115658113A CN202211386071.0A CN202211386071A CN115658113A CN 115658113 A CN115658113 A CN 115658113A CN 202211386071 A CN202211386071 A CN 202211386071A CN 115658113 A CN115658113 A CN 115658113A
Authority
CN
China
Prior art keywords
target
state
upgrading
upgrade
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211386071.0A
Other languages
Chinese (zh)
Inventor
陆力信
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211386071.0A priority Critical patent/CN115658113A/en
Publication of CN115658113A publication Critical patent/CN115658113A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a server self-starting method, a server self-starting device, a readable storage medium and electronic equipment, wherein the method comprises the following steps: determining a target state of the basic input output system according to target identification information, wherein the target identification information is used for indicating an operating state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state; under the condition that the target state is a restart upgrade state, reading upgrade state information of the basic input output system, wherein the upgrade state information at least comprises: is finished; and under the condition that the upgrading state information is finished, sending a starting instruction to the target server to control the target server to start, wherein the basic input and output system is a program for executing starting operation in the target server. Through the BIOS upgrading method and device, the problem that automatic restarting of a system cannot be achieved when the basic input and output system is upgraded at present is solved, and the effect of preventing BIOS from being down after upgrading is achieved.

Description

Server self-starting method and device, readable storage medium and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a server self-starting method and device, a readable storage medium and electronic equipment.
Background
As the computing demands of users on computers increase, the device types are also becoming more and more abundant. The demand of users is increasing, and different servers need to continuously upgrade the corresponding Basic Input Output System (BIOS) to meet the requirement of updating.
At present, a BIOS is generally upgraded by a PFR (Platform Firmware interface) chip, when BIOS software is upgraded, a restart system command needs to be executed in some scenes to trigger the upgrade, however, a restart command Baseboard Management Controller (BMC) can only save time of the order of seconds, and the BIOS upgrade process often needs several minutes, which causes that the BIOS cannot be automatically booted after being upgraded, a downtime phenomenon occurs, and only after the upgrade is completed, the device can be manually booted. The problems of high system operation and maintenance cost, low operation and maintenance efficiency and the like are caused.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a server self-starting method and device, a readable storage medium and electronic equipment, so as to at least solve the problems in the related art.
According to an embodiment of the present application, there is provided a server self-starting method, including: determining a target state of the basic input output system according to target identification information, wherein the target identification information is used for indicating the running state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state; under the condition that the target state is a restart upgrade state, reading upgrade state information of the basic input output system, wherein the upgrade state information at least comprises: is finished; and under the condition that the upgrading state information is finished, sending a starting instruction to the target server to control the target server to start, wherein the basic input and output system is a program for executing starting operation in the target server.
In one exemplary embodiment, the target identification information includes: the method comprises the following steps that first identification information and second identification information are obtained, the first identification information is used for indicating whether a target server receives a restart instruction, the second identification information is used for indicating whether a basic input output system in the target server starts to be upgraded, and according to the target identification information, determining the target state of the basic input output system comprises the following steps: detecting whether a first identifier and a second identifier exist in a target storage space according to a first preset period; under the condition that both the first identifier and the second identifier exist, acquiring first identifier information of the first identifier and second identifier information of the second identifier; and determining the target state of the basic input and output system at the first identification information and the second identification information.
In one exemplary embodiment, the upgrade status information further includes at least: the step of reading the upgrade state information of the basic input and output system comprises the following steps: and under the condition that the target state is a restart upgrading state, reading upgrading state information stored in a target upgrading chip according to a second preset period, wherein the upgrading state information is used for representing the upgrading state of the basic input and output system, and the target upgrading chip is used for upgrading the basic input and output system.
In an exemplary embodiment, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: starting a timer at a target time to obtain a timing duration, wherein the target time is the time when the target state is detected to be the restart upgrading state, and the timing duration is used for representing the time length consumed by upgrading the basic input and output system; and deleting the first identifier and the second identifier in the target storage space and sending first alarm information under the condition that the timing duration exceeds the preset duration and the read upgrading state information is incomplete, wherein the first alarm information is used for representing that the basic input and output system is upgraded overtime.
In an exemplary embodiment, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: and under the condition that the upgrading state information is abnormal, deleting the first identifier and the second identifier in the target storage space, and sending second alarm information, wherein the second alarm information is used for representing upgrading failure of the basic input and output system.
In an exemplary embodiment, when the upgrading status information is complete, after sending the boot instruction to the target server, the method further includes: deleting the first identifier and the second identifier in the target storage space, and recording log information, wherein the log information comprises at least one of the following: the duration of the basic input and output system and the time of sending the starting command.
According to an embodiment of the present application, there is also provided a server self-starting method, including: under the condition of receiving a restart instruction sent by a target object, sending a first setting instruction to a baseboard management controller, wherein the first setting instruction is used for creating a first identifier in a target storage space in the baseboard management controller and setting first identifier information; under the condition of the received upgrade starting instruction, sending a second setting instruction to the baseboard management controller, wherein the second setting instruction is used for creating a second identifier in a target storage space in the baseboard management controller and setting second identifier information; in the upgrading process, responding to an upgrading state information acquisition instruction, and sending upgrading state information of the basic input and output system to a target upgrading chip; and under the condition that the upgrading state information is finished, responding to a starting instruction sent by the substrate management controller, and executing the starting operation of the target server.
According to another embodiment of the present application, there is provided a server self-starting apparatus including: the identification detection module is used for determining a target state of the basic input and output system according to target identification information, wherein the target identification information is used for indicating the running state of the basic input and output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state; the state reading module is used for reading the upgrade state information of the basic input and output system under the condition that the target state is a restart upgrade state, wherein the upgrade state information at least comprises: is finished; and the starting self-starting module is used for sending a starting instruction to the target server to control the target server to start under the condition that the upgrading state information is finished, wherein the basic input and output system is a program for executing starting operation in the target server.
According to yet another embodiment of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, where the computer program is configured to, when executed, perform the steps in any of the server bootstrapping method embodiments described above.
According to yet another embodiment of the present application, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any server self-starting method embodiment.
Through the application, when the BIOS chip is upgraded through the PFR device, the current state of a basic input/output system (BIOS) is determined by utilizing the identification information, the upgrading process is monitored through the BMC background, the function that the system can not be restarted when the BIOS is upgraded through the PFR is improved, the problem that the automatic restarting of the system can not be realized when the basic input/output system (BIOS) is upgraded at present is solved, the effect of preventing the BIOS from being crashed after being upgraded is achieved, the manual equipment starting process after the upgrading is avoided being manually waited for, and the operation and maintenance time and the operation and maintenance cost are greatly saved.
Drawings
Fig. 1 is a hardware block diagram of a computer device according to a server self-starting method provided in an embodiment of the present application;
fig. 2 is a flowchart of a server self-starting method provided according to an embodiment of the present application;
FIG. 3 is a flow chart of another server boot-up method provided according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server self-starting device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
To facilitate better understanding of the embodiments of the present application for those skilled in the art, some technical terms or terms referred to in the embodiments of the present application are explained as follows:
baseboard Management Controller (BMC): the remote management controller of the server is executed, and can perform operations such as firmware upgrading and machine equipment checking on the machine in a state that the machine is not started. The BMC is a management controller specific to the server, and one of the main functions of the BMC is to automatically monitor the running state of the server, and mainly comprises the health state of each hardware. The BMC monitors the health state of each hardware, acquires the information of each hardware, is helpful for operation and maintenance personnel to know the running condition of the server in time, and ensures the normal running of the server.
Basic Input Output System (BIOS): the first software run when the server is started, and the main function of the software is to provide the bottommost and most direct hardware setting and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The setup option of BIOS refers to specific information of the system settings that BIOS reads from CMOS. The system settings may be modified by modifying the setup option of the BIOS.
PFR (Platform Firmware Resilience): a programmable logic chip that ensures secure upgrades, a mechanism to ensure that platform firmware code and critical data maintain integrity and prevent corruption, and a mechanism to restore platform firmware code and critical data to a state of integrity upon detecting that any such firmware code or critical data has been corrupted or forcibly restored by an authorized mechanism.
ipmitool: the IPmi platform management tool is a command line mode IPmi platform management tool which can be used in a linux system, and can achieve the functions of acquiring sensor information, displaying system log content, remotely turning on and off a network and the like.
IPMI: (Intelligent Platform Management Interface): the core of the IPMI is a dedicated chip/controller (BMC) which is independent of the operating system, BIOS and processor, and thus belongs to an out-of-band management device, and the IPMI is a set of computer interface specifications defined for the autonomous computer subsystem, and is used to provide management and monitoring functions of software and hardware, such as CPU, firmware (BIOS or UEFI) and operating system, which are independent of the host system, so that developers can interact with the BMC through the IPMI OEM CMD.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the traditional procedure of upgrading the BIOS by the PFR device, the upgrading process is completely dominated by the PFR, the PFR cannot directly inform the BMC of the upgrading process after the BIOS upgrading is finished, and for the system restarting operation executed by a client, the BMC cannot respond to the restarting request of the BIOS after the BIOS upgrading is finished and can generate the downtime phenomenon because the upgrading time is too long.
The PFR is used as a security guarantee for firmware upgrade, and has some functional disadvantages in the upgrade process, for example, when BIOS software is upgraded, a restart system command needs to be executed in some scenes to trigger upgrade, however, the restart command BMC can only save time of the order of seconds, and the BIOS upgrade process often needs several minutes, which results in that the BIOS cannot be automatically booted after being upgraded, and only after the upgrade is completed, the device is manually booted. In order to solve the above problems, embodiments of the present application provide corresponding solutions, which are described in detail below.
The method embodiments provided in the embodiments of the present application may be executed in a computer device, a computer terminal, or a similar computing device. Taking an example of a computer device running on a computer device, fig. 1 is a hardware structure block diagram of a computer device of a server self-starting method according to an embodiment of the present application. As shown in fig. 1, the computer device may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, wherein the computer device may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer device described above. For example, the computer device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the server self-starting method in the embodiment of the present application, and the processor 102 executes the computer programs stored in the memory 104 to thereby execute various functional applications and data processing, i.e., to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include wireless networks provided by communication providers of computer devices. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices via a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
In this embodiment, a method operating on the computer device is provided, and fig. 2 is a flowchart of a server self-booting method according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, determining a target state of the basic input output system according to target identification information, wherein the target identification information is used for indicating an operation state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state;
in some embodiments of the present application, the target identification information comprises: the method comprises the following steps that first identification information and second identification information are included, the first identification information is used for indicating whether a target server receives a restart instruction, the second identification information is used for indicating whether a basic input output system in the target server starts to be upgraded, and according to the target identification information, the target state of the basic input output system is determined, wherein the method comprises the following steps: detecting whether a first identifier and a second identifier exist in a target storage space according to a first preset period; under the condition that both the first identifier and the second identifier exist, acquiring first identifier information of the first identifier and second identifier information of the second identifier; and determining the target state of the basic input and output system at the first identification information and the second identification information.
In this embodiment, the first flag is a restart flag (power _ cycle), the second flag is an update flag (update), and the target storage space is a shared memory of the BMC.
Specifically, when a BMC program starts to run, a new thread is created, a round-robin mechanism is started in the new thread, the content of a BMC shared memory is read, whether a set power _ cycle identification bit is TRUE (TRUE) or not and whether an update identification bit is TRUE or not are judged, and under the condition that both the power _ cycle identification bit and the update identification bit exist and are TRUE (TRUE), the target state of a Basic Input Output System (BIOS) is judged to be a restart state; in other cases, a target state of a Basic Input Output System (BIOS) is determined to be a non-reboot upgrade state.
In this embodiment, the first preset period may be adjusted according to actual requirements.
Step S204, reading the upgrade state information of the basic input and output system under the condition that the target state is the restart upgrade state, wherein the upgrade state information at least comprises: is finished;
in order to continuously obtain the current upgrade status of the BIOS, the upgrade status information at least further includes: the method comprises the following steps of reading upgrading state information of a basic input and output system when the basic input and output system is not finished and upgraded abnormally: and under the condition that the target state is a restart upgrading state, reading upgrading state information stored in a target upgrading chip according to a second preset period, wherein the upgrading state information is used for representing the upgrading state of the basic input and output system, and the target upgrading chip is used for upgrading the basic input and output system.
Specifically, the BMC continuously round-robin reads the upgrade status information recorded in the upgrade register of the PFR chip (i.e., the target upgrade chip).
In this embodiment, the second predetermined period may be adjusted according to actual requirements.
In some embodiments of the present application, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: starting a timer at a target time to obtain a timing duration, wherein the target time is the time when the target state is detected to be the restart upgrading state, and the timing duration is used for representing the time length consumed by upgrading the basic input and output system; and deleting the first identifier and the second identifier in the target storage space and sending first alarm information under the condition that the timing duration exceeds the preset duration and the read upgrading state information is incomplete, wherein the first alarm information is used for representing that the basic input and output system is upgraded overtime.
Specifically, when the target state is detected to be the restart upgrade state and the upgrade state information starts to be read, the timing program is started, after the timing program is started, the BMC thread starts to continuously cycle and read the state of the upgrade register, and meanwhile, if the BIOS update time exceeds the timing time (i.e., the preset time), it is indicated that the upgrade process far exceeds the normal time, and at this time, the upgrade timeout is prompted and a log is recorded.
In this embodiment, the preset time period may be adjusted according to actual requirements.
In some embodiments of the present application, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: and under the condition that the upgrading state information is abnormal in upgrading, deleting the first identification and the second identification in the target storage space, and sending second alarm information, wherein the second alarm information is used for representing the upgrading failure of the basic input and output system.
Specifically, if the upgrade fails or is abnormal, the power _ cycle and update identification bits of the BMC shared memory are cleared, a round robin is skipped, the upgrade failure is prompted, and a log is recorded.
Step S206, sending a boot instruction to the target server to control the target server to start up when the upgrade status information is complete, wherein the bios is a program for executing a start operation in the target server.
In order to implement automatic restart of the device, the method further includes the following steps after sending a boot instruction to the target server when the upgrade status information is completed: deleting the first identifier and the second identifier in the target storage space, and recording log information, wherein the log information comprises at least one of the following: the duration of the basic input and output system and the time of sending the starting command.
Specifically, if the update status information is read to be in a completed (complete) status, the power _ cycle and update identification bits of the BMC shared memory are cleared, a round-robin and system boot signal is pulled up, and a boot instruction is sent to the target server.
Fig. 3 is a flowchart of another server self-starting method provided according to an embodiment of the present application, where as shown in fig. 3, the flowchart includes the following steps:
step 302, a basic input output system BIOS sends a first setting instruction to a baseboard management controller when receiving a restart instruction sent by a target object, where the first setting instruction is used to create a first identifier in a target storage space in the baseboard management controller and set first identifier information;
specifically, after the user executes the system restart operation, the BMC is notified by using an ipmitool command, at this time, an identification bit is set and recorded in the shared memory of the BMC, that is, the shared memory identification bit power _ cycle is set to TRUE.
Step 304, under the condition of the received upgrade starting instruction, sending a second setting instruction to the baseboard management controller, wherein the second setting instruction is used for creating a second identifier in a target storage space in the baseboard management controller and setting second identifier information;
specifically, after the BIOS upgrade process is started, an identification bit for starting BIOS upgrade is set, and the identification bit is written into the BMC shared memory and set to TRUE.
Step 306, in the upgrading process, responding to an upgrading state information acquisition instruction, and sending upgrading state information of the basic input and output system to a target upgrading chip;
specifically, in the BIOS upgrade process, the current upgrade status is continuously recorded into an upgrade register of the PFR chip (i.e., the target upgrade chip).
And 308, responding to the starting instruction sent by the baseboard management controller under the condition that the upgrading state information is finished, and executing the starting operation of the target server.
The server self-starting method in steps S202 to S206 and steps S302 to S208 of the present embodiment will be further described below.
The server self-starting method comprises the following steps:
step 1, when the BMC program starts to run, the BMC creates a new thread, starts a round-robin mechanism in the new thread, reads the content of the BMC shared memory, judges whether the set power _ cycle and update identification bits are TRUE, and if the set power _ cycle and update identification bits are TRUE, carries out round-robin reading of the status bits.
And 2, after a user executes system restart operation, the BIOS informs the BMC by using an ipmitool command, sets an identification bit and records the identification bit into a shared memory of the BMC, namely, sets a power _ cycle of the shared memory identification bit to TRUE.
And 3, after the BIOS is started in the upgrading process, setting an identification bit for starting the BIOS upgrading, and writing the identification bit into the BMC shared memory, namely setting the shared memory identification bit update to TRUE.
And 4, continuously recording the current upgrading state into an upgrading register of the PFR chip (namely the target upgrading chip) by the BIOS in the upgrading process.
And 5, under the condition that the two identification bits read from and written into the shared memory by the round-robin thread started in the step 1 are TRUE at the same time, starting a timing program, and simultaneously starting the BMC thread to continuously round-robin and read the state of the upgrade register.
Step 6, if the BIOS updating time exceeds the timing time (namely the preset time), the upgrading process is far beyond the normal time, and at the moment, the upgrading overtime is prompted and the log is recorded; if the upgrading fails or is abnormal, clearing power _ cycle and update identification bits of the BMC shared memory, jumping out of the round robin and prompting upgrading failure and recording a log; if the upgrade state information is read to be in a complete state, power _ cycle and update identification bits of the BMC shared memory are cleared, a round-robin and system boot signal is pulled up, and a boot instruction is sent to the target server.
According to the method, when the BIOS chip is upgraded through the PFR equipment, the system can still be automatically started in time after the upgrading is finished after long-time system power failure after the system is restarted.
When a BIOS chip is upgraded through a PFR device, the current state of a Basic Input Output System (BIOS) is determined by using identification information, the upgrading process is monitored through a BMC background, the function that the system can not be restarted when the BIOS is upgraded through the PFR is improved, the problem that the system can not be automatically restarted when the Basic Input Output System (BIOS) is upgraded at present is solved, the downtime after the BIOS is upgraded is prevented, the process that the device is manually started after the upgrading is manually waited for completing the upgrading is avoided, and the operation and maintenance time and the operation and maintenance cost are greatly saved.
The main body of the above steps may be a board management controller, a BIOS, a terminal, etc., but is not limited thereto.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
In this embodiment, a device is further provided, which is used for implementing the above embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
In the traditional procedure of upgrading the BIOS by the PFR device, the upgrading process is completely dominated by the PFR, the PFR cannot directly inform the BMC of the upgrading process after the BIOS upgrading is finished, and for the system restarting operation executed by a client, the BMC cannot respond to the restarting request of the BIOS after the BIOS upgrading is finished and can generate the downtime phenomenon because the upgrading time is too long.
The PFR is used as a security guarantee for firmware upgrade, and has some functional disadvantages in the upgrade process, for example, when BIOS software is upgraded, a restart system command needs to be executed in some scenes to trigger upgrade, however, the restart command BMC can only save time of the order of seconds, and the BIOS upgrade process often needs several minutes, which results in that the BIOS cannot be automatically booted after being upgraded, and only after the upgrade is completed, the device is manually booted.
In order to solve the above problem, fig. 4 is a schematic structural diagram of a server self-starting device according to an embodiment of the present application, and as shown in fig. 4, the device includes
The identifier detecting module 40 is configured to determine a target state of the bios according to target identifier information, where the target identifier information is used to indicate an operating state of the bios, and the target state includes: a restart upgrade state and a non-restart upgrade state;
in some embodiments of the present application, the target identification information comprises: the method comprises the following steps that first identification information and second identification information are included, the first identification information is used for indicating whether a target server receives a restart instruction, the second identification information is used for indicating whether a basic input output system in the target server starts to be upgraded, and according to the target identification information, the target state of the basic input output system is determined, wherein the method comprises the following steps: detecting whether a first identifier and a second identifier exist in a target storage space according to a first preset period; under the condition that both the first identifier and the second identifier exist, acquiring first identifier information of the first identifier and second identifier information of the second identifier; and determining the target state of the basic input and output system at the first identification information and the second identification information.
In this embodiment, the first flag is a restart flag (power _ cycle), the second flag is an update flag (update), and the target storage space is a shared memory of the BMC.
Specifically, when a BMC program starts to run, a new thread is created, a round-robin mechanism is started in the new thread, the content of a BMC shared memory is read, whether a set power _ cycle identification bit is TRUE (TRUE) or not and whether an update identification bit is TRUE or not are judged, and under the condition that both the power _ cycle identification bit and the update identification bit exist and are TRUE (TRUE), the target state of a Basic Input Output System (BIOS) is judged to be a restart state; in other cases, a target state of a Basic Input Output System (BIOS) is determined to be a non-reboot upgrade state.
In this embodiment, the first predetermined period may be adjusted according to actual requirements.
A state reading module 42, configured to read upgrade state information of the bios when the target state is a restart upgrade state, where the upgrade state information at least includes: is finished;
in order to continuously obtain the current upgrade status of the BIOS, the upgrade status information at least further includes: the method comprises the following steps of reading upgrading state information of a basic input and output system when the basic input and output system is not finished and upgraded abnormally: and under the condition that the target state is a restart upgrading state, reading upgrading state information stored in a target upgrading chip according to a second preset period, wherein the upgrading state information is used for representing the upgrading state of the basic input and output system, and the target upgrading chip is used for upgrading the basic input and output system.
Specifically, the BMC continuously round-robin reads the upgrade status information recorded in the upgrade register of the PFR chip (i.e., the target upgrade chip).
In this embodiment, the second predetermined period may be adjusted according to actual requirements.
In some embodiments of the present application, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: starting a timer at a target time to obtain a timing duration, wherein the target time is the time when the target state is detected to be the restart upgrading state, and the timing duration is used for representing the consumed time length of the basic input and output system upgrading; and under the condition that the timing duration exceeds the preset duration and the read upgrading state information is not complete, deleting the first identifier and the second identifier in the target storage space and sending first alarm information, wherein the first alarm information is used for representing upgrading timeout of the basic input output system.
Specifically, when the target state is detected to be the restart upgrade state and the upgrade state information starts to be read, the timing program is started, after the timing program is started, the BMC thread starts to continuously cycle and read the state of the upgrade register, and meanwhile, if the BIOS update time exceeds the timing time (i.e., the preset time), it is indicated that the upgrade process far exceeds the normal time, and at this time, the upgrade timeout is prompted and a log is recorded.
In this embodiment, the preset time period may be adjusted according to actual requirements.
In some embodiments of the present application, reading the upgrade state information stored in the target upgrade chip according to a second preset period further includes: and under the condition that the upgrading state information is abnormal, deleting the first identifier and the second identifier in the target storage space, and sending second alarm information, wherein the second alarm information is used for representing upgrading failure of the basic input and output system.
Specifically, if the upgrade fails or is abnormal, the power _ cycle and update identification bits of the BMC shared memory are cleared, a round robin is skipped, and the upgrade failure is prompted and a log is recorded.
And a power-on self-starting module 44, configured to send a power-on instruction to the target server to control the target server to start up if the upgrade status information is complete, where the bios is a program for executing a start-up operation in the target server.
In order to implement automatic restart of the device, the method further includes the following steps after sending a boot instruction to the target server when the upgrade status information is completed: deleting the first identifier and the second identifier in the target storage space, and recording log information, wherein the log information comprises at least one of the following: the duration of the basic input and output system and the time of sending the starting command.
Specifically, if the update status information is read to be in a complete (complete) status, the power _ cycle and update identification bits of the BMC shared memory are cleared, a round-robin is skipped, a system boot signal is raised, and a boot instruction is sent to the target server.
The method comprises the steps that a Basic Input Output System (BIOS) sends a first setting instruction to a baseboard management controller under the condition that a restart instruction sent by a target object is received, wherein the first setting instruction is used for creating a first identifier in a target storage space in the baseboard management controller and setting first identifier information;
specifically, after the user executes the system restart operation, the BMC is notified by using an ipmitool command, at this time, an identification bit is set and recorded in the shared memory of the BMC, that is, the shared memory identification bit power _ cycle is set to TRUE.
The basic input output system BIOS sends a second setting instruction to the baseboard management controller under the condition of receiving an upgrade starting instruction, wherein the second setting instruction is used for creating a second identifier in a target storage space in the baseboard management controller and setting second identifier information;
specifically, after the BIOS upgrade process is started, an identification bit for starting BIOS upgrade is set, and the identification bit is written into the BMC shared memory and set to TRUE.
The basic input output system BIOS responds to an upgrading state information acquisition instruction in the upgrading process and sends upgrading state information of the basic input output system to a target upgrading chip;
specifically, in the BIOS upgrade process, the current upgrade status is continuously recorded into the upgrade register of the PFR chip (i.e., the target upgrade chip).
And under the condition that the upgrading state information is finished, the BIOS responds to the starting instruction sent by the substrate management controller to execute the starting operation of the target server.
In the following, a server self-starting method executed in an embodiment of the server self-starting device of the present application is further described, where the server self-starting device executes the method including the following steps:
step 1, when a BMC program starts to run, the BMC creates a new thread, starts a round-robin mechanism in the new thread, reads the content of a BMC shared memory, judges whether the set power _ cycle and update identification bits are TRUE, and if the set power _ cycle and update identification bits are TRUE, carries out round-robin reading of the status bits.
And 2, after a user executes system restart operation, the BIOS informs the BMC by using an ipmitool command, sets an identification bit and records the identification bit into a shared memory of the BMC, namely, sets a power _ cycle of the shared memory identification bit to TRUE.
And 3, after the BIOS is started in the upgrading process, setting an identification bit for starting the BIOS upgrading, and writing the identification bit into the BMC shared memory, namely setting the shared memory identification bit update to TRUE.
And 4, continuously recording the current upgrading state into an upgrading register of the PFR chip (namely the target upgrading chip) by the BIOS in the upgrading process.
And 5, under the condition that the two identification bits read from and written into the shared memory by the round-robin thread started in the step 1 are TRUE at the same time, starting a timing program, and simultaneously starting the BMC thread to continuously round-robin and read the state of the upgrade register.
Step 6, if the BIOS updating time exceeds the timing time (namely the preset time), the upgrading process is far beyond the normal time, and at the moment, the upgrading overtime is prompted and the log is recorded; if the upgrading fails or is abnormal, clearing power _ cycle and update identification bits of the BMC shared memory, jumping out of the round robin and prompting the upgrading failure and recording a log; if the upgrade state information is read to be in a complete state, power _ cycle and update identification bits of the BMC shared memory are cleared, a round-robin and system boot signal is pulled up, and a boot instruction is sent to the target server.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
According to the method, when the BIOS chip is upgraded through the PFR equipment, the system can still be automatically started in time after the upgrading is finished after long-time system power failure after the system is restarted.
When a BIOS chip is upgraded through PFR equipment, the current state of a basic input/output system (BIOS) is determined by utilizing identification information, the upgrading process is monitored through a BMC background, the function that the system can not be restarted when the BIOS is upgraded through PFR is improved, the problem that the automatic restarting of the system can not be realized when the basic input/output system (BIOS) is upgraded at present is solved, the effect of preventing the BIOS from being crashed after being upgraded is achieved, the process of manually starting the equipment after manually waiting for the completion of the upgrading is avoided, and the operation and maintenance time and the operation and maintenance cost are greatly saved.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to, when executed, perform the steps in any of the above server self-booting method embodiments: determining a target state of the basic input output system according to target identification information, wherein the target identification information is used for indicating an operating state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state; under the condition that the target state is a restart upgrade state, reading upgrade state information of the basic input output system, wherein the upgrade state information at least comprises: is finished; and under the condition that the upgrading state information is finished, sending a starting instruction to the target server to control the target server to start, wherein the basic input and output system is a program for executing starting operation in the target server.
Through the application, when the BIOS chip is upgraded through the PFR device, the current state of a basic input/output system (BIOS) is determined by utilizing the identification information, the upgrading process is monitored through the BMC background, the function that the system can not be restarted when the BIOS is upgraded through the PFR is improved, the problem that the automatic restarting of the system can not be realized when the basic input/output system (BIOS) is upgraded at present is solved, the effect of preventing the BIOS from being crashed after being upgraded is achieved, the manual equipment starting process after the upgrading is avoided being manually waited for, and the operation and maintenance time and the operation and maintenance cost are greatly saved.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present application further provide an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any server self-booting method embodiment described above: determining a target state of the basic input output system according to target identification information, wherein the target identification information is used for indicating the running state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state; under the condition that the target state is a restart upgrade state, reading upgrade state information of the basic input output system, wherein the upgrade state information at least comprises: is finished; and under the condition that the upgrading state information is finished, sending a starting instruction to the target server to control the target server to start, wherein the basic input and output system is a program for executing starting operation in the target server.
In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Through the application, when the BIOS chip is upgraded through the PFR device, the current state of a basic input/output system (BIOS) is determined by utilizing the identification information, the upgrading process is monitored through the BMC background, the function that the system can not be restarted when the BIOS is upgraded through the PFR is improved, the problem that the automatic restarting of the system can not be realized when the basic input/output system (BIOS) is upgraded at present is solved, the effect of preventing the BIOS from being crashed after being upgraded is achieved, the manual equipment starting process after the upgrading is avoided being manually waited for, and the operation and maintenance time and the operation and maintenance cost are greatly saved.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the present application described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing devices, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into separate integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A server self-starting method is characterized by comprising the following steps:
determining a target state of a basic input output system according to target identification information, wherein the target identification information is used for indicating an operation state of the basic input output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state;
reading upgrade state information of the basic input output system under the condition that the target state is a restart upgrade state, wherein the upgrade state information at least comprises: is finished;
and sending a starting instruction to a target server to control the target server to start under the condition that the upgrading state information is finished, wherein the basic input and output system is a program for executing starting operation in the target server.
2. The method of claim 1, wherein the target identification information comprises: the first identification information is used for indicating whether the target server receives a restart instruction, the second identification information is used for indicating whether the basic input output system in the target server starts to be upgraded, and determining the target state of the basic input output system according to the target identification information comprises the following steps:
detecting whether a first identifier and a second identifier exist in the target storage space according to a first preset period;
under the condition that the first identification and the second identification exist, acquiring first identification information of the first identification and second identification information of the second identification;
and determining the target state of the basic input and output system in the first identification information and the second identification information.
3. The method of claim 1, wherein the upgrade status information further comprises at least: the step of reading the upgrade state information of the basic input and output system comprises the following steps:
and under the condition that the target state is a restart upgrading state, reading upgrading state information stored in a target upgrading chip according to a second preset period, wherein the upgrading state information is used for representing the upgrading state of the basic input and output system, and the target upgrading chip is used for upgrading the basic input and output system.
4. The method of claim 3, wherein reading the upgrade status information stored in the target upgrade chip according to a second preset cycle further comprises:
starting a timer at a target time to obtain a timing duration, wherein the target time is the time when the target state is detected to be the restart upgrading state, and the timing duration is used for representing the time length consumed by upgrading the basic input and output system;
and deleting the first identifier and the second identifier in the target storage space and sending first alarm information under the condition that the timing duration exceeds a preset duration and the read upgrading state information is not completed, wherein the first alarm information is used for representing upgrading timeout of the basic input output system.
5. The method of claim 3, wherein reading the upgrade status information stored in the target upgrade chip at a second preset period further comprises:
and under the condition that the upgrading state information is abnormal, deleting the first identifier and the second identifier in the target storage space, and sending second alarm information, wherein the second alarm information is used for representing the upgrading failure of the basic input output system.
6. The method of claim 1, wherein when the upgrade status information is complete, after sending a boot instruction to a target server, the method further comprises:
deleting the first identifier and the second identifier in the target storage space, and recording log information, wherein the log information comprises at least one of the following: the duration of the basic input and output system and the time of sending the starting instruction.
7. A server self-starting method is characterized by comprising the following steps:
under the condition of receiving a restart instruction sent by a target object, sending a first setting instruction to a baseboard management controller, wherein the first setting instruction is used for creating a first identifier in a target storage space in the baseboard management controller and setting first identifier information;
under the condition of a received upgrade starting instruction, sending a second setting instruction to the baseboard management controller, wherein the second setting instruction is used for creating a second identifier in a target storage space in the baseboard management controller and setting second identifier information;
in the upgrading process, responding to an upgrading state information acquisition instruction, and sending upgrading state information of the basic input and output system to a target upgrading chip;
and under the condition that the upgrading state information is finished, responding to a starting instruction sent by the substrate management controller, and executing the starting operation of the target server.
8. A server self-starting device, comprising:
the system comprises an identification detection module and a basic input and output system, wherein the identification detection module is used for determining a target state of the basic input and output system according to target identification information, the target identification information is used for indicating an operation state of the basic input and output system, and the target state comprises: a restart upgrade state and a non-restart upgrade state;
a state reading module, configured to read upgrade state information of the bios when the target state is a restart upgrade state, where the upgrade state information at least includes: is finished;
and the starting self-starting module is used for sending a starting instruction to the target server to control the target server to start under the condition that the upgrading state information is finished, wherein the basic input and output system is a program for executing starting operation in the target server.
9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, wherein the computer program, when being executed by a processor, carries out the steps of the method as set forth in any one of the claims 1 to 6 or the steps of the method as set forth in claim 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in any one of claims 1 to 6 or the steps of the method as claimed in claim 7 are implemented by the processor executing the computer program.
CN202211386071.0A 2022-11-07 2022-11-07 Server self-starting method and device, readable storage medium and electronic equipment Pending CN115658113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211386071.0A CN115658113A (en) 2022-11-07 2022-11-07 Server self-starting method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211386071.0A CN115658113A (en) 2022-11-07 2022-11-07 Server self-starting method and device, readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115658113A true CN115658113A (en) 2023-01-31

Family

ID=85016983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211386071.0A Pending CN115658113A (en) 2022-11-07 2022-11-07 Server self-starting method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115658113A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400938A (en) * 2023-03-27 2023-07-07 荣耀终端有限公司 Operating system upgrading method, device and storage medium
CN117290164A (en) * 2023-11-22 2023-12-26 荣耀终端有限公司 Information recording method at restarting, electronic device and readable storage medium
CN117311769A (en) * 2023-11-29 2023-12-29 苏州元脑智能科技有限公司 Server log generation method and device, storage medium and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400938A (en) * 2023-03-27 2023-07-07 荣耀终端有限公司 Operating system upgrading method, device and storage medium
CN116400938B (en) * 2023-03-27 2023-11-24 荣耀终端有限公司 Operating system upgrading method, device and storage medium
CN117290164A (en) * 2023-11-22 2023-12-26 荣耀终端有限公司 Information recording method at restarting, electronic device and readable storage medium
CN117290164B (en) * 2023-11-22 2024-05-10 荣耀终端有限公司 Information recording method at restarting, electronic device and readable storage medium
CN117311769A (en) * 2023-11-29 2023-12-29 苏州元脑智能科技有限公司 Server log generation method and device, storage medium and electronic equipment
CN117311769B (en) * 2023-11-29 2024-02-27 苏州元脑智能科技有限公司 Server log generation method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN115658113A (en) Server self-starting method and device, readable storage medium and electronic equipment
US10049010B2 (en) Method, computer, and apparatus for migrating memory data
CN108363659B (en) Method and device for processing abnormity of electronic equipment
CN114116280B (en) Interactive BMC self-recovery method, system, terminal and storage medium
CN110647333A (en) Firmware upgrading method and equipment configured to upgrade firmware therein
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
US10983825B2 (en) Processing for multiple containers are deployed on the physical machine
CN111737064A (en) BMC system control method and device, storage medium and computer equipment
CN111338698A (en) Method and system for accurately booting server by BIOS (basic input output System)
CN113360347A (en) Server and control method thereof
CN108897646B (en) Switching method of BIOS (basic input output System) chips and substrate management controller
CN111309388B (en) Automatic rollback system and method for system software version of equipment
CN117289963A (en) Method and equipment for online updating target area of server platform service firmware
CN117251333A (en) Method, device, equipment and storage medium for acquiring hard disk information
CN116560678A (en) Firmware updating method and device, storage medium and electronic device
CN115951949A (en) Recovery method and device for configuration parameters of BIOS (basic input output System) and computing equipment
CN115098342A (en) System log collection method, system, terminal and storage medium
CN114741119A (en) System starting method and device, computer equipment and storage medium
CN114791835A (en) Program restarting method and device, storage medium and electronic device
CN111078452A (en) BMC firmware image recovery method and device
CN117215859B (en) Main and standby BIOS automatic switching method, automatic switching device and computer
CN111400076B (en) Downtime restoration method, device, equipment and storage medium
CN116932000A (en) System detection method and device, storage medium and electronic equipment
CN117349062A (en) BIOS fault processing method, system, device, equipment and medium
CN115562900B (en) AMD server system installation power-off processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination