CN112463186A - Method and device for refreshing BIOS, electronic equipment and storage medium - Google Patents

Method and device for refreshing BIOS, electronic equipment and storage medium Download PDF

Info

Publication number
CN112463186A
CN112463186A CN202011270770.XA CN202011270770A CN112463186A CN 112463186 A CN112463186 A CN 112463186A CN 202011270770 A CN202011270770 A CN 202011270770A CN 112463186 A CN112463186 A CN 112463186A
Authority
CN
China
Prior art keywords
bios
server
refreshed
mac address
refreshing
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.)
Withdrawn
Application number
CN202011270770.XA
Other languages
Chinese (zh)
Inventor
郑旭阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011270770.XA priority Critical patent/CN112463186A/en
Publication of CN112463186A publication Critical patent/CN112463186A/en
Withdrawn legal-status Critical Current

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for refreshing a BIOS, electronic equipment and a storage medium, belongs to the technical field of servers, and solves the technical problems that in the prior art, the refreshing of the BIOS requires that a server host needs to be returned to a manufacturer, the single refreshing efficiency is too low, and extra cost is caused. The method comprises the following steps: acquiring a Mac address of a server of a BIOS to be refreshed; searching the current BMC _ IP allocated to the Mac address according to the Mac address; replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP; and performing BIOS refreshing on the server of the BIOS to be refreshed according to the configuration file.

Description

Method and device for refreshing BIOS, electronic equipment and storage medium
Technical Field
The present invention relates to the technical field of servers, and in particular, to a method and an apparatus for refreshing a BIOS, an electronic device, and a storage medium.
Background
As the scale of enterprises and customers continues to increase, enterprise orders present a well blowout situation. The configuration of the machine is increasingly complex, and the software and hardware matched with the machine are increasingly diversified. Updates to server software versions, such as BMC, BIOS versions, etc., are also increasingly faster. However, the situation that the configuration server is not in the BIOS interface due to the fact that the configuration server is started up and is in a blank screen due to the fact that the software and the hardware are not harmonious in collocation sometimes occurs. If the phenomenon is caused by the fact that the BIOS version of the incoming material is too low or too high, the batch of main boards are returned to a supplier to refresh the BIOS version of the main boards, or a serial port jig is connected with the BIOS of the main board of the server to carry out upgrading and downgrading refreshing on the main boards. However, this method can only solve the problem of one machine at a time, and cannot meet the requirement of batch refreshing.
Disclosure of Invention
The invention aims to provide a method, a device, an electronic device and a storage medium for refreshing a BIOS, which solve the technical problem of low BIOS updating efficiency in the prior art.
In a first aspect, the present invention provides a method for refreshing a BIOS, comprising the steps of:
acquiring a Mac address of a server of a BIOS to be refreshed;
searching the current BMC _ IP allocated to the Mac address according to the Mac address;
replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP;
and performing BIOS refreshing on the server of the BIOS to be refreshed according to the configuration file.
Further, the step of obtaining the Mac address of the server of the BIOS to be refreshed specifically includes:
acquiring an original Mac address in a database;
converting letters of the original Mac address data into a lower case format;
and converting the Mac address containing the lowercase format letters into a Mac address format which can be identified by Linux.
Further, before the step of obtaining the server Mac address, the method further includes:
scanning the Mac address, the machine serial number and the order number of a server of a BIOS to be refreshed into a management system of a main server;
the management system saves the data to the database of the main server.
Further, the configuration file includes:
BMC _ IP, username, password.
Further, after the step of performing BIOS refresh on the server of the BIOS to be refreshed according to the configuration file, the method further includes:
outputting a program running log;
the running log comprises information whether the BIOS is successfully refreshed.
Further, the method for refreshing the BIOS further includes:
inquiring all machine serial numbers to which the order belongs according to the order number;
and establishing a server serial number set of the BIOS to be refreshed.
Further, after the step of performing BIOS refresh on the server to be refreshed according to the configuration file, the method further includes:
acquiring a server serial number set of a BIOS to be refreshed;
selecting the serial number of the server of the next BIOS to be refreshed;
and returning to the step of obtaining the original Mac address of the server.
In a second aspect, the present invention further provides an apparatus for refreshing a BIOS, including:
the acquisition module is used for acquiring the Mac address of the server of the BIOS to be refreshed;
the searching module is used for searching the current BMC-IP allocated to the Mac address according to the Mac address;
the replacing module is used for replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP;
and the refreshing module is used for refreshing the BIOS of the server of the BIOS to be refreshed according to the configuration file.
In a third aspect, the present invention further provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of any one of the above methods when executing the computer program.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to perform any of the methods described above.
According to the method for refreshing the BIOS, the Mac address of the server of the BIOS to be refreshed is obtained, the current BMC _ IP allocated to the server is searched according to the Mac address, the original BMC _ IP in the server configuration file of the BIOS to be refreshed is replaced by the current BMC _ IP to obtain the required configuration file, and finally the BIOS refreshing is carried out on the server of the BIOS to be refreshed according to the configuration file. The remote automatic refreshing of the server of the BIOS to be refreshed is completed through the main controller, and the remote BIOS refreshing of the server of the BIOS to be refreshed of all serial numbers under the same order number is completed by circulating the steps, so that the server works normally, the production efficiency is improved, and the extra cost consumption caused by refreshing the BIOS is reduced.
Accordingly, the device for refreshing the BIOS, the electronic device and the computer-readable storage medium provided by the embodiment of the invention also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for refreshing BIOS according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of a method for refreshing BIOS according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for refreshing BIOS according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. 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 invention.
The terms "comprising" and "having," and any variations thereof, as referred to in embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in fig. 1, an embodiment of the present invention provides a method for refreshing a BIOS, where the method includes the following steps:
s11: acquiring a Mac address of a server of a BIOS to be refreshed;
s12: searching the current BMC _ IP allocated to the Mac address according to the Mac address;
s13: replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP;
s14: and performing BIOS refreshing on the server of the BIOS to be refreshed according to the configuration file.
According to the method for refreshing the BIOS, the Mac address of the server of the BIOS to be refreshed is obtained, the current BMC _ IP allocated to the server is searched according to the Mac address, the original BMC _ IP in the server configuration file of the BIOS to be refreshed is replaced by the current BMC _ IP to obtain the required configuration file, and finally the BIOS refreshing is carried out on the server of the BIOS to be refreshed according to the configuration file. By completing the steps, the automatic refreshing of the server of the BIOS to be refreshed by the main server is completed, the labor cost is saved, the consumption of capital is reduced, and the influence caused by the fact that the server is too high in BIOS version or too low in BIOS version and cannot be used is avoided.
As shown in fig. 2, in a possible implementation manner, the step of obtaining the Mac address of the server of the BIOS to be refreshed specifically includes:
s211: acquiring an original Mac address in a database;
s212: converting letters of the original Mac address data into a lower case format;
s213: and converting the Mac address containing the lowercase format letters into a Mac address format which can be identified by Linux.
And converting the Mac address obtained by scanning to obtain the Mac address which can be identified by a subsequent process, and further running a subsequent program.
As shown in fig. 2, in a possible implementation, before the step of obtaining the server Mac address, the method further includes:
s201: scanning the Mac address, the machine serial number and the order number of a server of a BIOS to be refreshed into a management system of a main server;
s202: the management system saves the data to the database of the main server.
Data such as the Mac address are generally arranged at the rear part of a chassis of a server to be refreshed, the server cannot actively acquire information, manual scanning is needed, the information such as the Mac address is stored in a database, and a subsequent program can conveniently acquire the needed information from the database.
In one possible embodiment, the configuration file includes:
BMC _ IP, username, password.
The configuration file is used as a necessary file for refreshing the BIOS, wherein different information such as BMC-IP, user name, password and the like is contained, and the BIOS can be refreshed on the server only through the configuration file by related programs.
As shown in fig. 2, in a possible implementation manner, after the step of performing BIOS refresh on the server to be refreshed according to the configuration file, the method further includes:
s25: outputting a program running log;
the running log comprises information whether the BIOS is successfully refreshed.
After the program running log is output, the staff can check the running result through the log, and if the BIOS is successfully refreshed, the subsequent work is correspondingly carried out.
In one possible implementation, as shown in fig. 2, the method for refreshing the BIOS further includes:
s203: inquiring all machine serial numbers to which the order belongs according to the order number;
s204: and establishing a server serial number set of the BIOS to be refreshed.
And a data base is provided for the subsequent cycle refreshing step by establishing the serial number set.
As shown in fig. 2, in a possible implementation manner, after the step of performing BIOS refresh on the server to be refreshed according to the configuration file, the method further includes:
s26: acquiring a server serial number set of a BIOS to be refreshed;
s27: selecting the serial number of the server of the next BIOS to be refreshed;
s28: and returning to the step of obtaining the original Mac address of the server.
Through the steps, BIOS refreshing is carried out on the servers with all serial numbers placed in all orders, and the aim of refreshing the servers in batches is achieved.
The method for refreshing the BIOS provided by the embodiment of the invention has the following specific implementation mode:
the staff needs to input the Mac address, the serial number and the order number of the server of the BIOS to be refreshed into the main server management system in a scanning manner, and the information is used as a data basis for subsequently refreshing the BIOS and refreshing the BIOS in batches.
After the staff confirms that the information is correct, the management system is used for transmitting the information to the database, and the Mac addresses corresponding to the servers can be inquired through the database inquiry language.
The shell script is written to extract the queried Mac address (such as B4055D25D390), and the capital letters in the Mac address are converted into a lower-case format (such as B4055D25D 390).
And converting the obtained Mac address in the lowercase format into a recognizable Mac address format (such as b4:05:5d:25: d3:90) specified in the Linux system.
The current BMC _ IP allocated to it is found by matching.
And obtaining the current BMC-IP by using the sed statement, storing the current BMC-IP into the configuration file in the xml format of the server, and replacing the original BMC-IP.
The new configuration file obtained is the xml configuration file that the server can use to refresh the BIOS at present.
And refreshing the BIOS file needing to be updated in the JRE environment by using a Java tool, and refreshing the BIOS of the server of the BIOS to be refreshed.
After the refreshing is finished, a program running log is output, and a worker can judge whether the refreshing is successful or not through the log.
And obtaining the serial numbers of all the machines to which the order is placed through inquiry according to the order number, and establishing a BIOS server serial number set to be refreshed.
And circulating the step of refreshing the BIOS, and refreshing the BIOS of the machines with all serial numbers placed in the order.
And completing the batch refreshing of the servers of the BIOS to be refreshed through all the steps.
As shown in fig. 3, an embodiment of the present invention further provides an apparatus for refreshing a BIOS, including:
the system comprises an acquisition module 1, a refresh module and a refresh module, wherein the acquisition module is used for acquiring a Mac address of a server of the BIOS to be refreshed;
the searching module 2 is used for searching the current BMC _ IP allocated to the Mac address according to the Mac address;
the replacing module 3 is used for replacing the original BMC _ IP in the server configuration file of the BIOS to be refreshed with the current BMC _ IP;
and the refreshing module 4 is used for refreshing the BIOS of the server of the BIOS to be refreshed according to the configuration file.
Corresponding to the method, the invention further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program operable on the processor, and the processor implements the steps of any one of the methods when executing the computer program.
In accordance with the above method, embodiments of the present invention also provide a computer readable storage medium storing machine executable instructions, which when invoked and executed by a processor, cause the processor to perform the steps of the above method.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
For another example, the division of the unit is only one division of logical functions, and there may be other divisions in actual implementation, and for another example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; and the modifications, changes or substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for refreshing BIOS is applied to a main server, and comprises the following steps:
acquiring a Mac address of a server of a BIOS to be refreshed;
searching the current BMC _ IP allocated to the Mac address according to the Mac address;
replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP;
and performing BIOS refreshing on the server of the BIOS to be refreshed according to the configuration file.
2. The method for refreshing the BIOS of claim 1, wherein the step of obtaining the Mac address of the server of the BIOS to be refreshed specifically comprises:
acquiring an original Mac address in a database;
converting letters of the original Mac address data into a lower case format;
and converting the Mac address containing the lowercase format letters into a Mac address format which can be identified by Linux.
3. The method for refreshing the BIOS of claim 1, wherein the step of obtaining the server Mac address is preceded by the step of:
scanning the Mac address, the machine serial number and the order number of a server of a BIOS to be refreshed into a management system of a main server;
the management system saves the data to the database of the main server.
4. The method of refreshing BIOS of claim 1 wherein the configuration file includes:
BMC _ IP, username, password.
5. The method for refreshing the BIOS of claim 1, wherein after the step of performing the BIOS refresh on the server to be refreshed the BIOS according to the configuration file, the method further comprises:
outputting a program running log;
the running log comprises information whether the BIOS is successfully refreshed.
6. The method for refreshing a BIOS of claim 2, further comprising:
inquiring all machine serial numbers to which the order belongs according to the order number;
and establishing a server serial number set of the BIOS to be refreshed.
7. The method for refreshing the BIOS of claim 6, wherein after the step of performing the BIOS refresh on the server to be refreshed according to the configuration file, the method further comprises:
acquiring a server serial number set of a BIOS to be refreshed;
selecting the serial number of the server of the next BIOS to be refreshed;
and returning to the step of obtaining the server Mac address.
8. An apparatus for refreshing a BIOS, comprising:
the acquisition module is used for acquiring the Mac address of the server of the BIOS to be refreshed;
the searching module is used for searching the current BMC-IP allocated to the Mac address according to the Mac address;
the replacing module is used for replacing the original BMC-IP in the server configuration file of the BIOS to be refreshed with the current BMC-IP;
and the refreshing module is used for refreshing the BIOS of the server of the BIOS to be refreshed according to the configuration file.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 7.
CN202011270770.XA 2020-11-13 2020-11-13 Method and device for refreshing BIOS, electronic equipment and storage medium Withdrawn CN112463186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011270770.XA CN112463186A (en) 2020-11-13 2020-11-13 Method and device for refreshing BIOS, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011270770.XA CN112463186A (en) 2020-11-13 2020-11-13 Method and device for refreshing BIOS, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112463186A true CN112463186A (en) 2021-03-09

Family

ID=74836078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011270770.XA Withdrawn CN112463186A (en) 2020-11-13 2020-11-13 Method and device for refreshing BIOS, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112463186A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445865A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of BIOS option remote batch setting method, device, terminal and storage medium
CN111756574A (en) * 2020-06-19 2020-10-09 浪潮电子信息产业股份有限公司 Method and device for remotely updating firmware in batch mode and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445865A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of BIOS option remote batch setting method, device, terminal and storage medium
CN111756574A (en) * 2020-06-19 2020-10-09 浪潮电子信息产业股份有限公司 Method and device for remotely updating firmware in batch mode and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110795399B (en) Method, device and system for generating machine ID for application
CN108170453B (en) MIT system upgrading method, storage medium and terminal equipment
CN110990008B (en) Page updating method and device, storage medium and electronic equipment
CN107145455B (en) Method for updating SMBIOS static information of whole system
CN106843947B (en) Method and device for processing code defects
CN111124540A (en) Dynamic configuration method and service request forwarding method of service control system
CN110737458A (en) code updating method and related device
CN112947907B (en) Method for creating code branches
CN112463186A (en) Method and device for refreshing BIOS, electronic equipment and storage medium
CN112035129A (en) Method and device for driver installation and upgrade and computer equipment
CN111159028A (en) Webpage testing method and device
CN110764746A (en) Script generation method and device and computer readable storage medium
CN114721781A (en) Micro-service deployment method and device, computer equipment and storage medium
CN113010197B (en) Application silence upgrading method, system, terminal equipment and storage medium
CN114003661A (en) Offline data entry method and device, electronic equipment and storage medium
CN109144967B (en) Maintenance system and method for improving distributed computing system
CN109828752B (en) Project code automatic generation method, device, computer equipment and storage medium
CN112631931A (en) Version testing method and device, storage medium and electronic equipment
CN113064617B (en) Method, system and storage medium for updating SMBIOS information
CN112667538A (en) Method, system, equipment and medium for obtaining network card identification number
CN111949296A (en) Data updating method and device
CN112241141A (en) Hardware configuration method, system, device and medium of PLC control system
CN117472458B (en) System function optimal configuration method and device, electronic equipment and storage medium
CN117215666A (en) Configuration method, device and equipment for starting parameters
CN112035425B (en) Log storage method and device and computer 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210309

WW01 Invention patent application withdrawn after publication