CN109885328B - BIOS updating method and system and related components - Google Patents

BIOS updating method and system and related components Download PDF

Info

Publication number
CN109885328B
CN109885328B CN201910151075.2A CN201910151075A CN109885328B CN 109885328 B CN109885328 B CN 109885328B CN 201910151075 A CN201910151075 A CN 201910151075A CN 109885328 B CN109885328 B CN 109885328B
Authority
CN
China
Prior art keywords
bios
updating
time length
timer
update
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.)
Active
Application number
CN201910151075.2A
Other languages
Chinese (zh)
Other versions
CN109885328A (en
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 CN201910151075.2A priority Critical patent/CN109885328B/en
Publication of CN109885328A publication Critical patent/CN109885328A/en
Application granted granted Critical
Publication of CN109885328B publication Critical patent/CN109885328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a BIOS updating method, which comprises the steps of inquiring a target task which is executed at the current moment and starting a BIOS timer when a BIOS updating instruction is received; judging whether the time length recorded by the BIOS timer is the preset time length or not; the preset time length is determined according to the residual time length for completing the target task; if yes, generating a BIOS updating event, and acquiring a corresponding BIOS updating file according to the BIOS updating event; and executing BIOS updating operation by using the BIOS updating file. The method can update the BIOS on the premise that the server does not run tasks, and the updating process of the BIOS is optimized. The application also discloses a BIOS updating system, a computer readable storage medium and a server, which have the beneficial effects.

Description

BIOS updating method and system and related components
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for updating a BIOS, a computer-readable storage medium, and a server.
Background
The BIOS (Basic Input Output System) is a set of programs that is solidified to a ROM chip on a main board in a computer, and stores the most important Basic Input and Output programs of the computer, a self-test program after power-on and a System self-starting program, and the BIOS can read and write specific information set by the System from the CMOS. The BIOS can provide the bottommost and most direct hardware setting and control for the computer, the BIOS can also provide relevant system parameters for the operating system, and the BIOS can be widely applied to servers.
In the related art, when the System updates the BIOS, an operator of an MIS (Management Information System) is required to perform a reboot operation on the server to complete the update operation of the BIOS. However, since the server cannot be interrupted in time during the operation, performing the reboot operation is not friendly and convenient for the server.
Therefore, how to update the BIOS on the premise that the server runs without tasks and optimize the update flow of the BIOS is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a BIOS updating method, a system, a computer readable storage medium and a server, which can update the BIOS and optimize the BIOS updating process on the premise that the server does not run tasks.
In order to solve the above technical problem, the present application provides a BIOS updating method, including:
when a BIOS updating instruction is received, inquiring a target task which is being executed at the current moment and starting a BIOS timer;
judging whether the time length recorded by the BIOS timer is the preset time length or not; the preset time length is determined according to the residual time length for completing the target task;
if yes, generating a BIOS updating event, and acquiring a corresponding BIOS updating file according to the BIOS updating event;
and executing BIOS updating operation by using the BIOS updating file.
Optionally, the obtaining a corresponding BIOS update file according to the BIOS update event includes:
and acquiring a corresponding BIOS updating file from a cache of a memory according to the BIOS updating event.
Optionally, before determining whether the duration recorded by the BIOS timer is the preset duration, the method further includes:
and issuing the preset duration to the BIOS timer by utilizing the BMC.
Optionally, after the duration recorded by the BIOS timer is the preset duration, the method further includes:
and restoring the current time data of the BIOS timer to a default value, and deleting the preset duration.
Optionally, after performing the BIOS update operation using the BIOS update file, the method further includes:
and updating the system log and generating prompt information of BIOS updating completion.
The present application further provides an update system of a BIOS, the update system including:
the query module is used for querying a target task which is executed at the current moment and starting a BIOS timer when a BIOS updating instruction is received;
the judging module is used for judging whether the time length recorded by the BIOS timer is the preset time length or not; the preset time length is determined according to the residual time length for completing the target task;
the file acquisition module is used for generating a BIOS updating event when the time length recorded by the BIOS timer is the preset time length, and acquiring a corresponding BIOS updating file according to the BIOS updating event;
and the updating module is used for executing the BIOS updating operation by utilizing the BIOS updating file.
Optionally, the file acquiring module includes:
the update event generating unit is used for generating the BIOS update event when the time length recorded by the BIOS timer is the preset time length;
and the update file generation unit is used for acquiring a corresponding BIOS update file from a cache of a memory according to the BIOS update event.
Optionally, the method further includes:
and the prompt module is used for issuing the preset time length to the BIOS timer by utilizing the BMC before judging whether the time length recorded by the BIOS timer is the preset time length.
The application also provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps executed by the update method of the BIOS are realized.
The application also provides a server, which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the step of executing the BIOS updating method when calling the computer program in the memory.
The invention provides a BIOS updating method, which comprises the steps of inquiring a target task which is executed at the current moment and starting a BIOS timer when a BIOS updating instruction is received; judging whether the time length recorded by the BIOS timer is the preset time length or not; the preset time length is determined according to the residual time length for completing the target task; if yes, generating a BIOS updating event, and acquiring a corresponding BIOS updating file according to the BIOS updating event; and executing BIOS updating operation by using the BIOS updating file.
When a BIOS updating instruction is received, firstly, according to a target task which is executed by a server at the current moment, the preset time length is determined according to the residual time length for completing the target task. Further, whether the time for updating the BIOS is reached is judged by using the BIOS timer, and when the time recorded by the BIOS timer is consistent with the preset time, the server is indicated that no task is executed and can be restarted at the moment, so that a BIOS updating event is automatically generated so as to obtain a BIOS updating file required by updating the BIOS according to the BIOS updating event, and the updating operation is executed by using the BIOS updating file. The scheme described in the application can update the BIOS on the premise that the server runs without tasks, and the updating flow of the BIOS is optimized. The application also provides a BIOS updating system, a computer readable storage medium and a server, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for updating a BIOS according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating another BIOS updating method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a server;
fig. 4 is a schematic structural diagram of a BIOS update system according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the system updates the BIOS, an MIS operator is required to complete the related updating operation by rebooting the server, but if the server is running a task, the interruption cannot be timely carried out, and the rebooting is not friendly and convenient for the server. Aiming at the defects in the process of updating the BIOS in the related technology, the application provides a new BIOS updating method through the following embodiments, and the effects of updating the BIOS and optimizing the updating process of the BIOS can be achieved on the premise that the server runs without tasks.
Referring to fig. 1, fig. 1 is a flowchart illustrating a BIOS updating method according to an embodiment of the present disclosure.
The specific steps may include:
s101: when a BIOS updating instruction is received, inquiring a target task which is being executed at the current moment and starting a BIOS timer;
the execution subject of this embodiment may be a server, and may be applied to a BIOS update process of the server. Before receiving the BIOS update instruction, there may be an operation of storing the BIOS update file to a specific storage space. Because the server needs to be restarted when the BIOS is updated, and if the server is restarted when the server executes some operation tasks, the server may cause a certain degree of damage to the server, when the BIOS update instruction is received, the target task currently being executed by the server is firstly queried, so as to determine the time length required for executing all the target tasks, and then the BIOS is updated after the server does not have the target task to be executed. It is understood that, after receiving the BIOS update command, the server may suspend the task to be executed in the task queue, and execute the task after the BIOS update is completed.
There may be a plurality of timers inside the BIOS, and the BIOS timer mentioned in this step is a timer for setting a specific update time. There may also be an operation of acquiring current time data of a BIOS timer for recording time before this step.
S102: judging whether the time length recorded by the BIOS timer is the preset time length or not; if yes, entering S103; if not, ending the flow;
the preset time length is determined according to the remaining time length for completing the target task, and optionally, the preset time length mentioned herein may be greater than or equal to the remaining time length for completing the target task. The preset duration is an evaluation criterion for judging whether the current time is the time for updating the BIOS, and the calculation mode of the preset duration may be flexibly selected according to the application condition of the embodiment, and is not specifically limited here.
For example, the determination process of S102 is illustrated, for example, the BIOS timer starts to count from 0, and the preset time duration is 10 seconds, so when the time duration recorded by the BIOS timer is 10 seconds, the related BIOS updating operations of S102 and S103 may be performed. As a possible implementation manner, if the duration recorded by the BIOS timer is not the preset duration, a new duration recorded by the BIOS timer may be obtained after delaying for a certain time, and the determining operation of S102 may be re-entered.
S103: generating a BIOS updating event, and acquiring a corresponding BIOS updating file according to the BIOS updating event;
in this step, a BIOS update event is generated based on the determination in S101 that the current time data of the BIOS timer is the preset time data. The BIOS update event is used for reading a cache area of the memory to obtain an update file of the BIOS. As a possible implementation manner, this step may specifically be to obtain a corresponding BIOS update file from a cache of a memory according to the BIOS update event.
S104: and executing BIOS updating operation by using the BIOS updating file.
On the basis of obtaining the BIOS updating file, the step can utilize the BIOS updating file to execute the BIOS updating operation. The step can solve the problem that the re-boot action must be executed at the appointed time due to the relation of the server when the MIS operator burns the BIOS in the related technology in the process of updating the BIOS. The BIOS updating operation of the embodiment is completed without adding hardware modification, so that the operation and maintenance cost of the server can be reduced. As a feasible implementation manner, the embodiment can use the network and the BMC to burn the BIOS, thereby improving the convenience of updating the BIOS.
In this embodiment, when a BIOS update instruction is received, a preset time length is first determined according to a target task that is being executed by a server at the current time and according to a remaining time length for completing the target task. Further, whether the time for updating the BIOS is reached is judged by using the BIOS timer, and when the time recorded by the BIOS timer is consistent with the preset time, the server is indicated that no task is executed and can be restarted at the moment, so that a BIOS updating event is automatically generated so as to obtain a BIOS updating file required by updating the BIOS according to the BIOS updating event, and the updating operation is executed by using the BIOS updating file. The scheme described in the embodiment can update the BIOS on the premise that the server runs without tasks, and the updating flow of the BIOS is optimized.
Referring to fig. 2, fig. 2 is a flowchart of another BIOS updating method according to an embodiment of the present application, and the specific steps may include:
s201: when a BIOS updating instruction is received, inquiring a target task which is being executed at the current moment and starting a BIOS timer;
s202: judging whether the time length recorded by the BIOS timer is the preset time length or not; if yes, entering S203; if not, ending the flow;
s203: and generating a BIOS updating event, and acquiring a corresponding BIOS updating file from a cache of a memory according to the BIOS updating event.
S204: and executing BIOS updating operation by using the BIOS updating file.
S205: and updating the system log and generating prompt information of BIOS updating completion.
As an optional implementation manner, the BIOS updating method of the present application may further issue the preset duration to the BIOS timer by using the BMC. Referring to fig. 3, fig. 3 is a schematic diagram of a server, in which a timer is disposed inside a BIOS, and an update event of the BIOS is generated by setting time of the timer, and the update event is mainly used to read a buffer of a memory to obtain an update file of the BIOS and update the BIOS. The BIOS updating time can be flexibly adjusted by setting the preset time length through the BMC.
As an optional implementation manner, after the duration recorded by the BIOS timer is the preset duration, the current time data of the BIOS timer may be restored to a default value, and the preset duration may be deleted. When receiving the update time setting information issued by the BMC again, the current time data of the BIOS timer and the preset duration can be set according to the update time setting information.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a BIOS update system according to an embodiment of the present disclosure;
the system may include:
the query module 100 is configured to query a target task currently executed at the current time and start a BIOS timer when a BIOS update instruction is received;
a judging module 200, configured to judge whether a duration recorded by the BIOS timer is the preset duration; the preset time length is determined according to the residual time length for completing the target task;
the file obtaining module 300 is configured to generate a BIOS update event when the duration recorded by the BIOS timer is the preset duration, and obtain a corresponding BIOS update file according to the BIOS update event;
an update module 400 configured to perform a BIOS update operation using the BIOS update file.
In this embodiment, the BIOS timer is used to determine whether the time required to update the BIOS is reached, and when the current time data of the BIOS timer is consistent with the preset time data, the BIOS update event is automatically generated. Further, a BIOS update file required for updating the BIOS is obtained according to the BIOS update event, and the update operation is executed by utilizing the BIOS update file. In the embodiment, the server does not need to be restarted to generate the BIOS update event in the BIOS update process, so the scheme described in the embodiment can update the BIOS on the premise of not interrupting the operation of the server, and optimize the update flow of the BIOS.
Further, the file acquiring module 300 includes:
the update event generating unit is used for generating the BIOS update event when the time length recorded by the BIOS timer is the preset time length;
and the update file generation unit is used for acquiring a corresponding BIOS update file from a cache of a memory according to the BIOS update event.
Further, the system further comprises:
and the prompt module is used for issuing the preset time length to the BIOS timer by utilizing the BMC before judging whether the time length recorded by the BIOS timer is the preset time length.
Further, the system further comprises:
and the time data recovery module is used for recovering the current time data of the BIOS timer to a default value and deleting the preset duration.
Further, the system further comprises:
and the prompting module is used for updating the system log and generating prompting information of BIOS updating completion after the BIOS updating operation is executed by using the BIOS updating file.
Since the embodiment of the system part corresponds to the embodiment of the method part, the embodiment of the system part is described with reference to the embodiment of the method part, and is not repeated here.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application also provides a server, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the server may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A BIOS updating method is characterized by comprising the following steps:
when a BIOS updating instruction is received, inquiring a target task which is being executed at the current moment and starting a BIOS timer;
judging whether the time length recorded by the BIOS timer is a preset time length or not; the preset time length is determined according to the residual time length for completing the target task;
if yes, generating a BIOS updating event, and acquiring a corresponding BIOS updating file according to the BIOS updating event;
and executing BIOS updating operation by using the BIOS updating file.
2. The updating method of claim 1, wherein obtaining the corresponding BIOS update file according to the BIOS update event comprises:
and acquiring a corresponding BIOS updating file from a cache of a memory according to the BIOS updating event.
3. The updating method of claim 1, before determining whether the duration recorded by the BIOS timer is the preset duration, further comprising:
and issuing the preset duration to the BIOS timer by utilizing the BMC.
4. The updating method of claim 1, wherein after the time period recorded by the BIOS timer is the preset time period, further comprising:
and restoring the current time data of the BIOS timer to a default value, and deleting the preset duration.
5. The updating method of any of claims 1 to 4, further comprising, after performing a BIOS update operation using the BIOS update file:
and updating the system log and generating prompt information of BIOS updating completion.
6. An update system for a BIOS, comprising:
the query module is used for querying a target task which is executed at the current moment and starting a BIOS timer when receiving a BIOS updating instruction;
the judging module is used for judging whether the time length recorded by the BIOS timer is a preset time length or not; the preset time length is determined according to the residual time length for completing the target task;
the file acquisition module is used for generating a BIOS updating event when the time length recorded by the BIOS timer is the preset time length, and acquiring a corresponding BIOS updating file according to the BIOS updating event;
and the updating module is used for executing the BIOS updating operation by utilizing the BIOS updating file.
7. The update system of claim 6, wherein the file acquisition module comprises:
the update event generating unit is used for generating the BIOS update event when the time length recorded by the BIOS timer is the preset time length;
and the update file generation unit is used for acquiring a corresponding BIOS update file from a cache of a memory according to the BIOS update event.
8. The updating system of claim 6, further comprising:
and the prompt module is used for issuing the preset time length to the BIOS timer by utilizing the BMC before judging whether the time length recorded by the BIOS timer is the preset time length.
9. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of the method for updating a BIOS according to any one of claims 1 to 5.
10. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for updating a BIOS according to any one of claims 1 to 5 when the computer program is executed.
CN201910151075.2A 2019-02-28 2019-02-28 BIOS updating method and system and related components Active CN109885328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910151075.2A CN109885328B (en) 2019-02-28 2019-02-28 BIOS updating method and system and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910151075.2A CN109885328B (en) 2019-02-28 2019-02-28 BIOS updating method and system and related components

Publications (2)

Publication Number Publication Date
CN109885328A CN109885328A (en) 2019-06-14
CN109885328B true CN109885328B (en) 2022-05-24

Family

ID=66929976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910151075.2A Active CN109885328B (en) 2019-02-28 2019-02-28 BIOS updating method and system and related components

Country Status (1)

Country Link
CN (1) CN109885328B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101459140B1 (en) * 2007-12-26 2014-11-07 엘지전자 주식회사 Apparatus and method for controlling Power Management
CN104573529B (en) * 2015-01-28 2018-04-17 加弘科技咨询(上海)有限公司 A kind of division of BIOS/firmware, update method and system
CN108089898A (en) * 2018-01-16 2018-05-29 郑州云海信息技术有限公司 The method, apparatus and system of a kind of upgrading BIOS

Also Published As

Publication number Publication date
CN109885328A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN107844386B (en) Data backup and recovery method and device
US9361128B2 (en) Fast computer startup
CN102023908B (en) Method and device for backing up boot program
CN100507773C (en) Method and device implementing on-line upgrading of a fixed programme
JP6342070B2 (en) Job management apparatus, job management method, and job management program
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
CN104503788A (en) Setting method capable of shortening starting time of Android operating system
CN113032788A (en) Firmware image switching method, device and medium in computer system
CN104216802A (en) Memory database recovery method and device
WO2017096917A1 (en) Method and apparatus for injecting hot patch
CN110955560A (en) Virtual machine snapshot generation method and system, electronic device and storage medium
CN111124509A (en) Server starting method and device
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
CN109885328B (en) BIOS updating method and system and related components
CN113641378A (en) Optical module program upgrading method, device, equipment and readable storage medium
WO2016131294A1 (en) Version upgrade processing method and device
CN106569912B (en) Method and system for restoring factory settings of mobile terminal
CN111813748B (en) File system mounting method and device, electronic equipment and storage medium
CN111176686B (en) BIOS upgrading method and system, electronic equipment and storage medium
CN108268285B (en) BIOS version upgrading method, device, equipment and readable storage medium
CN109491947B (en) Method and related device for sending heat removal information of PCIE (peripheral component interface express) external card
CN108920216B (en) Method, device, terminal and storage medium for closing software compatible mode
CN111399921A (en) Switching method, device and equipment for server boot logo
TWI465889B (en) Hibernation management methods and devices using the same
CN107239474B (en) Data recording method and device

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
GR01 Patent grant
GR01 Patent grant