CN113064625A - Method, device, equipment and medium for upgrading BIOS outside band - Google Patents

Method, device, equipment and medium for upgrading BIOS outside band Download PDF

Info

Publication number
CN113064625A
CN113064625A CN202110453715.2A CN202110453715A CN113064625A CN 113064625 A CN113064625 A CN 113064625A CN 202110453715 A CN202110453715 A CN 202110453715A CN 113064625 A CN113064625 A CN 113064625A
Authority
CN
China
Prior art keywords
variable
bios
old
new
firmware
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.)
Granted
Application number
CN202110453715.2A
Other languages
Chinese (zh)
Other versions
CN113064625B (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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110453715.2A priority Critical patent/CN113064625B/en
Publication of CN113064625A publication Critical patent/CN113064625A/en
Application granted granted Critical
Publication of CN113064625B publication Critical patent/CN113064625B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for upgrading BIOS outside the band, which comprises the following steps: acquiring BIOS firmware to be upgraded through a network; respectively acquiring an old variable and an old variable structure body from an old NVRAM firmware volume and an old user firmware volume of old BIOS firmware; acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting; creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded; and upgrading the BIOS by using the BIOS firmware to be upgraded. The time overhead of BIOS upgrading can be reduced, and therefore user experience is improved.

Description

Method, device, equipment and medium for upgrading BIOS outside band
Technical Field
The present application relates to the field of server technologies, and in particular, to a method, an apparatus, a device, and a medium for upgrading a BIOS in an out-of-band manner.
Background
In the running process of the server, due to the application requirement change or the need of repairing firmware bugs, the requirement of upgrading the BIOS (i.e., Basic Input Output System) firmware is met, at this Time, the server is providing services, the upgraded BIOS firmware can take effect only after being restarted, and the Time of restarting belongs to Down Time (Down Time). The availability and serviceability of the server are seriously influenced by the length of the Down time, and the quick completion of the BIOS firmware upgrade is an important requirement and index. After the server is delivered and operated, the server is operated in the data center, and an administrator generally connects to a BMC (Baseboard Management Controller) through a network, and manages and sets the server through the BMC, thereby implementing out-of-band Management.
At present, the conventional method for upgrading the BIOS out of band usually includes that the last boot BIOS generates a current setting file from a current setting and sends the current setting file to the BMC, and before upgrading the BIOS, the BMC generates a future setting file according to the current setting file, and then upgrades the BIOS. After booting, the BIOS reads the future setting file from the BMC, then parses the future setting file, writes the setting into an NVRAM (Non-Volatile Random Access Memory) of the BIOS, deletes the future setting file, and restarts the effect. And after starting up, sending the current setting file generated by the current setting to the BMC for setting synchronization. After the BIOS is updated, the BIOS also needs to generate a setting attribute file and send the setting attribute file to the BMC, the setting attribute file is large, and the generation and sending time is long. The disadvantages are that: the time for generating the current setting file is longer when the BIOS is started; the time consumed for the BIOS to send the current setting file to the BMC is long, and the time consumed for the BIOS to read the setting file from the BMC is long; the time consumed by the BIOS to analyze the setting file and write the BIOS setting into the NVRAM of the BIOS is long; the restart is effective after the setting is finished, and the time consumption of the restart process is long; after the BIOS is restarted, the current setting configuration file is generated again and is synchronized to the BMC, and the consumed time is long; it takes a long time for the BIOS to generate and send the setting property file to the BMC. Resulting in lengthy downtime that severely impacts the availability and serviceability of the servers.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for upgrading a BIOS in an out-of-band manner, which can reduce time overhead of BIOS upgrade, thereby improving user experience. The specific scheme is as follows:
in a first aspect, the present application discloses a method for upgrading a BIOS in an out-of-band manner, which is applied to a baseboard management controller, and includes:
acquiring BIOS firmware to be upgraded through a network;
respectively acquiring an old variable and an old variable structure body from an old NVRAM firmware volume and an old user firmware volume of old BIOS firmware;
acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting;
creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
and upgrading the BIOS by using the BIOS firmware to be upgraded.
Optionally, before the obtaining the old variable and the old variable structure from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, respectively, the method further includes:
the old NVRAM firmware volume and the old user firmware volume are looked up according to their globally unique identifiers.
Optionally, the creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure includes:
analyzing the old variable by using the old variable structure to obtain the value of each old member variable;
and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
Optionally, the creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable includes:
acquiring a default value of each old member variable from the old NVRAM firmware volume, and acquiring a default value of each variable of the BIOS firmware to be upgraded from the new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, and if the values of the old member variables are not consistent with the default values of the old member variables, creating a new variable corresponding to the new variable structure by using the values of the old member variables and the new variable structure; and if so, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
Optionally, the old variable structure and the new variable structure both include a member variable ID and a member variable data type, and the member variable ID is a corresponding variable name.
Optionally, after the BIOS firmware to be upgraded is used to perform BIOS upgrade, the method further includes:
acquiring an ID (identity) of a quantity to be modified and a variable value to be modified, which are sent by a user terminal;
and updating the corresponding variable in the new NVRAM firmware volume by using the new variable structure body of the current BIOS and the variable value to be modified.
Optionally, before obtaining the variable ID and the variable value to be modified sent by the user terminal, the method further includes:
acquiring a BIOS setting modification request sent by a user terminal;
and responding to the BIOS setting modification request, returning the ID of the variable to be modified and the variable settable range to the user terminal, so that the user terminal determines the variable value to be modified by using the variable settable range and sends the ID of the variable to be modified and the variable value to be modified to a substrate management controller.
In a second aspect, the present application discloses a device for upgrading BIOS in an out-of-band manner, which is applied to a baseboard management controller, and includes:
the BIOS firmware acquisition module to be upgraded is used for acquiring the BIOS firmware to be upgraded through a network;
an old variable and structure acquisition module, configured to acquire an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware, respectively;
the new variable structure acquisition module is used for acquiring a new variable structure from a new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting;
a new variable determining module, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be updated;
and the BIOS upgrading module is used for upgrading the BIOS by using the BIOS firmware to be upgraded.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the method for upgrading the BIOS out of band.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program which, when executed by a processor, implements the aforementioned method for out-of-band upgrading a BIOS.
Therefore, the BIOS firmware to be upgraded is acquired through a network, then an old variable and an old variable structure body are acquired from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware respectively, and a new variable structure body is acquired from a new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting, then new variables corresponding to the new variable structure body are created based on the old variable structure body, the old variables and the new variable structure body, the new variables are written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then the BIOS is upgraded by using the BIOS firmware to be upgraded. The setting of the old BIOS firmware is reserved through the NVRAM firmware volume of the new BIOS firmware and the NVRAM firmware volume of the old BIOS firmware, BIOS out-of-band upgrading is completely realized through the BMC, the defects that a traditional out-of-band scheme needs one additional restart, generation, long time consumption for exchanging and synchronizing setting files, long downtime and influence on system availability and serviceability are overcome, the BIOS of a server in operation is upgraded, the BIOS can take effect after the firmware is upgraded and restarted once, service is continuously provided for a user, the downtime is short, the time overhead of BIOS upgrading can be reduced, and therefore user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for upgrading a BIOS out-of-band as disclosed herein;
FIG. 2 is a flowchart of a particular method for out-of-band upgrading a BIOS as disclosed herein;
FIG. 3 is a flow chart of BIOS setting modification as disclosed herein;
FIG. 4 is a schematic structural diagram of an apparatus for upgrading BIOS in an out-of-band manner according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the 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.
At present, the conventional method for upgrading the BIOS out of band usually includes that the last boot BIOS generates a current setting file from a current setting and sends the current setting file to the BMC, and before upgrading the BIOS, the BMC generates a future setting file according to the current setting file, and then upgrades the BIOS. After the boot, the BIOS reads the future setting file from the BMC, then parses the future setting file, writes the setting into the NVRAM of the BIOS, deletes the future setting file, and restarts the valid. And after starting up, sending the current setting file generated by the current setting to the BMC for setting synchronization. After the BIOS is updated, the BIOS also needs to generate a setting attribute file and send the setting attribute file to the BMC, the setting attribute file is large, and the generation and sending time is long. The disadvantages are that: the time for generating the current setting file is longer when the BIOS is started; the time consumed for the BIOS to send the current setting file to the BMC is long, and the time consumed for the BIOS to read the setting file from the BMC is long; the time consumed by the BIOS to analyze the setting file and write the BIOS setting into the NVRAM of the BIOS is long; the restart is effective after the setting is finished, and the time consumption of the restart process is long; after the BIOS is restarted, the current setting configuration file is generated again and is synchronized to the BMC, and the consumed time is long; it takes a long time for the BIOS to generate and send the setting property file to the BMC. Resulting in lengthy downtime that severely impacts the availability and serviceability of the servers. Therefore, the scheme for upgrading the BIOS in an out-of-band mode is provided, time overhead of BIOS upgrading can be reduced, and user experience is improved.
Referring to fig. 1, an embodiment of the present application discloses a method for upgrading a BIOS in an out-of-band manner, which is applied to a baseboard management controller, and includes:
step S11: and acquiring the BIOS firmware to be upgraded through a network.
In a specific implementation manner, the BIOS firmware to be upgraded sent by the user terminal is acquired through a network. Specifically, the user can send the BIOS firmware to be upgraded and the signature to the BMC through the network, the BMC checks the signature, the signature enters the subsequent steps, the BIOS is upgraded by using the acquired BIOS firmware to be upgraded, and otherwise, the BIOS firmware to be upgraded is not used for upgrading.
Step S12: the old variables and the old variable structure are obtained from the old NVRAM firmware volume and the old user firmware volume, respectively, of the old BIOS firmware.
Step S13: acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI (Unified Extensible Firmware Interface) variables related to BIOS setting.
And the old variable structure body and the new variable structure body both comprise member variable IDs and member variable data types, and the member variable IDs are corresponding variable names.
That is, in this embodiment, the old variable and the new variable are UEFI variables, each UEFI variable is represented by a structure and includes a plurality of member variables, and each member variable corresponds to one option. That is, each UEFI variable stores a plurality of member variables, and each member variable corresponds to one option of the BIOS setup page.
Note that readability is good using the variable name as the member variable ID. For important options, the member variable ID needs to be kept unchanged and compatible, the server is ensured to be compatible across generations, and a script set by a user for modifying the BIOS can be used without modification.
In a specific embodiment, in a BIOS Firmware compiling stage, a client Firmware Volume is generated in a BIOS Flash (Flash memory) and is used to store a structural body for setting a UEFI variable related to the BIOS, as shown in the following example, where the structural body of one UEFI variable is an example in the BIOS Flash, the structural body is composed of a member variable ID and a member variable data type, and a first member variable data type is as follows: UINT8, member variable ID: numlock.
Figure BDA0003039734980000061
In particular embodiments, the old NVRAM firmware volume and the old user firmware volume are looked up according to their globally unique identifiers.
That is, in the embodiment of the present application, FV is searched according to a GUID (global Unique Identifier) of FV (Firmware Volume), the GUID of each FV in BIOS Flash is Unique, FV is searched through the GUID instead of fixed address, and FV searching through fixed address is avoided because FV base address changes are caused by Flash Layout change, which leads to FV searching failure.
The FV is an area in the BIOS Flash, one Flahs is composed of a plurality of Firmware volumes, and one Firmware Volume is composed of a plurality of Firmware files.
Step S14: and creating a new variable corresponding to the new variable structure body based on the old variable structure body, the old variable and the new variable structure body, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded.
In a specific implementation manner, the old variable structure may be used to analyze the old variable to obtain a value of each old member variable; and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
Specifically, the default value of each old member variable is obtained from the old NVRAM firmware volume, and the default value of each variable of the BIOS firmware to be upgraded is obtained from the new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, and if the values of the old member variables are not consistent with the default values of the old member variables, creating a new variable corresponding to the new variable structure by using the values of the old member variables and the new variable structure; and if so, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
In addition, for the variable corresponding to the newly added option of the BIOS firmware to be upgraded, when the new variable is generated, the default value of the variable corresponding to the newly added option is adopted, and for the variable corresponding to the deletion option of the BIOS firmware to be upgraded, when the new variable is generated, the corresponding variable is discarded.
That is, the new BIOS adds options: the new settings are kept unchanged. New BIOS drop option: the old BIOS settings are discarded. The old BIOS settings are different from the old BIOS defaults: the setting value of the old BIOS is changed, and the new BIOS adopts the setting value of the old BIOS. The old BIOS settings are the same as the old BIOS defaults: the setting value of the old BIOS is not changed, and the new BIOS adopts the default value of the new BIOS. Of course, the default value of the old BIOS may also be selected according to the policy.
It should be noted that after the BIOS is compiled, a variable stdfault is generated to store Default values of the Uefi variables. The StdDefault value exists at the beginning of NVRAM, and the next position is full FF. StdDefault also has a copy of the same in Boot Block FV (Boot Block firmware volume). The Default value for each variable may be obtained by parsing the StdDefault variable in the FV.
In addition, for the problem of option renaming or the problem of the same name of different options of new and old variables, a variable structure naming rule can be specified, the member variable naming of the structure is not allowed to be changed, (the replacement position can be added or deleted), and the new and old BIOS structure variables are compared before the BIOS is sent, so that the condition is ensured not to occur, and the design complexity is reduced.
That is, in the embodiment of the present application, the BIOS update retention configuration is updated, and the BIOS update retention configuration invariance policy can reduce the probability of the BIOS firmware update failure, thereby improving the stability of the server.
Step S15: and upgrading the BIOS by using the BIOS firmware to be upgraded.
That is, in the embodiment of the present application, when the BIOS firmware is upgraded, the BMC first finds the NVRAM FV (NVRAM firmware volume) and the Customer FV (NVRAM firmware volume) of the old BIOS and the NVRAM FV and the Customer FV of the new BIOS, and parses the old variable, the old variable structure, and the new variable structure from the NVRAM FV and the Customer FV. A new variable is created based on this information and written into NVRAM FV of the new BIOS.
In a specific embodiment, the NVRAM FV is found from Flash according to the GUID of the NVRAM FV, the FV is analyzed, each Setup variable, that is, the UEFI variable, the Customer FV is found from Flash according to the GUID of the Customer FV, the FV is analyzed, the structure body of each Setup variable is found, the Setup variable is analyzed according to the structure body of the variable, and the value of each member variable is obtained.
For example, referring to fig. 2, fig. 2 is a flowchart of a specific method for upgrading a BIOS out of band according to an embodiment of the present disclosure.
As can be seen, in the embodiment of the present application, the BIOS firmware to be upgraded is acquired through a network, then the old variable and the old variable structure are respectively acquired from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, and the new variable structure is acquired from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting, then new variables corresponding to the new variable structure body are created based on the old variable structure body, the old variables and the new variable structure body, the new variables are written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then the BIOS is upgraded by using the BIOS firmware to be upgraded. The setting of the old BIOS firmware is reserved through the NVRAM firmware volume of the new BIOS firmware and the NVRAM firmware volume of the old BIOS firmware, BIOS out-of-band upgrading is completely realized through the BMC, the defects that a traditional out-of-band scheme needs one additional restart, generation, long time consumption for exchanging and synchronizing setting files, long downtime and influence on system availability and serviceability are overcome, the BIOS of a server in operation is upgraded, the BIOS can take effect after the firmware is upgraded and restarted once, service is continuously provided for a user, the downtime is short, the time overhead of BIOS upgrading can be reduced, and therefore user experience is improved.
Referring to fig. 3, fig. 3 is a flow chart illustrating a BIOS setting modification disclosed in the present application.
Step S21: and acquiring a BIOS setting modification request sent by a user terminal.
Step S22: and responding to the BIOS setting modification request, and returning the ID of the quantity to be modified and the variable settable range to the user terminal.
In a specific implementation manner, the user terminal determines the variable value to be modified by using the variable settable range, and sends the ID of the variable to be modified and the variable value to be modified to the baseboard management controller.
Step S23: and acquiring the ID of the quantity to be modified and the variable value to be modified sent by the user terminal.
Step S24: and updating the corresponding variable in the new NVRAM firmware volume by using the new variable structure body of the current BIOS and the variable value to be modified.
That is, when the user modifies the option, the member variable values of the corresponding variables in the NVRAM firmware volume are updated.
That is, before the user modifies the variable, the variable ID and the variable settable range are read, then the variable settable range is used to determine the modified value, and then the variable ID and the modified value are sent to the BMC, thereby completing the out-of-band modification of the BIOS setting. The method can cope with the MapID change, wherein the MapID is the Id of the option, the uniqueness is ensured, and the option name can be used as the MapID.
In the implementation mode, a user sends the ID of the to-be-modified quantity to be modified and the value of the to-be-modified quantity to the BMC in a Json file manner or through IPMI, the BMC receives the ID of the to-be-modified quantity and the value of the to-be-modified quantity, searches the Customer FV of the BIOS to obtain a corresponding variable structure, and updates a corresponding variable in the NVRAM firmware volume based on the variable structure and the value of the to-be-modified quantity. For example, tpmEnable is sent, a new variable value corresponding to Enable is calculated to be 01, and the new variable value is written into a corresponding variable in the NVRAM FV.
It should be noted that, in the existing scheme for modifying the BIOS setting out of band, the option to be modified is usually sent to the BMC through IPMI or Redfish, and after the system is turned on, the BIOS reads the BIOS setting file to be modified through IPMI or Redfish, parses the setting file, writes the setting into the NVRAM of the BIOS, and restarts the BIOS to take effect. The disadvantages are that: the time for the BIOS to read the setting file from the BMC is long; the time consumed by the BIOS to analyze the setting file and write the BIOS setting into the NVRAM of the BIOS is long; and the restart is effective after the setting is finished, and the time consumption of the restart process is long. Resulting in a long Down Time that severely impacts the availability and serviceability of the server. The embodiment of the present application realizes the out-of-band modification of the BIOS setting by the BMC, and overcomes the above problems.
Therefore, the method and the device have the advantages that the BMC realizes the out-of-band BIOS setting modification and BIOS firmware upgrading, because the out-of-band mode is used, communication can be realized by utilizing industry standards such as Redfish or IPMI which are widely and mature in application, the universality and the adaptability are good, the maintenance is easy, and the management and the maintenance of an administrator are convenient. The method has the advantages that the universality and the manageability are good, simultaneously, tasks of modifying the BIOS setting and upgrading the BIOS firmware are completed by the BMC, the limitation and limitation of modifying and upgrading the BIOS are avoided, the BIOS is modified and the BIOS firmware is upgraded, the BIOS firmware is effective after one-time restart, the Downtime is shorter, the usability and the serviceability of the server are improved, and the user experience and the product competitiveness are improved. The method overcomes the defects that the common out-of-band scheme needs one additional restart, and has long time consumption for generating, exchanging and synchronously setting files, long download and influence on the availability and serviceability of the system. And overcomes the defects of poor manageability, poor adaptability, more self-updating restrictions, high maintenance cost and the like of the in-band scheme.
Referring to fig. 4, an embodiment of the present application discloses an out-of-band BIOS upgrading device, which is applied to a baseboard management controller, and includes:
a to-be-upgraded BIOS firmware acquisition module 11, configured to acquire a to-be-upgraded BIOS firmware via a network;
an old variable and structure acquisition module 12, configured to acquire an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware, respectively;
a new variable structure acquiring module 13, configured to acquire a new variable structure from a new user firmware volume of the BIOS firmware to be updated; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting;
a new variable determining module 14, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be updated;
and the BIOS upgrading module 15 is configured to upgrade the BIOS by using the BIOS firmware to be upgraded.
As can be seen, in the embodiment of the present application, the BIOS firmware to be upgraded is acquired through a network, then the old variable and the old variable structure are respectively acquired from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, and the new variable structure is acquired from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting, then new variables corresponding to the new variable structure body are created based on the old variable structure body, the old variables and the new variable structure body, the new variables are written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then the BIOS is upgraded by using the BIOS firmware to be upgraded. The setting of the old BIOS firmware is reserved through the NVRAM firmware volume of the new BIOS firmware and the NVRAM firmware volume of the old BIOS firmware, BIOS out-of-band upgrading is completely realized through the BMC, the defects that a traditional out-of-band scheme needs one additional restart, generation, long time consumption for exchanging and synchronizing setting files, long downtime and influence on system availability and serviceability are overcome, the BIOS of a server in operation is upgraded, the BIOS can take effect after the firmware is upgraded and restarted once, service is continuously provided for a user, the downtime is short, the time overhead of BIOS upgrading can be reduced, and therefore user experience is improved.
Wherein the apparatus further comprises a firmware volume lookup module to lookup the old NVRAM firmware volume and the old user firmware volume according to their globally unique identifiers.
The new variable determination module 14 specifically includes:
an old member variable value acquisition submodule for analyzing the old variable by using the old variable structure to obtain a value of each old member variable;
and the new variable creating submodule is used for creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
Wherein the new variable creation submodule is specifically configured to:
acquiring a default value of each old member variable from the old NVRAM firmware volume, and acquiring a default value of each variable of the BIOS firmware to be upgraded from the new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, and if the values of the old member variables are not consistent with the default values of the old member variables, creating a new variable corresponding to the new variable structure by using the values of the old member variables and the new variable structure; and if so, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
The old variable structure body and the new variable structure body both comprise member variable IDs and member variable data types, and the member variable IDs are corresponding variable names.
The device further comprises:
the modification value acquisition module is used for acquiring the ID of the quantity to be modified and the variable value to be modified, which are sent by the user terminal;
and the variable updating module is used for updating the corresponding variable in the new NVRAM firmware volume by using the new variable structure body of the current BIOS and the variable value to be modified.
The device further comprises:
a modification request acquisition module for acquiring a BIOS setting modification request sent by a user terminal;
and the data return module is used for responding to the BIOS setting modification request, returning the ID of the variable to be modified and the variable settable range to the user terminal so that the user terminal can determine the variable value to be modified by utilizing the variable settable range and send the ID of the variable to be modified and the variable value to be modified to the substrate management controller.
Referring to fig. 5, an embodiment of the present application discloses an electronic device, which includes a processor 21 and a memory 22; wherein, the memory 22 is used for saving computer programs; the processor 21 is configured to execute the computer program to implement the method for upgrading the BIOS out of band disclosed in the foregoing embodiments.
For the specific process of the method for upgrading the BIOS out of band, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method for upgrading the BIOS out of band disclosed in the foregoing embodiment.
For the specific process of the method for upgrading the BIOS out of band, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, the apparatus, the device and the medium for upgrading the BIOS in the out-of-band system provided by the present application are introduced in detail, and a specific example is applied in the detailed description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for upgrading BIOS outside the band is applied to a baseboard management controller, and comprises the following steps:
acquiring BIOS firmware to be upgraded through a network;
respectively acquiring an old variable and an old variable structure body from an old NVRAM firmware volume and an old user firmware volume of old BIOS firmware;
acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting;
creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
and upgrading the BIOS by using the BIOS firmware to be upgraded.
2. The method of out-of-band upgrading a BIOS of claim 1, further comprising, before obtaining the old variables and the old variable constructs from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, respectively:
the old NVRAM firmware volume and the old user firmware volume are looked up according to their globally unique identifiers.
3. The method of out-of-band upgrading a BIOS of claim 1, wherein the creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure comprises:
analyzing the old variable by using the old variable structure to obtain the value of each old member variable;
and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
4. The method of out-of-band upgrading the BIOS of claim 3, wherein the creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each of the old member variables comprises:
acquiring a default value of each old member variable from the old NVRAM firmware volume, and acquiring a default value of each variable of the BIOS firmware to be upgraded from the new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, and if the values of the old member variables are not consistent with the default values of the old member variables, creating a new variable corresponding to the new variable structure by using the values of the old member variables and the new variable structure; and if so, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
5. The method of out-of-band upgrading of a BIOS of claim 1, wherein the old variable structure and the new variable structure each comprise a member variable ID and a member variable data type, and wherein the member variable ID is a corresponding variable name.
6. The method of out-of-band upgrading the BIOS of any of claims 1 to 5, further comprising, after the BIOS upgrading with the BIOS firmware to be upgraded:
acquiring an ID (identity) of a quantity to be modified and a variable value to be modified, which are sent by a user terminal;
and updating the corresponding variable in the new NVRAM firmware volume by using the new variable structure body of the current BIOS and the variable value to be modified.
7. The method for upgrading the BIOS out of band according to claim 6, wherein before obtaining the variable ID and the variable value to be modified sent by the user terminal, the method further comprises:
acquiring a BIOS setting modification request sent by a user terminal;
and responding to the BIOS setting modification request, returning the ID of the variable to be modified and the variable settable range to the user terminal, so that the user terminal determines the variable value to be modified by using the variable settable range and sends the ID of the variable to be modified and the variable value to be modified to a substrate management controller.
8. The utility model provides a device of BIOS is upgraded to the outband, its characterized in that is applied to the base plate management controller, includes:
the BIOS firmware acquisition module to be upgraded is used for acquiring the BIOS firmware to be upgraded through a network;
an old variable and structure acquisition module, configured to acquire an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware, respectively;
the new variable structure acquisition module is used for acquiring a new variable structure from a new user firmware volume of the BIOS firmware to be upgraded; the old variable structure body and the new variable structure body are both structure bodies of UEFI variables related to BIOS setting;
a new variable determining module, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be updated;
and the BIOS upgrading module is used for upgrading the BIOS by using the BIOS firmware to be upgraded.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of out-of-band upgrading a BIOS as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements a method of upgrading a BIOS out of band as claimed in any one of claims 1 to 7.
CN202110453715.2A 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band Active CN113064625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110453715.2A CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110453715.2A CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Publications (2)

Publication Number Publication Date
CN113064625A true CN113064625A (en) 2021-07-02
CN113064625B CN113064625B (en) 2024-02-09

Family

ID=76567433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110453715.2A Active CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Country Status (1)

Country Link
CN (1) CN113064625B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961260A (en) * 2021-12-21 2022-01-21 比亚迪股份有限公司 System control software operation method, system, computer device and storage medium
CN114168169A (en) * 2021-10-29 2022-03-11 浪潮(北京)电子信息产业有限公司 Microcode updating method, device, equipment and storage medium
US11934838B2 (en) 2022-02-09 2024-03-19 Quanta Computer Inc. Storing EFI variables in a BMC using an API

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270626A (en) * 2018-02-01 2018-07-10 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the readable storage medium storing program for executing of upgrade server firmware
CN110795119A (en) * 2019-09-19 2020-02-14 平安科技(深圳)有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN111176703A (en) * 2019-12-27 2020-05-19 山东英信计算机技术有限公司 In-band firmware upgrading method and device, computer system and storage medium
CN111176686B (en) * 2019-12-29 2022-03-22 山东英信计算机技术有限公司 BIOS upgrading method and system, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168169A (en) * 2021-10-29 2022-03-11 浪潮(北京)电子信息产业有限公司 Microcode updating method, device, equipment and storage medium
CN113961260A (en) * 2021-12-21 2022-01-21 比亚迪股份有限公司 System control software operation method, system, computer device and storage medium
CN113961260B (en) * 2021-12-21 2022-04-15 比亚迪股份有限公司 System control software operation method, system, computer device and storage medium
US11934838B2 (en) 2022-02-09 2024-03-19 Quanta Computer Inc. Storing EFI variables in a BMC using an API

Also Published As

Publication number Publication date
CN113064625B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN113064625A (en) Method, device, equipment and medium for upgrading BIOS outside band
US8601466B2 (en) Software deployment method and system, software deployment server and user server
WO2018157570A1 (en) Method for upgrading software of pos terminal, pos terminal, and storage medium
WO2013078951A1 (en) Method and system for upgrading software
CN107608681A (en) Installation method of operating system, device and server
CN109828774B (en) Server system and starting method thereof
CN104468811B (en) Upgrade method and device
CN113434202A (en) Starting method and device of equipment, electronic equipment and computer storage medium
CN104407890A (en) Method for starting Android system from OTG (On-The-Go) equipment
CN112445495A (en) Mirroring and recovery method for high-performance computing cluster nodes
WO2016155455A1 (en) Method and device for upgrading terminal data
CN111736876A (en) Client update control method, device, storage medium and server
CN113535262B (en) Proxy node start control method, device, equipment and storage medium
CN111124437A (en) Bare computer resource configuration information acquisition method, system and equipment based on OpenStack
CN114115917A (en) Operating system installation method and device
CN113672263A (en) Firmware parameter update control method and device and electronic equipment
CN106484442B (en) Server system and method for updating startup mapping file
CN114281890B (en) BIOS out-of-band management system and method
CN113590033B (en) Information synchronization method and device of super fusion system
CN109101278B (en) Method and device for realizing terminal flashing
CN114817313A (en) Method, system, equipment and medium for storing FRU data by firmware
CN113064698A (en) Method for providing product environment and corresponding device, system, equipment and medium
CN113438095A (en) Method, device and equipment for managing configuration data and storage medium
CN111949278B (en) Method, system, terminal and storage medium for automatically installing MCS system
CN113687864B (en) Method for recovering configuration parameters of basic input/output system and server system

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