CN113886218B - Method, device, equipment and readable medium for verifying BIOS refreshing - Google Patents
Method, device, equipment and readable medium for verifying BIOS refreshing Download PDFInfo
- Publication number
- CN113886218B CN113886218B CN202110999244.5A CN202110999244A CN113886218B CN 113886218 B CN113886218 B CN 113886218B CN 202110999244 A CN202110999244 A CN 202110999244A CN 113886218 B CN113886218 B CN 113886218B
- Authority
- CN
- China
- Prior art keywords
- testing machine
- state
- bios
- testing
- tool
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000012360 testing method Methods 0.000 claims abstract description 391
- 230000004044 response Effects 0.000 claims abstract description 59
- 238000012795 verification Methods 0.000 claims abstract description 10
- 238000004590 computer program Methods 0.000 claims description 11
- KKIMDKMETPPURN-UHFFFAOYSA-N 1-(3-(trifluoromethyl)phenyl)piperazine Chemical compound FC(F)(F)C1=CC=CC(N2CCNCC2)=C1 KKIMDKMETPPURN-UHFFFAOYSA-N 0.000 claims 10
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000011161 development Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012429 release testing Methods 0.000 description 1
- 230000007474 system interaction Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention provides a method, a device, equipment and a readable medium for verifying BIOS refreshing, wherein the method comprises the following steps: in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool; running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state; in response to the completion of restarting the tester, uploading the BIOS release package to a preset catalog and downloading the testing tool; in response to acquiring that the state of the testing machine is a first state, operating the testing tool to refresh the old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state; responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not; if the state is correct, the refreshing of the BIOS is exited. By using the scheme of the invention, the complete verification project of the BIOS can be automatically refreshed, and the labor cost is reduced.
Description
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for verifying BIOS refresh.
Background
The BIOS publisher must provide BIOS updating methods and necessary tools in various environments, and under the EFI Shell (new EFI (Extensible Firmware Interface, extensible firmware interface) interface, a command line interface for implementing user and system interaction) refresh is a solution for the situation that no operating system and BMC are available, and is a refresh method that the BIOS publisher must support.
Before the method and tool for refreshing BIOS under EFI Shell is released, the method and tool are fully verified. The current verification mode of refreshing BIOS under EFI Shell requires a series of manual operations such as manually preparing a U disk (formatted as a FAT file system), plugging the U disk, starting a machine, entering the EFI Shell, inputting a command to execute refreshing and the like.
Disclosure of Invention
Therefore, an object of the embodiments of the present invention is to provide a method, apparatus, device, and readable medium for verifying BIOS refreshing, by using the technical solution of the present invention, a complete verification project of BIOS can be automatically refreshed, which reduces labor cost, and is conducive to realizing automation of BIOS release test, and improving BIOS development efficiency.
Based on the above objects, an aspect of an embodiment of the present invention provides a method for verifying a BIOS refresh, comprising the steps of:
in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool;
running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state;
in response to the completion of restarting the tester, uploading the BIOS release package to a preset catalog and downloading the testing tool;
in response to acquiring that the state of the testing machine is a first state, operating the testing tool to refresh the old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state;
responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not;
and responding to the correct state of the running old version BIOS of the testing machine, and exiting the refreshing of the BIOS.
According to one embodiment of the present invention, in response to receiving an instruction to refresh the BIOS, uploading the BIOS release package into a preset directory and downloading the test tool comprises:
in response to receiving an instruction to refresh the BIOS, uploading the test tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP (Trivial File Transfer Protocol, simple File transfer protocol) directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing the PXE boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
According to one embodiment of the present invention, running a test tool to refresh a BIOS release package to be refreshed into a test machine and restarting the test machine after modifying the state of the test machine to a first state includes:
running a testing tool on a testing machine, and creating a Ramdisk (a disk image created in a memory) and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
According to one embodiment of the present invention, in response to acquiring the state of the tester as the first state, running the test tool to refresh the old version BIOS release packet into the tester and to restart the tester after modifying the state of the tester to the second state comprises:
in response to obtaining that the state of the testing machine is a first state, judging whether the state of the running new version BIOS of the testing machine is correct or not;
responding to the correct state of the BIOS of the new version of running of the testing machine, running a testing tool on the testing machine, and creating a Ramdisk and FAT file system in the memory of the testing machine;
the testing tool downloads the old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the old version BIOS release packet into the testing machine and modifying the state of the testing machine into the second state by startup.
According to one embodiment of the invention, the first state is a refresh successful state and the second state is a rollback successful state.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for verifying BIOS refresh, including:
the setting module is configured to respond to receiving an instruction for refreshing the BIOS, upload a BIOS release package to a preset catalog and download a testing tool;
the refreshing module is configured to run the testing tool to refresh the BIOS release package to be refreshed into the testing machine, and restart the testing machine after modifying the state of the testing machine into a first state;
the uploading module is configured to respond to the completion of restarting of the testing machine, upload the BIOS release package to a preset catalog and download the testing tool;
the verification module is configured to respond to the acquired state of the testing machine as a first state, run the testing tool to refresh the old version BIOS release package into the testing machine, and restart the testing machine after modifying the state of the testing machine into a second state;
the judging module is configured to respond to the completion of restarting the testing machine and acquire the state of the testing machine as a second state and judge whether the state of the running old version BIOS of the testing machine is correct or not;
and the exit module is configured to exit the refreshing of the BIOS in response to the correct state of the old version BIOS operated by the testing machine.
According to one embodiment of the invention, the setup module is further configured to:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing the PXE boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
According to one embodiment of the invention, the refresh module is further configured to:
running a testing tool on a testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: according to the method for verifying BIOS refreshing provided by the embodiment of the invention, the BIOS issuing package is uploaded to the preset catalogue and the testing tool is downloaded in response to receiving the instruction for refreshing the BIOS; running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state; in response to the completion of restarting the tester, uploading the BIOS release package to a preset catalog and downloading the testing tool; in response to acquiring that the state of the testing machine is a first state, operating the testing tool to refresh the old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state; responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not; in response to the fact that the state of the running old version BIOS of the testing machine is correct, the technical scheme of refreshing the BIOS is exited, the complete verification engineering of the BIOS can be automatically refreshed, labor cost is reduced, automation of BIOS release testing can be facilitated, and BIOS development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart diagram of a method of verifying BIOS refresh in accordance with one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for verifying BIOS refresh according to one embodiment of the invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, in a first aspect, an embodiment of a method for verifying a BIOS refresh is provided. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool.
Uploading the testing tool, the new version BIOS release package and the old version BIOS release package to a TFTP catalog of a server through a network. And sending an instruction to the BMC of the testing machine through an IPMI (Intelligent Platform Management Interface ) interface, executing PXE starting when the testing machine starts, providing a TFTP service address for the testing machine by the DHCP service of the server when the testing machine executes PXE starting, taking a testing tool path as a starting program, and downloading the testing tool from the address by the testing machine through a TFTP protocol.
S2, running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state.
When the test tool starts to run on the test machine, ramdisk is created in a memory and mounted, a FAT file system is created, the test tool downloads a new version BIOS release packet from the address through a TFTP protocol and stores the new version BIOS release packet into the Ramdisk, the test tool loads and runs the EFI Shell, the EFI Shell runs and then automatically traverses all FAT file systems, a start up. Nsh is searched in a root directory of the EFI Shell and executed, a start up. Nsh executes a refreshing BIOS instruction, the new version BIOS release packet is refreshed into the test machine, after the completion, the state of the test machine is modified into a refreshing success state, and then the test machine is restarted.
And S3, in response to the completion of restarting the testing machine, uploading the BIOS release package to a preset catalog and downloading the testing tool.
This process is the same as in step S1, and will not be described here again.
And S4, responding to the acquired state of the testing machine as the first state, operating the testing tool to refresh the old version BIOS release package into the testing machine, and restarting the testing machine after modifying the state of the testing machine into the second state.
The testing tool executes a preset checking action to judge whether the running state is correct or not, if the running state is correct, the testing tool is run, when the testing tool starts running on the testing machine, a Ramdisk is created in a memory and mounted, a FAT file system is created, the testing tool downloads an old version BIOS release packet from the address through a TFTP protocol and stores the old version BIOS release packet into the Ramdisk, the testing tool loads and runs an EFI Shell, all FAT file systems are automatically traversed after the EFI Shell runs, a start-up.nsh is searched and executed in a root directory, a start-up.nsh executes a back-off BIOS instruction, the old version BIOS is refreshed into the testing machine, and after the completion, the state of the testing machine is changed into a back-off success state, the testing machine is restarted.
And S5, responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the BIOS of the old version of the running of the testing machine is correct.
And the testing tool executes a preset checking action to judge whether the running state is the old version BIOS or not, if so, the running state is checked to be correct, and if the running state is correct, the program is successfully exited after refreshing.
S6, responding to the correct state of the running old version BIOS of the testing machine, and exiting the refreshing of the BIOS.
Each of the above processes stops and modifies the tester state to an error state and alerts the administrator if an error or timeout occurs.
By the technical scheme, the complete verification project of the BIOS can be automatically refreshed, the labor cost is reduced, automation of BIOS release test can be realized, and BIOS development efficiency is improved.
In a preferred embodiment of the present invention, in response to receiving an instruction to refresh the BIOS, uploading the BIOS issue package into a preset directory and downloading the test tool comprises:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing a PXE (preboot execute environment, pre-boot execution environment) boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
In a preferred embodiment of the present invention, restarting the testing machine after running the testing tool to refresh the BIOS release packet to be refreshed into the testing machine and modifying the state of the testing machine to the first state includes:
running a testing tool on a testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
In a preferred embodiment of the present invention, in response to acquiring that the state of the testing machine is the first state, running the testing tool to refresh the old version of the BIOS release packet into the testing machine and to restart the testing machine after modifying the state of the testing machine to the second state comprises:
in response to obtaining that the state of the testing machine is a first state, judging whether the state of the running new version BIOS of the testing machine is correct or not;
responding to the correct state of the BIOS of the new version of running of the testing machine, running a testing tool on the testing machine, and creating a Ramdisk and FAT file system in the memory of the testing machine;
the testing tool downloads the old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the old version BIOS release packet into the testing machine and modifying the state of the testing machine into the second state by startup.
In a preferred embodiment of the present invention, the first state is a refresh successful state and the second state is a rollback successful state.
By the technical scheme, the complete verification project of the BIOS can be automatically refreshed, the labor cost is reduced, automation of BIOS release test can be realized, and BIOS development efficiency is improved.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in mind, in a second aspect of the embodiments of the present invention, there is provided an apparatus for verifying BIOS refresh, as shown in FIG. 2, an apparatus 200 includes:
the setting module 201, the setting module 201 is configured to respond to receiving the instruction of refreshing BIOS, upload the BIOS release package to the preset catalog and download the testing tool;
the refreshing module 202, the refreshing module 202 is configured to run a testing tool to refresh the BIOS release package to be refreshed into the testing machine, and restart the testing machine after modifying the state of the testing machine into the first state;
the uploading module 203 is configured to upload the BIOS release package to a preset catalog and download the testing tool in response to the completion of restarting the testing machine;
the verification module 204 is configured to respond to the acquired state of the testing machine as the first state, run the testing tool to refresh the old version BIOS release packet into the testing machine, and restart the testing machine after modifying the state of the testing machine into the second state;
the judging module 205, the judging module 205 is configured to judge whether the state of the running old version BIOS of the testing machine is correct or not in response to the restarting of the testing machine is completed and the acquired state of the testing machine is the second state;
the exit module 206, the exit module 206 is configured to exit the refreshing of the BIOS in response to the state of the tester running the old version of BIOS being correct.
In a preferred embodiment of the invention, the setup module 201 is further configured to:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing the PXE boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
In a preferred embodiment of the invention, the refresh module is further configured to:
running a testing tool on a testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor performing the method of:
in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool;
running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state;
in response to the completion of restarting the tester, uploading the BIOS release package to a preset catalog and downloading the testing tool;
in response to acquiring that the state of the testing machine is a first state, operating the testing tool to refresh the old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state;
responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not;
and responding to the correct state of the running old version BIOS of the testing machine, and exiting the refreshing of the BIOS.
In a preferred embodiment of the present invention, in response to receiving an instruction to refresh the BIOS, uploading the BIOS issue package into a preset directory and downloading the test tool comprises:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing the PXE boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
In a preferred embodiment of the present invention, restarting the testing machine after running the testing tool to refresh the BIOS release packet to be refreshed into the testing machine and modifying the state of the testing machine to the first state includes:
running a testing tool on a testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
In a preferred embodiment of the present invention, in response to acquiring that the state of the testing machine is the first state, running the testing tool to refresh the old version of the BIOS release packet into the testing machine and to restart the testing machine after modifying the state of the testing machine to the second state comprises:
in response to obtaining that the state of the testing machine is a first state, judging whether the state of the running new version BIOS of the testing machine is correct or not;
responding to the correct state of the BIOS of the new version of running of the testing machine, running a testing tool on the testing machine, and creating a Ramdisk and FAT file system in the memory of the testing machine;
the testing tool downloads the old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the old version BIOS release packet into the testing machine and modifying the state of the testing machine into the second state by startup.
In a preferred embodiment of the present invention, the first state is a refresh successful state and the second state is a rollback successful state.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium S31 stores a computer program S32 that, when executed by a processor, performs the following method:
in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool;
running a testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state;
in response to the completion of restarting the tester, uploading the BIOS release package to a preset catalog and downloading the testing tool;
in response to acquiring that the state of the testing machine is a first state, operating the testing tool to refresh the old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state;
responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is a second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not;
and responding to the correct state of the running old version BIOS of the testing machine, and exiting the refreshing of the BIOS.
In a preferred embodiment of the present invention, in response to receiving an instruction to refresh the BIOS, uploading the BIOS issue package into a preset directory and downloading the test tool comprises:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of a TFTP directory to the tester in response to the tester executing the PXE boot;
the tester downloads the test tools based on the addresses of the TFTP directory.
In a preferred embodiment of the present invention, restarting the testing machine after running the testing tool to refresh the BIOS release packet to be refreshed into the testing machine and modifying the state of the testing machine to the first state includes:
running a testing tool on a testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the new version BIOS release package into the testing machine and modifying the state of the testing machine into the first state by the startup.
In a preferred embodiment of the present invention, in response to acquiring that the state of the testing machine is the first state, running the testing tool to refresh the old version of the BIOS release packet into the testing machine and to restart the testing machine after modifying the state of the testing machine to the second state comprises:
in response to obtaining that the state of the testing machine is a first state, judging whether the state of the running new version BIOS of the testing machine is correct or not;
responding to the correct state of the BIOS of the new version of running of the testing machine, running a testing tool on the testing machine, and creating a Ramdisk and FAT file system in the memory of the testing machine;
the testing tool downloads the old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs the EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in the root directory and executes the start.nsh;
and restarting the testing machine after refreshing the old version BIOS release packet into the testing machine and modifying the state of the testing machine into the second state by startup.
In a preferred embodiment of the present invention, the first state is a refresh successful state and the second state is a rollback successful state.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (5)
1. A method of verifying a BIOS refresh, comprising the steps of:
in response to receiving an instruction for refreshing the BIOS, uploading a BIOS release package to a preset catalog and downloading a testing tool;
running the testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a first state;
in response to the completion of restarting the testing machine, uploading a BIOS release packet to a preset catalog and downloading the testing tool;
in response to acquiring that the state of the testing machine is the first state, operating the testing tool to refresh an old version BIOS release packet into the testing machine, and restarting the testing machine after modifying the state of the testing machine into a second state;
responding to the completion of restarting the testing machine and obtaining that the state of the testing machine is the second state, and judging whether the state of the running old version BIOS of the testing machine is correct or not;
responding to the correct state of the running old version BIOS of the testing machine, and exiting the refreshing of the BIOS;
in response to receiving an instruction to refresh the BIOS, uploading the BIOS release package into a preset directory and downloading the test tool includes:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of the TFTP directory to the tester in response to the tester performing a PXE boot;
the testing machine downloads the testing tool based on the address of the TFTP directory;
running the testing tool to refresh the BIOS release packet to be refreshed into the testing machine and restarting the testing machine after modifying the state of the testing machine into the first state comprises the following steps:
running the testing tool on the testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs an EFI Shell, and the EFI Shell traverses all the FAT file systems and searches for start.nsh in a root directory and executes the start.nsh;
the startup. Nsh refreshes the new version BIOS release package into the testing machine, and restarts the testing machine after modifying the state of the testing machine into a first state;
in response to obtaining that the state of the testing machine is the first state, running the testing tool to refresh an old version BIOS release packet into the testing machine and to restart the testing machine after modifying the state of the testing machine to a second state comprises:
in response to obtaining that the state of the testing machine is the first state, judging whether the state of the testing machine running a new version BIOS is correct or not;
responding to the correct state of the new version BIOS of the running of the testing machine, running the testing tool on the testing machine, and creating a Ramdisk and a FAT file system in the memory of the testing machine;
the testing tool downloads an old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs an EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in a root directory and executes the start.nsh;
and refreshing the old version BIOS release packet into the testing machine by the startup. Nsh, and restarting the testing machine after modifying the state of the testing machine into a second state.
2. The method of claim 1, wherein the first state is a refresh successful state and the second state is a fallback successful state.
3. An apparatus for verifying a BIOS refresh, the apparatus comprising:
the setting module is configured to respond to receiving an instruction for refreshing the BIOS, upload a BIOS release package to a preset catalog and download a testing tool;
the refreshing module is configured to run the testing tool to refresh the BIOS release packet to be refreshed into the testing machine, and restart the testing machine after modifying the state of the testing machine into a first state;
the uploading module is configured to respond to the completion of restarting of the testing machine, upload the BIOS release package to a preset catalog and download the testing tool;
the verification module is configured to respond to the condition that the state of the testing machine is the first state, run the testing tool to refresh the old version BIOS release packet into the testing machine, and restart the testing machine after modifying the state of the testing machine into the second state;
the judging module is configured to judge whether the state of the BIOS of the old version of the running of the testing machine is correct or not in response to the completion of restarting the testing machine and the acquisition of the state of the testing machine as the second state;
the exit module is configured to exit the refreshing of the BIOS in response to the correct state of the old version BIOS operated by the testing machine;
the setup module is further configured to:
in response to receiving an instruction for refreshing the BIOS, uploading the testing tool, the new version BIOS release packet and the old version BIOS release packet to a TFTP directory through a network;
an instruction is sent to the BMC of the testing machine through the IPMI interface, so that the testing machine executes PXE starting;
providing an address of the TFTP directory to the tester in response to the tester performing a PXE boot;
the testing machine downloads the testing tool based on the address of the TFTP directory;
the refresh module is further configured to:
running the testing tool on the testing machine, and creating a Ramdisk and a FAT file system in a memory of the testing machine;
the testing tool downloads a new version BIOS release packet through the address of the TFTP directory and stores the new version BIOS release packet into the Ramdisk;
the testing tool loads and runs an EFI Shell, and the EFI Shell traverses all the FAT file systems and searches for start.nsh in a root directory and executes the start.nsh;
the startup. Nsh refreshes the new version BIOS release package into the testing machine, and restarts the testing machine after modifying the state of the testing machine into a first state;
the verification module is further configured to:
in response to obtaining that the state of the testing machine is the first state, judging whether the state of the testing machine running a new version BIOS is correct or not;
responding to the correct state of the new version BIOS of the running of the testing machine, running the testing tool on the testing machine, and creating a Ramdisk and a FAT file system in the memory of the testing machine;
the testing tool downloads an old version BIOS release packet through the address of the TFTP directory and stores the old version BIOS release packet into the Ramdisk;
the testing tool loads and runs an EFI Shell, and the EFI Shell traverses all FAT file systems and searches for start.nsh in a root directory and executes the start.nsh;
and refreshing the old version BIOS release packet into the testing machine by the startup. Nsh, and restarting the testing machine after modifying the state of the testing machine into a second state.
4. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-2.
5. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110999244.5A CN113886218B (en) | 2021-08-28 | 2021-08-28 | Method, device, equipment and readable medium for verifying BIOS refreshing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110999244.5A CN113886218B (en) | 2021-08-28 | 2021-08-28 | Method, device, equipment and readable medium for verifying BIOS refreshing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113886218A CN113886218A (en) | 2022-01-04 |
CN113886218B true CN113886218B (en) | 2024-01-09 |
Family
ID=79011544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110999244.5A Active CN113886218B (en) | 2021-08-28 | 2021-08-28 | Method, device, equipment and readable medium for verifying BIOS refreshing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113886218B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677562A (en) * | 2016-01-05 | 2016-06-15 | 浪潮电子信息产业股份有限公司 | Method for realizing mutual refreshing of BIOS versions under DOS |
CN107766240A (en) * | 2017-09-29 | 2018-03-06 | 郑州云海信息技术有限公司 | UEFI Shell internal command automatic running detection methods and system |
CN107766072A (en) * | 2017-11-28 | 2018-03-06 | 郑州云海信息技术有限公司 | Video card refreshes BIOS method under a kind of linux system |
CN107894956A (en) * | 2017-12-21 | 2018-04-10 | 郑州云海信息技术有限公司 | A kind of long-range BIOS promotion and demotion refresh automated testing method |
CN109800163A (en) * | 2019-01-02 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of method and system of test b ios upgrade stability |
CN110659167A (en) * | 2019-09-12 | 2020-01-07 | 苏州浪潮智能科技有限公司 | Server hardware testing method, equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090198988A1 (en) * | 2008-01-31 | 2009-08-06 | Inventec Corporation | Method for verifying refreshed bios content |
-
2021
- 2021-08-28 CN CN202110999244.5A patent/CN113886218B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677562A (en) * | 2016-01-05 | 2016-06-15 | 浪潮电子信息产业股份有限公司 | Method for realizing mutual refreshing of BIOS versions under DOS |
CN107766240A (en) * | 2017-09-29 | 2018-03-06 | 郑州云海信息技术有限公司 | UEFI Shell internal command automatic running detection methods and system |
CN107766072A (en) * | 2017-11-28 | 2018-03-06 | 郑州云海信息技术有限公司 | Video card refreshes BIOS method under a kind of linux system |
CN107894956A (en) * | 2017-12-21 | 2018-04-10 | 郑州云海信息技术有限公司 | A kind of long-range BIOS promotion and demotion refresh automated testing method |
CN109800163A (en) * | 2019-01-02 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of method and system of test b ios upgrade stability |
CN110659167A (en) * | 2019-09-12 | 2020-01-07 | 苏州浪潮智能科技有限公司 | Server hardware testing method, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113886218A (en) | 2022-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103744695B (en) | Operating system remote installation method and system based on PXE | |
WO2017166446A1 (en) | Vulnerability-fixing method and device | |
CN110879712B (en) | Cloud data center physical host installation method and related device | |
CN111309336B (en) | Deployment method and device of distributed application | |
CN112199197B (en) | Server management method and system | |
US20210081188A1 (en) | System and Method for Dynamically Determining Applicable Updates | |
CN113010217B (en) | BIOS parameter setting method and device, electronic equipment and storage medium | |
WO2017185954A1 (en) | Method, host, and system for implementing usb device management | |
CN110943860A (en) | BMC (baseboard management controller) firmware updating method and system, electronic equipment and storage medium | |
CN115794257B (en) | System starting method, device, electronic equipment and storage medium | |
US20150113263A1 (en) | Method for updating basic input/output system of server | |
CN110780942A (en) | System starting method and device, node equipment and computer readable storage medium | |
CN110597545A (en) | Hot patch intelligent upgrading method and system based on OTA component | |
CN102882907A (en) | Client configuration system and method | |
CN113886218B (en) | Method, device, equipment and readable medium for verifying BIOS refreshing | |
TW202139006A (en) | Server with system setting data synchronization function | |
CN112099902A (en) | Network adapter configuration method and device of virtual machine, electronic device and storage medium | |
CN106484442B (en) | Server system and method for updating startup mapping file | |
CN115328717A (en) | Kernel testing method and system supporting various domestic platforms | |
CN106708541A (en) | Version upgrading processing method and apparatus | |
CN110798346B (en) | Configuration method of newly added network card of Linux virtual machine and related components | |
CN114448788A (en) | Installation method, system, equipment and medium of switch system | |
CN114006901A (en) | Embedded network equipment cover-dismounting-free firmware upgrading method and system | |
CN109684134B (en) | Method and server for rapidly deploying firmware settings among multiple devices | |
CN106506276A (en) | A kind of information detecting method for server |
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 |