CN113190256A - Upgrading method, device and equipment - Google Patents

Upgrading method, device and equipment Download PDF

Info

Publication number
CN113190256A
CN113190256A CN202110587131.4A CN202110587131A CN113190256A CN 113190256 A CN113190256 A CN 113190256A CN 202110587131 A CN202110587131 A CN 202110587131A CN 113190256 A CN113190256 A CN 113190256A
Authority
CN
China
Prior art keywords
bios
firmware version
storage medium
configuration information
storage space
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
CN202110587131.4A
Other languages
Chinese (zh)
Other versions
CN113190256B (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN202110587131.4A priority Critical patent/CN113190256B/en
Publication of CN113190256A publication Critical patent/CN113190256A/en
Application granted granted Critical
Publication of CN113190256B publication Critical patent/CN113190256B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration 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 embodiment of the application discloses an upgrading method, device and equipment. When the firmware version of the BIOS is upgraded from the first BIOS firmware version to the second BIOS firmware version, the version information of the second BIOS firmware version is stored to the specified storage medium, further, when the upgrading of the firmware version of the BIOS fails due to the fact that the server is down, the version information of the second BIOS firmware version stored in the first storage space can be read to conduct forced coverage upgrading on the BIOS, the BIOS configuration information of the first BIOS firmware version stored in the specified storage medium is used for upgrading the BIOS configuration information stored in the second storage medium which is originally used for storing the BIOS configuration information, and when the upgrading of the BIOS fails due to the fact that the server is down, the firmware version and the configuration information of the BIOS are forced to be upgraded, the upgrading instantaneity is improved, and the server disconnection time is shortened.

Description

Upgrading method, device and equipment
Technical Field
The present application relates to the field of computers, and in particular, to an upgrade method, apparatus, and device.
Background
When a server is down to cause a BIOS (Basic Input Output System) to fail to be updated, the BIOS that fails to be updated may cause a problem that the server cannot be powered on or repeatedly restarted. At this time, the BIOS needs to be upgraded by manually executing a forced coverage upgrade scheme, but the manual execution of the forced coverage upgrade scheme may cause that the upgrade is not immediate enough, and the configuration information of the BIOS needs to be manually reconfigured after the BIOS is successfully upgraded, and the manual configuration of the BIOS configuration information may consume a long time, resulting in a long time for disconnecting the server.
Disclosure of Invention
The application discloses an upgrading method, device and equipment, which are used for forcibly upgrading the firmware version and configuration information of a BIOS (basic input output System) when the BIOS upgrading failure caused by the crash of a server is detected, so that the disconnection time of the server is shortened.
According to a first aspect of embodiments of the present application, there is provided an upgrade method, which is applied to a server, and includes:
when the firmware version of the BIOS is upgraded from a first BIOS firmware version to a second BIOS firmware version, storing version information of the second BIOS firmware version to a first storage space in a specified storage medium, wherein the specified storage medium is selected from the storage medium which is not used for storing the firmware version information of the BIOS originally; the specified storage medium further comprises a second storage space, and the second storage space is used for storing the BIOS configuration information of the first BIOS firmware version;
when a server crash is detected in the process of upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, reading the version information of the second BIOS firmware version from the first storage space, upgrading the BIOS firmware version information existing in the first storage medium originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version according to a forced coverage upgrading mode, and upgrading the BIOS configuration information already stored in the second storage medium originally used for storing the BIOS configuration information to the BIOS configuration information of the first BIOS firmware version stored in the second storage space.
Optionally, the method further comprises:
when the server is restarted, comparing whether the firmware version of the BIOS acquired from the first storage medium through the BMC is consistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, and comparing whether the BIOS configuration information acquired from the second storage medium through the BMC is consistent with the BIOS configuration information stored in the second storage space;
when the firmware version of the BIOS acquired from the first storage medium is inconsistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, updating the BIOS firmware version information stored in the first storage space to the version information corresponding to the firmware version of the BIOS acquired from the first storage medium;
and when the BIOS configuration information acquired from the second storage medium is inconsistent with the BIOS configuration information stored in the second storage space, updating the BIOS configuration information stored in the second storage space into the BIOS configuration information acquired from the second storage medium.
Optionally, after upgrading the existing BIOS firmware version information in the first storage medium originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version in a manner of forced coverage upgrade, the method further includes:
storing the version information of the second BIOS firmware version to a third storage space in a specified storage medium; the third storage space is different from the first storage space.
Optionally, the designated storage medium is a NAND Flash hung under the BMC, and the NAND Flash is originally used for storing an operation log, a system log and an abnormal event of the server.
Optionally, before the upgrading method is executed, the method further includes:
and detecting whether the server enables the function for executing the upgrading method, and if so, executing according to the upgrading method.
According to a second aspect of the embodiments of the present application, there is provided an upgrade apparatus, which is applied to a server, including:
the firmware version information storage unit is used for storing the version information of the second BIOS firmware version into a first storage space in a specified storage medium when the firmware version of the BIOS is upgraded from a first BIOS firmware version to a second BIOS firmware version, and the specified storage medium is specified and selected from the storage medium which is not used for storing the firmware version information of the BIOS originally; the specified storage medium further comprises a second storage space, and the second storage space is used for storing the BIOS configuration information of the first BIOS firmware version;
the firmware version upgrading unit is used for reading the version information of the second BIOS firmware version from the first storage space when a server crash is detected in the process of upgrading the BIOS firmware version from the first BIOS firmware version to the second BIOS firmware version, upgrading the BIOS firmware version information existing in the first storage medium which is originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version according to a forced coverage upgrading mode, and upgrading the BIOS configuration information which is originally stored in the second storage medium which is used for storing the BIOS configuration information to the BIOS configuration information of the first BIOS firmware version stored in the second storage space.
Optionally, the apparatus further comprises:
the updating unit is used for comparing whether the firmware version of the BIOS acquired from the first storage medium through the BMC is consistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space or not and comparing whether the BIOS configuration information acquired from the second storage medium through the BMC is consistent with the BIOS configuration information stored in the second storage space or not when the server is restarted;
when the firmware version of the BIOS acquired from the first storage medium is inconsistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, updating the BIOS firmware version information stored in the first storage space to the version information corresponding to the firmware version of the BIOS acquired from the first storage medium;
and when the BIOS configuration information acquired from the second storage medium is inconsistent with the BIOS configuration information stored in the second storage space, updating the BIOS configuration information stored in the second storage space into the BIOS configuration information acquired from the second storage medium.
Optionally, after upgrading the existing BIOS firmware version information in the first storage medium, which is originally used for storing the BIOS firmware version information, to the version information of the second BIOS firmware version in a manner of forced coverage upgrade, the firmware version information storage unit is further configured to:
storing the version information of the second BIOS firmware version to a third storage space in a specified storage medium; the third storage space is different from the first storage space.
Optionally, the designated storage medium is a NAND Flash hung under the BMC, and the NAND Flash is originally used for storing an operation log, a system log and an abnormal event of the server.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus including: a processor and a memory;
the memory for storing machine executable instructions;
the processor is used for reading and executing the machine executable instructions stored in the memory so as to realize the upgrading method.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
according to the technical scheme, when the firmware version of the BIOS is upgraded from the first BIOS firmware version to the second BIOS firmware version, the version information of the second BIOS firmware version can be stored in the first storage space of the specified storage medium which is not used for storing the version information of the BIOS firmware version, and further when the firmware version of the BIOS fails to be upgraded due to the downtime of the server, the version information of the second BIOS firmware version can be read from the first storage space, the BIOS is forcibly upgraded by using the version information of the second BIOS firmware version, and the BIOS configuration information which is stored in the second storage medium which is used for storing the BIOS configuration information is upgraded by using the BIOS configuration information of the first BIOS firmware version stored in the second storage space of the specified storage medium, so that when the BIOS fails to be upgraded due to the downtime of the server, the firmware version and the configuration information of the BIOS are forcibly upgraded, and manual execution is not needed, so that the instantaneity of upgrading is improved, and the disconnection time of the server is shortened.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a flowchart of a method for implementing an upgrade provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of dividing storage space in a designated storage medium according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an apparatus for implementing upgrade provided by an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the technical solutions provided in the embodiments of the present application better understood and make the above objects, features and advantages of the embodiments of the present application more obvious and understandable, the following description is made on the related technologies related to the embodiments of the present application:
in the related art, the update of the BIOS in the server is implemented by a BMC (Baseboard Management Controller) that manages the server.
Wherein, the BMC provides three BIOS firmware version update schemes, including: configuring a reserved upgrading scheme, wherein BIOS configuration information configured on a server can be reserved during upgrading; a coverage configuration upgrading scheme, wherein BIOS configuration information is covered in the BIOS upgrading process, and the BIOS configuration information is reset to default configuration information; the forced coverage upgrading scheme is different from the coverage configuration upgrading scheme in flow, and is characterized in that updated BIOS firmware version information is directly written into the BIOS chip by the BMC, original BIOS firmware version information in the BIOS chip is covered, and BIOS configuration information is reset to be default configuration information. The BIOS firmware version information at least comprises a version number used for indicating the firmware version of the BIOS, BIOS firmware version contents corresponding to the version number and the like, and the forced coverage upgrading scheme in the contents can be used for forcibly upgrading the BIOS to enable the server to recover to be normal when the BIOS upgrading fails due to the fact that the server is down and the server cannot be started or is repeatedly restarted.
The technical solution in the embodiments of the present application is further described in detail below with reference to the accompanying drawings.
Before the method flow shown in fig. 1 is implemented, a specific storage medium needs to be determined from storage media that are not originally used for storing firmware version information of the BIOS, and a storage space of the specific storage medium needs to be divided.
As an embodiment, the present application embodiment may divide three spaces from a storage space of a designated storage medium, including: the BIOS firmware backup system comprises a main space for storing BIOS firmware version information, a backup space for storing backup BIOS firmware version information and a configuration information space for storing BIOS configuration information. The spare space is used for storing the backup BIOS firmware version information, and the spare space can be used for preventing the BIOS firmware version information of the main space from being damaged.
For example, the main space, the spare space and the configuration information space divided from the storage space of the specified storage medium can be referred to in fig. 2, for example, the storage space with address field of 0x000000000-x01FFFFFF in the storage space of the specified storage medium can be set as the main space for storing the BIOS firmware version information, which is 32MB in capacity space; setting the storage space with the address field of 0x02000000-0x02FFFFFF as a standby space for storing the BIOS firmware version information of the backup, wherein the storage space has 32MB capacity space; the storage space with the address field of 0x03000000-0x035FFFFF is set as the configuration information space for storing BIOS configuration information, which is 6MB in capacity space. The 32MB and 6MB set in the example are only for convenience of description, and the present application does not limit the size of the main space, the standby space, and the configuration information space, and the division may be performed according to the size of the firmware version information and the size of the configuration information as required in the specific division.
In this embodiment, after the main space, the standby space, and the configuration information space are partitioned from the storage space of the designated storage medium, when the BIOS normally performs firmware version upgrade, the main space, the standby space, and the configuration information space may be used to store BIOS firmware version information and BIOS configuration information used when the BIOS performs firmware version, in the following manner:
firstly, how to use the main space and the standby space to store the version information of the second BIOS firmware version used when the BIOS firmware version in the server is upgraded from the first BIOS firmware version to the second BIOS firmware version is introduced:
and when the version information of the second BIOS firmware version for upgrading the firmware version of the BIOS is acquired and the firmware version of the BIOS is upgraded by using the version information of the second BIOS firmware version, storing the version information of the second BIOS firmware version into a standby space divided from a specified storage medium.
And when the firmware version of the BIOS is successfully upgraded to a second BIOS firmware version, storing the version information of the second BIOS firmware version to a main space divided from the specified storage medium. For example, determining that the BIOS is successfully upgraded may be performed by detecting a number of rebooting times of the server, for example, when it is detected that the server is rebooted N times after the start of the upgrade, storing version information of a second BIOS firmware version used when upgrading the firmware version of the BIOS into a main space partitioned in a specified storage medium, where N represents a number of rebooting times required for the upgrade of the server, and N is greater than 0.
When the version information of the second BIOS firmware version is stored in the spare space, the previously stored BIOS firmware version information in the spare space can be covered, similarly, when the version information of the second BIOS firmware version is stored in the main space, the previously stored BIOS firmware version information in the main space can be covered, and when the next BIOS firmware version is updated and the version information of the next BIOS firmware version used for updating is stored, the version information of the second BIOS firmware version currently stored in the main space or the spare space is covered according to the above manner, so that it is ensured that enough space is always available in the main space and the spare space to store the BIOS firmware version information. It should be noted that this is only one embodiment of storing the BIOS firmware version information to a specific storage medium in the present application, and the present application is not limited thereto.
Through the above steps, in this embodiment, when the BIOS normally completes firmware version upgrade, the backup space and the main space divided in the storage medium are designated to store version information of the BIOS firmware version used for upgrading the firmware version of the BIOS.
How to save the BIOS configuration information using the configuration information space is described as follows:
it should be noted that, in the related art, the BIOS configuration information is originally stored in the CMOS chip, the BIOS reads the BIOS configuration information from the CMOS chip to implement operation, and the BIOS may boot operations such as power on and power off of the server by reading the BIOS configuration information.
Therefore, as an embodiment, when the firmware version of the BIOS is upgraded, the BMC may obtain the BIOS configuration information stored in the CMOS chip through an interface that is implemented based on a Redfish protocol (or an IPMI protocol or an SNMP protocol) and communicates with the CMOS chip, and store the obtained BIOS configuration information stored in the CMOS chip in the configuration information space.
Optionally, when it is detected that the BIOS configuration information stored in the CMOS is updated, the BMC is also triggered to acquire the updated BIOS configuration information stored in the CMOS through an interface, which is set in the BMC and communicates with the CMOS RAM chip, and store the updated BIOS configuration information in the configuration information space.
It should be noted here that the BIOS configuration information corresponding to different versions of BIOS may be the same or different, and when the updated BIOS configuration information is stored in the configuration information space, the BIOS configuration information stored in the configuration information space before may be covered by an overlay storage manner.
The following describes a flowchart of an upgrade method provided in an embodiment of the present application and shown in fig. 1. As an embodiment, the flow shown in fig. 1 may be applied to a server. The process may include the steps of:
step 101, when upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, storing version information of the second BIOS firmware version to a first storage space in a designated storage medium.
The specified storage medium in the embodiment of the application is selected from storage media which are not originally used for storing the firmware version information of the BIOS, and the specified storage medium at least further comprises a second storage space, wherein the second storage space is used for storing the BIOS configuration information of the first BIOS firmware version.
In a specific implementation, when the firmware version of the BIOS is upgraded from the first BIOS firmware version to the second BIOS firmware version, the firmware version information of the second BIOS firmware version needs to be acquired first, and the process of acquiring the version information of the second BIOS firmware version may refer to related technologies, for example, the version information of the second BIOS firmware version is uploaded by a user or downloaded by the BMC from a server storing the BMC firmware version, which is not described herein again.
And when the version information of the second BIOS firmware version is acquired and the first BIOS firmware version is updated, storing the version information of the second BIOS firmware version in a first storage space divided from a specified storage medium in the embodiment of the application.
As an embodiment, the first storage space in the specified storage medium in step 101 may be the spare space for storing the backup BIOS firmware version information, which is partitioned from the specified storage medium. Meanwhile, since the second storage space is used to store the BIOS configuration information of the first BIOS firmware version in step 101, the second storage space in this embodiment may be the above-mentioned configuration information space partitioned from the designated storage medium for storing the BIOS configuration information. For convenience of description, unless otherwise specified, the first storage space refers to a spare space for storing the backup BIOS firmware version, and the second storage space refers to a configuration information space for storing the BIOS configuration information.
For example, the storage medium specified in the embodiment of the present application may be a NAND Flash hung under the BMC. The NAND Flash is a storage space hung under the BMC, and the BMC records an operation log, a system log, and an occurred abnormal event of the server in the NAND Flash, but these contents only occupy a part of the space of the NAND Flash, and there is a relatively abundant unused space in the NAND Flash, so that the unused space of the NAND Flash may be divided in the embodiment of the present application. As for how to divide the NAND Flash, the scheme of dividing the main space, the spare space, and the configuration information space from the storage space of the specified storage medium can be referred to.
It should be noted that in the embodiment of the present application, other storage media may also be used as the designated storage medium, and the method is not limited to the NAND Flash hung under the BMC, for example, storage media such as an SD plug-in card and a hard disk hung under the BMC may also be selected as the designated storage medium, and specifically which part of the storage space hung under the BMC is selected as the designated storage medium may be set according to requirements.
Step 102, when a server crash is detected in the process of upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, reading the version information of the second BIOS firmware version from the first storage space, and upgrading the existing BIOS firmware version information in the first storage medium, which is originally used for storing the BIOS firmware version information, to the version information of the second BIOS firmware version in a forced coverage upgrading manner.
It should be noted that in the related art, version information of the BIOS firmware version is originally stored in a BIOS chip, and the BIOS chip includes multiple types in the related art (specific types may refer to the related art, which is not described herein, and the type of the BIOS chip is not limited in this application), and the BIOS chip in the current server is usually implemented by using a Flash ROM (Read Only Memory).
As an embodiment, when the BIOS chip in this embodiment is implemented by using a Flash ROM, the first storage medium originally used for storing the firmware version of the BIOS in step 102 may refer to a Flash ROM type BIOS chip.
For convenience of description, unless otherwise specified below, all references to the first storage medium refer to a Flash ROM (denoted as BIOS Flash ROM) for implementing a BIOS.
In the specific implementation of step 102, because the BMC is generally used for managing the server, the operation log, the system log, and the occurring abnormal events of the server may be recorded, for example, an unexpected power failure occurs during the firmware version upgrade process of the BIOS, or a server downtime caused by an artificial forced restart occurs during the firmware version upgrade process of the BIOS, which may be recorded in the log, and a BIOS upgrade failure may be caused by the downtime of the server during the upgrade process of the BIOS, which may cause the repeated restart or the failed start of the server, and at this time, the repeated restart or the failed start of the server may also be recorded in the log. Therefore, in the embodiment of the present application, the BMC may determine, through monitoring the log, whether a server is down in a process of upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, and whether the server is repeatedly restarted or cannot be started due to the BIOS that is failed to be upgraded after the server is down.
Further, when a server crash is detected in the process of upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, the embodiment of the present application may read the version information of the second BIOS firmware version from the spare space of the specified storage medium, and upgrade the existing BIOS firmware version information in the BIOS Flash ROM to the version information of the second BIOS firmware version in a manner of forced coverage upgrade. It should be noted that, at this time, the BIOS firmware version information existing in the BIOS Flash ROM is version information of the BIOS firmware version that fails to be upgraded.
Step 103, upgrading the BIOS configuration information that has been stored in the second storage medium that is originally used for storing the BIOS configuration information to the BIOS configuration information of the first BIOS firmware version that is stored in the second storage space.
As an embodiment, the second storage medium originally used for storing the BIOS configuration information in step 103 may be referred to as a CMOS chip, based on that the BIOS configuration information is originally stored in the CMOS chip in the related art. Therefore, for convenience of description, the second storage medium mentioned below refers to a CMOS chip unless otherwise specified, but the present application does not limit to which storage medium the second storage medium is specific.
In this embodiment of the application, after upgrading the existing BIOS firmware version information in the BIOS Flash ROM to the version information of the second BIOS firmware version in step 102 in a manner of forced coverage upgrade, a setting message in the BMC for indicating whether the firmware version of the BIOS completes the upgrade is updated to a value indicating that the firmware version of the BIOS completes the upgrade.
Further, when it is detected that the setting message is updated to a value indicating that the firmware version of the BIOS is updated, for example, the setting message is updated from 0 to 1 (where 0 is used to indicate that the firmware version of the BIOS is not updated and 1 is used to indicate that the firmware version of the BIOS is updated), when it is detected that the setting message is updated from 0 to 1, the BIOS configuration information stored in the CMOS is updated to the BIOS configuration information of the first BIOS firmware version stored in the configuration information space.
It should be noted that, since the BIOS is upgraded to the second BIOS firmware version in the step 102 according to the forced coverage upgrade manner, the BIOS configuration information stored in the CMOS is the default configuration information at this time.
For example, the BIOS configuration information stored in the CMOS is the default configuration information at this time because the BIOS firmware version already in the BIOS Flash ROM is upgraded to the second BIOS firmware version in the step 102 in a forced overlay upgrade manner, where the forced overlay upgrade process is as follows: and directly writing the version information of the second BIOS firmware version into a BIOS Flash ROM, covering the version information of the BIOS firmware version which fails to be upgraded in the BIOS Flash ROM, and simultaneously resetting the BIOS configuration information stored in the CMOS into default configuration information by using an empty configuration file, wherein the default configuration information is the BIOS configuration information set in the CMOS when the server leaves the factory.
Further, after the BIOS configuration information stored in the CMOS is upgraded to the BIOS configuration information of the first BIOS firmware version stored in the second storage space, the server automatically restarts to enable the BIOS configuration information of the first BIOS firmware version stored in the CMOS to take effect, generates a log file, records the operations and informs a client that the upgrading of the firmware version of the BIOS is completed.
It should be noted that, since the system where the BMC is located and the system of the server are independent from each other, whether the server is currently powered on does not affect the BMC to execute step 103.
Thus, the flow shown in fig. 1 is completed.
As can be seen from the process shown in fig. 1, when the firmware version of the BIOS is upgraded from the first BIOS firmware version to the second BIOS firmware version, the version information of the second BIOS firmware version is stored in the first storage space in the designated storage medium that is not originally used for storing the version information of the BIOS firmware version, and further when the firmware version of the BIOS fails to be upgraded due to a downtime of the server, the version information of the second BIOS firmware version may be read from the first storage space, the BIOS is forcibly upgraded by using the version information of the second BIOS firmware version, and the BIOS configuration information that has been stored in the second storage medium that is originally used for storing the BIOS configuration information is upgraded by using the BIOS configuration information of the first BIOS firmware version stored in the second storage space of the designated storage medium, so that when the BIOS fails to be upgraded due to a downtime of the server, the firmware version and the configuration information of the BIOS are forcibly upgraded, and manual execution is not needed, so that the instantaneity of upgrading is improved, and the disconnection time of the server is shortened.
In this embodiment of the present application, after successfully upgrading the existing BIOS firmware version information in the BIOS Flash ROM to the version information of the second BIOS firmware version in a manner of forced coverage upgrade, the version information of the second BIOS firmware version may be stored in a third storage space in a designated storage medium, where the third storage space is different from the first storage space, and the version information of the second BIOS firmware version stored in the third storage space may be used as the main firmware version information, and the version information of the second BIOS firmware version stored in the first storage space is used as the spare firmware version information.
As an embodiment, the third storage space in the specified storage medium may refer to the main space for storing the BIOS firmware version information partitioned from the specified storage medium, and determine whether the existing BIOS firmware version information in the BIOS Flash ROM is successfully upgraded to the version information of the second BIOS firmware version, and may determine whether the number of reboots of the server in the upgrading process reaches the number of reboots required for upgrading, where the specific determination process may refer to the process of storing the version information of the second BIOS firmware version in the main space.
It should be noted that, in order to make the application of the embodiment of the present application more flexible, a switch may be provided for determining whether to execute the function of the upgrade method shown in the embodiment of the present application, and before executing the upgrade method shown in the embodiment of the present application, it is required to detect whether the server enables (i.e., turns on the switch) the function for executing the upgrade method, and if so, the function is executed according to the upgrade method.
The above examples are merely for convenience of understanding, and the embodiments of the present application are not particularly limited.
In an embodiment of the present application, in order to prevent the BIOS firmware version information and the BIOS configuration information stored in the specified storage medium in the foregoing embodiments from being deleted by mistake or not updated in time, the embodiments of the present application may further include the following:
for convenience of description, unless otherwise specified, in this embodiment, the first storage medium refers to a BIOS Flash ROM, the second storage medium refers to a CMOS chip, the first storage space refers to the spare space divided from the specified storage medium, the second storage space refers to the configuration information space divided from the specified storage medium, and the third storage space refers to the main space divided from the specified storage medium:
as an embodiment, each time the server is restarted, the BMC may read a version number in the version information from version information of an existing BIOS firmware version in the BIOS Flash ROM to determine a firmware version of the BIOS in the BIOS Flash ROM, generate temporary firmware information including the BIOS firmware version, read existing BIOS configuration information from the CMOS and generate temporary BIOS configuration information, compare whether a firmware version corresponding to the BIOS firmware version information stored in a spare space divided in a designated storage medium is consistent with a firmware version of the BIOS in the temporary firmware information, and compare whether the BIOS configuration information stored in the configuration information space is consistent with the temporary BIOS configuration information.
When the firmware version corresponding to the stored BIOS firmware version information in the standby space is inconsistent with the firmware version of the BIOS contained in the temporary firmware information, updating the stored BIOS firmware version information in the standby space into version information corresponding to the firmware version of the BIOS contained in the temporary firmware information; and when the firmware version corresponding to the BIOS firmware version information stored in the standby space is consistent with the firmware version of the BIIOS contained in the temporary firmware information, directly deleting the temporary firmware information.
When the BIOS configuration information stored in the configuration information space is inconsistent with the temporary BIOS version information, updating the BIOS configuration information stored in the configuration information space into temporary configuration information; and when the BIOS configuration information stored in the configuration information space is consistent with the temporary BIOS version information, directly deleting the temporary BIOS version information.
The method provided by the embodiment of the application is described above. The following describes the apparatus provided in the embodiments of the present application:
referring to fig. 3, fig. 3 is a schematic diagram of an apparatus for implementing upgrade according to an embodiment of the present application, where the embodiment of the apparatus is applied to a server. The device includes:
a firmware version information storage unit 301, configured to, when the firmware version of the BIOS is upgraded from a first BIOS firmware version to a second BIOS firmware version, store version information of the second BIOS firmware version in a first storage space in a specified storage medium, where the specified storage medium is specified and selected from a storage medium that is not originally used for storing the firmware version information of the BIOS; the specified storage medium further comprises a second storage space for storing the BIOS configuration information of the first BIOS firmware version.
The firmware version upgrading unit 302 is configured to, when a server downtime is detected in a process of upgrading a firmware version of a BIOS from a first BIOS firmware version to a second BIOS firmware version, read version information of the second BIOS firmware version from the first storage space, upgrade, according to a forced coverage upgrading manner, BIOS firmware version information existing in a first storage medium that is originally used for storing the BIOS firmware version information to version information of the second BIOS firmware version, and upgrade, according to a forced coverage upgrading manner, BIOS configuration information that is already stored in a second storage medium that is originally used for storing BIOS configuration information to BIOS configuration information of the first BIOS firmware version stored in the second storage space.
Optionally, the apparatus further comprises:
the updating unit is used for comparing whether the firmware version of the BIOS acquired from the first storage medium through the BMC is consistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space or not and comparing whether the BIOS configuration information acquired from the second storage medium through the BMC is consistent with the BIOS configuration information stored in the second storage space or not when the server is restarted;
when the firmware version of the BIOS acquired from the first storage medium is inconsistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, updating the BIOS firmware version information stored in the first storage space to the version information corresponding to the firmware version of the BIOS acquired from the first storage medium;
and when the BIOS configuration information acquired from the second storage medium is inconsistent with the BIOS configuration information stored in the second storage space, updating the BIOS configuration information stored in the second storage space into the BIOS configuration information acquired from the second storage medium.
Optionally, after upgrading an existing BIOS firmware version in a first storage medium originally used for storing the BIOS firmware version to the second BIOS firmware version in a manner of forced override upgrade, the firmware version storage unit 301 is further configured to:
storing the second BIOS firmware version to a third storage space in a designated storage medium; the third storage space is different from the first storage space.
Optionally, the designated storage medium is a NAND Flash hung under the BMC, and the NAND Flash is originally used for storing an operation log, a system log and an abnormal event of the server.
Optionally, the apparatus further comprises:
and the upgrading method execution unit is used for detecting whether the server enables the function for executing the upgrading method, and if so, executing the upgrading method.
Thus, the structure of the embodiment of the apparatus shown in FIG. 3 is completed.
Correspondingly, an embodiment of the present application further provides a hardware structure diagram of an electronic device, and specifically, as shown in fig. 4, the electronic device may be a device implementing the upgrade method. As shown in fig. 4, the hardware structure includes: a processor and a memory.
Wherein the memory is to store machine executable instructions;
the processor is used for reading and executing the machine executable instructions stored in the memory so as to realize the corresponding upgrading method embodiment shown above.
For one embodiment, the memory may be any electronic, magnetic, optical, or other physical storage device that may contain or store information such as executable instructions, data, and the like. For example, the memory may be: volatile memory, non-volatile memory, or similar storage media. In particular, the Memory may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the electronic apparatus shown in fig. 4 is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. An upgrading method, applied to a server, includes:
when the firmware version of the BIOS is upgraded from a first BIOS firmware version to a second BIOS firmware version, storing version information of the second BIOS firmware version to a first storage space in a specified storage medium, wherein the specified storage medium is selected from the storage medium which is not used for storing the firmware version information of the BIOS originally; the specified storage medium further comprises a second storage space, and the second storage space is used for storing the BIOS configuration information of the first BIOS firmware version;
when a server crash is detected in the process of upgrading the firmware version of the BIOS from the first BIOS firmware version to the second BIOS firmware version, reading the version information of the second BIOS firmware version from the first storage space, upgrading the BIOS firmware version information existing in the first storage medium originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version according to a forced coverage upgrading mode, and upgrading the BIOS configuration information already stored in the second storage medium originally used for storing the BIOS configuration information to the BIOS configuration information of the first BIOS firmware version stored in the second storage space.
2. The method of claim 1, further comprising:
when the server is restarted, comparing whether the firmware version of the BIOS acquired from the first storage medium through the BMC is consistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, and comparing whether the BIOS configuration information acquired from the second storage medium through the BMC is consistent with the BIOS configuration information stored in the second storage space;
when the firmware version of the BIOS acquired from the first storage medium is inconsistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, updating the BIOS firmware version information stored in the first storage space to the version information corresponding to the firmware version of the BIOS acquired from the first storage medium;
and when the BIOS configuration information acquired from the second storage medium is inconsistent with the BIOS configuration information stored in the second storage space, updating the BIOS configuration information stored in the second storage space into the BIOS configuration information acquired from the second storage medium.
3. The method of claim 1, wherein after upgrading the BIOS firmware version information existing in the first storage medium originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version in a forced override upgrade manner, the method further comprises:
storing the version information of the second BIOS firmware version to a third storage space in a specified storage medium; the third storage space is different from the first storage space.
4. The method according to claim 1, wherein the specified storage medium is a NAND Flash hung under the BMC, and the NAND Flash is originally used for storing an operation log, a system log and an occurred abnormal event of the server.
5. The method of claim 1, prior to performing the upgrade method, further comprising:
and detecting whether the server enables the function for executing the upgrading method, and if so, executing according to the upgrading method.
6. An upgrading device, which is applied to a server, comprising:
the firmware version information storage unit is used for storing the version information of the second BIOS firmware version into a first storage space in a specified storage medium when the firmware version of the BIOS is upgraded from a first BIOS firmware version to a second BIOS firmware version, and the specified storage medium is specified and selected from the storage medium which is not used for storing the firmware version information of the BIOS originally; the specified storage medium further comprises a second storage space, and the second storage space is used for storing the BIOS configuration information of the first BIOS firmware version;
the firmware version upgrading unit is used for reading the version information of the second BIOS firmware version from the first storage space when a server crash is detected in the process of upgrading the BIOS firmware version from the first BIOS firmware version to the second BIOS firmware version, upgrading the BIOS firmware version information existing in the first storage medium which is originally used for storing the BIOS firmware version information to the version information of the second BIOS firmware version according to a forced coverage upgrading mode, and upgrading the BIOS configuration information which is originally stored in the second storage medium which is used for storing the BIOS configuration information to the BIOS configuration information of the first BIOS firmware version stored in the second storage space.
7. The apparatus of claim 6, further comprising:
the updating unit is used for comparing whether the firmware version of the BIOS acquired from the first storage medium through the BMC is consistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space or not and comparing whether the BIOS configuration information acquired from the second storage medium through the BMC is consistent with the BIOS configuration information stored in the second storage space or not when the server is restarted;
when the firmware version of the BIOS acquired from the first storage medium is inconsistent with the firmware version corresponding to the BIOS firmware version information stored in the first storage space, updating the BIOS firmware version information stored in the first storage space to the version information corresponding to the firmware version of the BIOS acquired from the first storage medium;
and when the BIOS configuration information acquired from the second storage medium is inconsistent with the BIOS configuration information stored in the second storage space, updating the BIOS configuration information stored in the second storage space into the BIOS configuration information acquired from the second storage medium.
8. The apparatus of claim 6, wherein after upgrading the BIOS firmware version information existing in the first storage medium for storing the BIOS firmware version information to the version information of the second BIOS firmware version in a forced override upgrade manner, the firmware version information storage unit is further configured to:
storing the version information of the second BIOS firmware version to a third storage space in a specified storage medium; the third storage space is different from the first storage space.
9. The apparatus according to claim 6, wherein the specified storage medium is a NAND Flash hung under the BMC, and the NAND Flash is originally used for storing an operation log, a system log and an occurred abnormal event of the server.
10. An electronic device, comprising: a processor and a memory;
the memory for storing machine executable instructions;
the processor is configured to read and execute the machine executable instructions stored by the memory to implement the method of any one of claims 1 to 5.
CN202110587131.4A 2021-05-27 2021-05-27 Upgrading method, device and equipment Active CN113190256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110587131.4A CN113190256B (en) 2021-05-27 2021-05-27 Upgrading method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110587131.4A CN113190256B (en) 2021-05-27 2021-05-27 Upgrading method, device and equipment

Publications (2)

Publication Number Publication Date
CN113190256A true CN113190256A (en) 2021-07-30
CN113190256B CN113190256B (en) 2023-03-28

Family

ID=76985502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110587131.4A Active CN113190256B (en) 2021-05-27 2021-05-27 Upgrading method, device and equipment

Country Status (1)

Country Link
CN (1) CN113190256B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080132A (en) * 2022-06-28 2022-09-20 西安易朴通讯技术有限公司 Information processing method, information processing apparatus, server, and storage medium
CN116185459A (en) * 2023-04-24 2023-05-30 苏州浪潮智能科技有限公司 Method, device, equipment and medium for starting firmware update

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2345959A1 (en) * 2010-01-15 2011-07-20 Fujitsu Limited An information processing device and a firmware updating method of the information processing device
WO2013103335A1 (en) * 2012-01-03 2013-07-11 Hewlett-Packard Development Company, L.P. Backing up firmware during initialization of device
CN104503798A (en) * 2014-12-29 2015-04-08 杭州华三通信技术有限公司 Method and device for configuring server
US20150149815A1 (en) * 2013-11-27 2015-05-28 American Megatrends, Inc. Bios failover update with service processor having direct serial peripheral interface (spi) access
CN104731675A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Intelligent redundancy backup method for BIOS in server system
CN105068827A (en) * 2015-07-24 2015-11-18 浪潮电子信息产业股份有限公司 Method for refreshing BIOS (Basic Input Output System) in Itanium platform operating system
CN105824648A (en) * 2016-04-19 2016-08-03 浪潮电子信息产业股份有限公司 Unattended BIOS (Basic Input/output System) configuration method
CN110119330A (en) * 2019-04-03 2019-08-13 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Method for automatically restoring BIOS file of cloud backup server BIOSROM
CN110389777A (en) * 2019-06-26 2019-10-29 苏州浪潮智能科技有限公司 A kind of edition upgrading verification method, system and the relevant apparatus of BIOS node
CN111176897A (en) * 2019-12-29 2020-05-19 苏州浪潮智能科技有限公司 Closed BIOS self-repairing method, system, terminal and storage medium
CN111831304A (en) * 2020-06-19 2020-10-27 新华三技术有限公司 Version upgrading method and device, electronic equipment and storage medium
CN112230962A (en) * 2020-10-28 2021-01-15 山东超越数控电子股份有限公司 BIOS configuration storage method and system for processor platform

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2345959A1 (en) * 2010-01-15 2011-07-20 Fujitsu Limited An information processing device and a firmware updating method of the information processing device
WO2013103335A1 (en) * 2012-01-03 2013-07-11 Hewlett-Packard Development Company, L.P. Backing up firmware during initialization of device
US20150149815A1 (en) * 2013-11-27 2015-05-28 American Megatrends, Inc. Bios failover update with service processor having direct serial peripheral interface (spi) access
CN104503798A (en) * 2014-12-29 2015-04-08 杭州华三通信技术有限公司 Method and device for configuring server
CN104731675A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Intelligent redundancy backup method for BIOS in server system
CN105068827A (en) * 2015-07-24 2015-11-18 浪潮电子信息产业股份有限公司 Method for refreshing BIOS (Basic Input Output System) in Itanium platform operating system
CN105824648A (en) * 2016-04-19 2016-08-03 浪潮电子信息产业股份有限公司 Unattended BIOS (Basic Input/output System) configuration method
CN110119330A (en) * 2019-04-03 2019-08-13 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Method for automatically restoring BIOS file of cloud backup server BIOSROM
CN110389777A (en) * 2019-06-26 2019-10-29 苏州浪潮智能科技有限公司 A kind of edition upgrading verification method, system and the relevant apparatus of BIOS node
CN111176897A (en) * 2019-12-29 2020-05-19 苏州浪潮智能科技有限公司 Closed BIOS self-repairing method, system, terminal and storage medium
CN111831304A (en) * 2020-06-19 2020-10-27 新华三技术有限公司 Version upgrading method and device, electronic equipment and storage medium
CN112230962A (en) * 2020-10-28 2021-01-15 山东超越数控电子股份有限公司 BIOS configuration storage method and system for processor platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080132A (en) * 2022-06-28 2022-09-20 西安易朴通讯技术有限公司 Information processing method, information processing apparatus, server, and storage medium
CN116185459A (en) * 2023-04-24 2023-05-30 苏州浪潮智能科技有限公司 Method, device, equipment and medium for starting firmware update

Also Published As

Publication number Publication date
CN113190256B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
TWI627527B (en) Method for recovering a baseboard management controller and baseboard management controller
JP4363676B2 (en) Computer system
US8341386B2 (en) Method for updating basic input/output system and method for repairing thereof
CN113190256B (en) Upgrading method, device and equipment
US8533450B2 (en) File update system and boot management system of mobile communication terminal, method of updating file in mobile communication terminal, and method of booting mobile communication terminal
CN104915226A (en) Network device software starting method, device and network device
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN109582332B (en) System upgrading method and device for Internet camera
CN111143132A (en) BIOS recovery method, device, equipment and readable storage medium
CN111552592A (en) Double-backup starting method and system
CN112612642A (en) Software starting and upgrading failure backspacing method and device and terminal equipment
CN113626262A (en) BMC recovery method, system, equipment and medium
JP6515462B2 (en) INFORMATION PROCESSING DEVICE, SETTING METHOD FOR INFORMATION PROCESSING DEVICE, AND SETTING PROGRAM
CN116383012B (en) Method and device for acquiring boot log and method for transmitting boot log
JP2003099146A (en) System for controlling start of computer system
JP2017078998A (en) Information processor, log management method, and computer program
US20080201572A1 (en) Method and system for uniformizing product data embedded in a computer platform
WO2023103755A1 (en) Terminal starting method, electronic device, and computer-readable storage medium
CN109086085A (en) A kind of os starting management method and device
CN114020308A (en) Camera equipment upgrading method, device, equipment and medium
CN110795155B (en) System starting method and device, electronic equipment and storage medium
JP2010198314A (en) Information management device
CN111427721A (en) Exception recovery method and device
CN116204353B (en) Recovery and restoration method, device and equipment of vehicle-mounted system and storage 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
GR01 Patent grant
GR01 Patent grant