CN114281788A - BMC firmware data extraction method, device, terminal and storage medium - Google Patents

BMC firmware data extraction method, device, terminal and storage medium Download PDF

Info

Publication number
CN114281788A
CN114281788A CN202111384202.7A CN202111384202A CN114281788A CN 114281788 A CN114281788 A CN 114281788A CN 202111384202 A CN202111384202 A CN 202111384202A CN 114281788 A CN114281788 A CN 114281788A
Authority
CN
China
Prior art keywords
partition
firmware
data
bmc
binary file
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
CN202111384202.7A
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 CN202111384202.7A priority Critical patent/CN114281788A/en
Publication of CN114281788A publication Critical patent/CN114281788A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the field of BMC firmware data extraction, and particularly discloses a BMC firmware data extraction method, a device, a terminal and a storage medium, wherein a partition identification field and a partition information field containing partition information are configured at the head of each firmware partition of a firmware structure; when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a target binary file; and extracting the content in the target binary file according to the partition identification field and the partition information field and storing the content in the specified folder. The invention realizes the functions of extracting key data of the firmware partition and positioning the fault in the fault scene of the baseboard management controller, can extract the running log file and the configuration data of the baseboard management controller in a plurality of scenes such as fault and hang-up of the baseboard management controller, so as to quickly and accurately solve the problem, improve the operation and maintenance efficiency of the server, and is effective quality reinforcement for the upgrading reliability and stability of the baseboard management firmware.

Description

BMC firmware data extraction method, device, terminal and storage medium
Technical Field
The invention relates to the field of BMC firmware data extraction, in particular to a BMC firmware data extraction method, a device, a terminal and a storage medium.
Background
In the big data world of everything interconnection, the server is rapidly popularized and applied as social IT infrastructure equipment, and the development of the server management technology has higher and higher requirements on the server. The stable and reliable server running state and the efficient and accurate operation and maintenance means are important directions for the development of server management technology. In terms of server hardware alone, the baseboard management controller is the core of server hardware management and is responsible for monitoring and managing the operating environment and the safety state of the server, and during the life cycle of the baseboard management controller, operation and maintenance personnel often need to face the maintenance case of the operating fault of the baseboard management controller and face the requirement of a client on quick and accurate positioning, and urgently need to collect firmware logs of the baseboard management controller to position the fault cause of the baseboard management controller.
In the field of server management, a baseboard management controller provides a function of monitoring and managing server hardware, but an operating system is often independent of the running state of the baseboard management controller when a server product is designed. When the baseboard management controller is damaged and fails, the baseboard management controller management system often loses out-of-band management capability, and a maintainer cannot locate the failure reason of the baseboard management controller by means of collecting firmware logs, analyzing firmware configuration files and the like through out-of-band means, so that the problem cannot be solved quickly and accurately.
Disclosure of Invention
In order to solve the problems, the invention provides a method, a device, a terminal and a storage medium for extracting BMC firmware data, wherein a specific partition field is configured for a firmware structure of a BMC, image data in a firmware partition is quickly extracted based on the partition field, and a Baseboard Management Controller (BMC) operation log file and configuration data can be extracted under multiple scenes of failure, hang-up and the like of the baseboard management controller, so that the problems are quickly and accurately solved, and the operation and maintenance efficiency of a server is improved.
In a first aspect, a technical solution of the present invention provides a BMC firmware data extraction method, including the following steps:
configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a target binary file;
and extracting the content in the target binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
Further, the partition information includes a partition name, a file system format, and a base address offset.
Further, extracting the content in the target binary file according to the partition identification field and the partition information field and saving the content in the target binary file into a specified folder, which specifically comprises the following steps:
loading the data in the target binary file into a memory;
reading target binary file data in a memory, and extracting partition information in a partition information field behind a partition identification field when the partition identification field is read;
analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information;
storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition;
and exporting and saving the binary files corresponding to all the firmware partitions into a designated folder.
Further, exporting and saving the binary files corresponding to all the firmware partitions to a designated folder specifically includes:
operating an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition;
copying data in a binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction;
and entering a file system mount point, copying and exporting mirror image data of the firmware partition, and storing the mirror image data into a specified folder.
Further, reading the target binary file data in the memory specifically includes:
reading target binary file data in a memory according to a fixed size; wherein the fixed size is the size of the partition identification field.
Further, extracting BMC flash data and storing the BMC flash data as a target binary file specifically includes:
logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a target binary file;
and if the extraction fails, extracting the BMC flash memory data by using a burner and storing the BMC flash memory data as a target binary file.
In a second aspect, an embodiment of the present invention provides a BMC firmware data extracting apparatus, including,
the firmware structure configuration module: configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
BMC flash memory data extraction module: when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a binary file;
the firmware partition mirror image data extraction module: and extracting the content in the binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
Further, the partition information includes a partition name, a file system format, and a base address offset.
In a third aspect, a technical solution of the present invention provides a terminal, including:
the memory is used for storing a BMC firmware data extraction program;
and the processor is used for realizing the steps of the BMC firmware data extraction method when the BMC firmware data extraction program is executed.
In a fourth aspect, an aspect of the present invention provides a computer-readable storage medium, where a BMC firmware data extraction program is stored in the computer-readable storage medium, and when executed by a processor, the BMC firmware data extraction program implements any of the steps of the BMC firmware data extraction method described above.
Compared with the prior art, the BMC firmware data extraction method, the device, the terminal and the storage medium provided by the invention have the following beneficial effects: the method has the advantages that specific partition fields are configured for the firmware structure of the BMC, image data in the firmware partitions are extracted quickly based on the partition fields, the functions of extracting key data of the firmware partitions and locating faults under the fault scene of the baseboard management controller are achieved, running log files and configuration data of the baseboard management controller can be extracted under the conditions that the baseboard management controller breaks down, hangs down and the like, problems are solved quickly and accurately, the operation and maintenance efficiency of a server is improved, and effective quality reinforcement for the upgrading reliability and stability of the baseboard management firmware is achieved.
Drawings
For a clearer explanation of the embodiments or technical solutions of the prior art of the present application, the drawings needed for the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a BMC firmware data extraction method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a BMC firmware structure according to an embodiment of the present invention.
Fig. 3 is a schematic diagram illustrating a flow of extracting mirror data of a firmware partition according to an embodiment of the present invention.
Fig. 4 is a schematic flowchart of exporting and saving a binary file corresponding to a firmware partition according to an embodiment of the present invention.
Fig. 5 is a schematic block diagram of a structure of a BMC firmware data extraction device according to a second embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a terminal according to a third embodiment of the present invention.
Detailed Description
The following explains some of the english terms related to the present invention.
BMC: basebard Manager Controller, substrate management Controller.
MTD: memory Technology Device Memory Technology equipment, an abstract concept name describing Memory equipment in Linux kernel.
mtdram: memory Technology Device RAM Memory module, a kernel run module residing in a linux system.
mtdblock: memory Technology Device Block, a type of Device Memory partition Block that exists in a linux system mtd.
In the prior art, when firmware is damaged and fails, a baseboard management controller management system usually loses out-of-band management capability, and maintenance personnel cannot locate the failure reason of the baseboard management controller by means of collecting firmware logs, analyzing firmware configuration files and the like through the out-of-band means, so that the problem cannot be solved quickly and accurately. The invention provides a BMC firmware data extraction scheme, which comprises the steps of firstly configuring a partition identification field and a partition information field containing partition information at the head of each firmware partition of a firmware structure, extracting BMC flash memory data and storing the BMC flash memory data as a binary file when extracting BMC firmware data, and then extracting the content in the binary file according to the partition identification field and the partition information field and storing the content in a specified folder. According to the scheme, specific partition fields are configured for the firmware structure of the BMC, image data in the firmware partitions are extracted quickly based on the partition fields, and running log files and configuration data of the baseboard management controller can be extracted under multiple scenes such as faults and hang-up of the baseboard management controller, so that problems are solved quickly and accurately, and the operation and maintenance efficiency of the server is improved.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
Fig. 1 is a schematic flow chart of a BMC firmware data extraction method according to a first embodiment of the present invention, which includes the following steps.
S101, configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure.
As shown in fig. 2, the BMC firmware structure of this embodiment includes a plurality of firmware partitions, such as a BOOT partition, a configuration partition (CONF), a LOG partition (LOG), and the like.
The present embodiment configures a partition identification field and a partition information field in each firmware partition header. Wherein the partition identification field may contain a special flag indication for identifying the start of a firmware partition. When the partition identification field is read, the firmware partition is located, and the mirror image data behind the partition identification field is extracted. And which data after the partition identification field is extracted is the mirror image data of the firmware partition, the extraction can be performed according to the parameters in the partition information field. In some embodiments, the partition information in the partition information field includes a partition name, a file system format, and a base address offset (i.e., base address offset), identifies attributes of the firmware partition, and may extract mirrored data of the firmware partition based on the base address offset. It should be noted that the mirror data of the firmware partition is provided as the original data to the system for mount access.
And S102, when the BMC firmware data is extracted, extracting the BMC flash memory data and storing the BMC flash memory data as a binary file.
When the firmware is burned, the complete partition data is burned into a hardware Flash memory (namely, a Flash chip) for storage, when the substrate management controller fails, the substrate management controller loses out-of-band access capability, at the moment, the data in the hardware Flash memory is not damaged, and the related partition data provides the fault information of the substrate management controller, so that the fault is solved by extracting the Flash memory data of the related substrate management controller.
S103, extracting the content in the binary file according to the partition identification field and the partition information field and saving the content in the binary file into a specified folder.
After the flash memory data is extracted, based on the firmware structure, the mirror image data of each firmware partition can be extracted according to the partition identification field and the partition information field, and the mirror image data is stored in a designated folder, so that data is provided for research and development personnel to locate the fault reason.
According to the BMC firmware data extraction method provided by the embodiment, the specific partition field is configured for the firmware structure of the BMC, the image data in the firmware partition is quickly extracted based on the partition field, the functions of firmware partition key data extraction and fault location under the fault scene of the baseboard management controller are realized, the running log file and the configuration data of the baseboard management controller can be extracted under the multiple scenes of fault, hang-up and the like of the baseboard management controller, so that the problems are quickly and accurately solved, the operation and maintenance efficiency of the server is improved, and the method is effective quality reinforcement for the upgrading reliability and stability of the baseboard management firmware.
In some embodiments, when the BMC flash data is extracted and stored as the binary file in step S102, the BMC flash data may be extracted by an in-band tool first, and if the in-band tool cannot be extracted, the BMC flash data may be extracted by a writer tool.
Specifically, the steps of extracting the BMC flash data and saving the BMC flash data as a binary file include:
step one, logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a binary file;
and step two, if the extraction fails, using a burner to extract the BMC flash memory data and storing the BMC flash memory data as a binary file.
And finishing the extraction of the BMC flash memory data by research personnel according to the condition of the server.
After the BMC flash memory data is extracted, the content in the binary file can be extracted according to the partition identification field and the partition information field, and the extracted content is stored in a designated folder for research personnel to analyze and locate the fault reason.
When data is extracted according to the partition identification field and the partition information field, firstly, related data is stored in a memory, then firmware partitions are positioned based on the partition identification field, then, mirror image data of the firmware partitions are extracted according to parameters in the partition information field, and finally, the mirror image data of each firmware partition is stored in a corresponding binary file.
Specifically, as shown in fig. 3, the step S103 mentioned above includes the following steps of extracting the content in the target binary file to be saved in the designated folder according to the partition identification field and the partition information field, that is, extracting the mirror image data of the firmware partition.
S201, loading the data in the target binary file into a memory.
Firstly, loading data into a memory, and carrying out subsequent operation based on the data in the memory.
S202, reading target binary file data in the memory, and extracting the partition information in the partition information field behind the partition identification field when the partition identification field is read.
The partition identification field has a certain size, so that in specific implementation, target binary file data in the memory can be read according to the fixed size. Wherein the fixed size is the size of the partition identification field.
Reading field data with fixed size from front to back each time, analyzing whether the read data is a partition identifier, if so, positioning a firmware partition, and then extracting partition information in a partition information field behind the partition identifier field so as to extract mirror image data of the firmware partition based on the partition information.
And S203, analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information.
The analyzed partition information comprises a partition name, a file system format and a base address offset, the partition name and the file system format identify the attributes of the firmware partition, and the data after the partition identification field is located based on the base address offset is the mirror image data of the firmware partition, and then the mirror image data of the firmware partition is extracted.
S204, storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition.
To distinguish each firmware partition, the data for each firmware partition is saved to a binary file named for the firmware partition.
S205, exporting and saving the binary files corresponding to all the firmware partitions into a designated folder.
It should be noted that, the data in the target binary file in the memory is traversed, and the mirror image data of all the firmware partitions is extracted.
In the step S205, exporting and saving the binary files corresponding to all the firmware partitions to the designated folder is realized by the kernel mtdram module, and specifically, as shown in fig. 4, exporting and saving the binary files corresponding to the firmware partitions includes the following steps.
S301, operating an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition;
s302, copying data in the binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction;
s303, entering a file system mount point to copy and export the mirror image data of the firmware partition, and saving the mirror image data in a specified folder.
It should be noted that the mirror data of all firmware partitions are saved in the designated folder.
Therefore, after the data of the fault firmware is extracted, the specified folder can be sent to research and development personnel subsequently, and the research and development personnel can locate the fault.
Example two
The second embodiment provides a BMC firmware data extraction device, which is used to implement the BMC firmware data extraction method.
Fig. 5 is a schematic block diagram of a structure of a BMC firmware data extraction device according to a second embodiment of the present invention, which includes the following functional modules.
Firmware configuration module 101: a partition identification field and a partition information field containing partition information are configured in each firmware partition header of the firmware structure.
BMC flash data extraction module 102: when the BMC firmware data is extracted, the BMC flash memory data is extracted and stored as a binary file.
Firmware partition mirroring data extraction module 103: and extracting the content in the binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
The partition information in the partition information field configured by the firmware configuration module 101 includes a partition name, a file system format, and a base address offset.
When the BMC flash data extraction module 102 extracts BMC flash data, the in-band tool is operated based on the server state to extract or the burner is used to extract, which specifically includes: logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a target binary file; and if the extraction fails, extracting the BMC flash memory data by using a burner and storing the BMC flash memory data as a target binary file.
The firmware partition mirror image data extraction module 103 extracts the content in the binary file according to the partition identification field and the partition information field and stores the content in the designated folder, and specifically includes the following processes to realize the extraction of the firmware partition mirror image data:
loading data in a target binary file into a memory;
reading target binary file data in the memory, and extracting partition information in a partition information field behind a partition identification field when the partition identification field is read;
analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information;
step four, storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition;
and step five, exporting and saving the binary files corresponding to all the firmware partitions into a specified folder.
In addition, the exporting and saving of the binary files corresponding to all the firmware partitions to the designated folder is specifically realized by the following processes:
running an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition;
copying data in the binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction;
and step three, entering a file system mount point to copy and export the mirror image data of the firmware partition, and storing the mirror image data in a specified folder.
The BMC firmware data extraction device of this embodiment is configured to implement the aforementioned BMC firmware data extraction method, so that the specific implementation of the device can be seen in the foregoing embodiment section of the BMC firmware data extraction method, and therefore, the specific implementation of the device may refer to the description of the corresponding partial embodiment and will not be further described herein.
The second embodiment provides a BMC firmware data extraction device, configure specific partition field for the firmware structure of BMC, extract firmware subregion scope image data fast based on partition field, realized that the function of firmware subregion key data extraction, fault location under the baseboard management controller fault scene, can be in the multiple scenes such as the baseboard management controller breaks down, hang and die, extract baseboard management ware operation log file, configuration data, with quick accurate solution problem, improve server operation and maintenance efficiency, be the effective quality reinforcement to baseboard management firmware upgrade reliability and stability.
EXAMPLE III
Fig. 6 is a schematic structural diagram of a terminal device 600 according to an embodiment of the present invention, including: a processor 610, a memory 620, and a communication unit 630. The processor 610 is configured to implement the BMC firmware data extraction program stored in the memory 620, and implement the following steps:
configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a target binary file;
and extracting the content in the target binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
The method configures specific partition fields for the firmware structure of the BMC, quickly extracts image data in the firmware partition based on the partition fields, realizes the functions of extracting key data of the firmware partition and positioning the fault in a fault scene of the baseboard management controller, can extract the running log file and configuration data of the baseboard management controller in a plurality of scenes such as fault and hang-up of the baseboard management controller, and the like so as to quickly and accurately solve the problem and improve the operation and maintenance efficiency of the server, and is effective quality reinforcement for the upgrading reliability and stability of the baseboard management firmware.
In some embodiments, when the processor 610 executes the BMC firmware data extraction subroutine stored in the memory 620, the following steps may be specifically implemented: the partition information includes a partition name, a file system format, and a base address offset.
In some embodiments, when the processor 610 executes the BMC firmware data extraction subroutine stored in the memory 620, the following steps may be specifically implemented: loading the data in the target binary file into a memory; reading target binary file data in a memory, and extracting partition information in a partition information field behind a partition identification field when the partition identification field is read; analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information; storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition; and exporting and saving the binary files corresponding to all the firmware partitions into a designated folder.
In some embodiments, when the processor 610 executes the BMC firmware data extraction subroutine stored in the memory 620, the following steps may be specifically implemented: operating an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition; copying data in a binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction; and entering a file system mount point, copying and exporting mirror image data of the firmware partition, and storing the mirror image data into a specified folder.
In some embodiments, when the processor 610 executes the BMC firmware data extraction subroutine stored in the memory 620, the following steps may be specifically implemented: reading target binary file data in a memory according to a fixed size; wherein the fixed size is the size of the partition identification field.
In some embodiments, when the processor 610 executes the BMC firmware data extraction subroutine stored in the memory 620, the following steps may be specifically implemented: logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a target binary file; and if the extraction fails, extracting the BMC flash memory data by using a burner and storing the BMC flash memory data as a target binary file.
The terminal apparatus 600 includes a processor 610, a memory 620, and a communication unit 630. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 620 may be used for storing instructions executed by the processor 610, and the memory 620 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 620, when executed by processor 610, enable terminal 600 to perform some or all of the steps in the method embodiments described below.
The processor 610 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 610 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 630, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
EXAMPLE six
The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
The computer storage medium stores a BMC firmware data extraction program, and when executed by the processor, the BMC firmware data extraction program implements the steps of:
configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a target binary file;
and extracting the content in the target binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
The method configures specific partition fields for the firmware structure of the BMC, quickly extracts image data in the firmware partition based on the partition fields, realizes the functions of extracting key data of the firmware partition and positioning the fault in a fault scene of the baseboard management controller, can extract the running log file and configuration data of the baseboard management controller in a plurality of scenes such as fault and hang-up of the baseboard management controller, and the like so as to quickly and accurately solve the problem and improve the operation and maintenance efficiency of the server, and is effective quality reinforcement for the upgrading reliability and stability of the baseboard management firmware.
In some specific embodiments, when the BMC firmware data extraction subroutine stored in the readable storage medium is executed by the processor, the method may specifically include: the partition information includes a partition name, a file system format, and a base address offset.
In some specific embodiments, when the BMC firmware data extraction subroutine stored in the readable storage medium is executed by the processor, the method may specifically include: loading the data in the target binary file into a memory; reading target binary file data in a memory, and extracting partition information in a partition information field behind a partition identification field when the partition identification field is read; analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information; storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition; and exporting and saving the binary files corresponding to all the firmware partitions into a designated folder.
In some specific embodiments, when the BMC firmware data extraction subroutine stored in the readable storage medium is executed by the processor, the method may specifically include: operating an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition; copying data in a binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction; and entering a file system mount point, copying and exporting mirror image data of the firmware partition, and storing the mirror image data into a specified folder.
In some specific embodiments, when the BMC firmware data extraction subroutine stored in the readable storage medium is executed by the processor, the method may specifically include: reading target binary file data in a memory according to a fixed size; wherein the fixed size is the size of the partition identification field.
In some specific embodiments, when the BMC firmware data extraction subroutine stored in the readable storage medium is executed by the processor, the method may specifically include: logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a target binary file; and if the extraction fails, extracting the BMC flash memory data by using a burner and storing the BMC flash memory data as a target binary file.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, 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, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of 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 through some interfaces, devices or units, 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 of 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 above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A BMC firmware data extraction method is characterized by comprising the following steps:
configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a target binary file;
and extracting the content in the target binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
2. The BMC firmware data extraction method of claim 1, wherein the partition information comprises a partition name, a file system format, and a base address offset.
3. The BMC firmware data extraction method of claim 2, wherein extracting the content in the target binary file according to the partition identification field and the partition information field and saving the content in the target binary file to a designated folder specifically includes:
loading the data in the target binary file into a memory;
reading target binary file data in a memory, and extracting partition information in a partition information field behind a partition identification field when the partition identification field is read;
analyzing the partition information, and extracting mirror image data in the corresponding firmware partition according to the analyzed partition information;
storing the extracted mirror image data in the firmware partition into a binary file named by the name of the firmware partition;
and exporting and saving the binary files corresponding to all the firmware partitions into a designated folder.
4. The BMC firmware data extraction method of claim 3, wherein exporting and saving the binary files corresponding to all the firmware partitions to a designated folder specifically comprises:
operating an operating system instruction, loading a kernel mtdram module, and creating an mtdblock partition;
copying data in a binary file of the firmware partition to an mtdblock partition, and mounting a file system by using a mount instruction;
and entering a file system mount point, copying and exporting mirror image data of the firmware partition, and storing the mirror image data into a specified folder.
5. The BMC firmware data extraction method of claim 4, wherein reading target binary file data in the memory specifically includes:
reading target binary file data in a memory according to a fixed size; wherein the fixed size is the size of the partition identification field.
6. The BMC firmware data extraction method of any one of claims 1 to 5, wherein extracting BMC flash memory data and storing the BMC flash memory data as a target binary file specifically includes:
logging in a fault server operating system, operating an in-band tool to extract BMC flash memory data and storing the BMC flash memory data as a target binary file;
and if the extraction fails, extracting the BMC flash memory data by using a burner and storing the BMC flash memory data as a target binary file.
7. A BMC firmware data extraction device is characterized by comprising,
the firmware structure configuration module: configuring a partition identification field and a partition information field containing partition information in each firmware partition head of a firmware structure;
BMC flash memory data extraction module: when BMC firmware data is extracted, BMC flash memory data is extracted and stored as a binary file;
the firmware partition mirror image data extraction module: and extracting the content in the binary file according to the partition identification field and the partition information field and storing the content in the specified folder.
8. The BMC firmware data extraction device of claim 7, wherein the partition information includes a partition name, a file system format, and a base address offset.
9. A terminal, comprising:
the memory is used for storing a BMC firmware data extraction program;
a processor for implementing the steps of the BMC firmware data extraction method of any one of claims 1 to 6 when executing the BMC firmware data extraction program.
10. A computer readable storage medium, wherein a BMC firmware data extraction program is stored on the readable storage medium, and when executed by a processor, implements the steps of the BMC firmware data extraction method of any of claims 1-6.
CN202111384202.7A 2021-11-19 2021-11-19 BMC firmware data extraction method, device, terminal and storage medium Withdrawn CN114281788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111384202.7A CN114281788A (en) 2021-11-19 2021-11-19 BMC firmware data extraction method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111384202.7A CN114281788A (en) 2021-11-19 2021-11-19 BMC firmware data extraction method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114281788A true CN114281788A (en) 2022-04-05

Family

ID=80869526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111384202.7A Withdrawn CN114281788A (en) 2021-11-19 2021-11-19 BMC firmware data extraction method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114281788A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995893A (en) * 2022-08-01 2022-09-02 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium
CN117331575A (en) * 2023-10-09 2024-01-02 上海合芯数字科技有限公司 Firmware restoration method, device, controller and storage medium
CN117472291A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995893A (en) * 2022-08-01 2022-09-02 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium
CN114995893B (en) * 2022-08-01 2022-11-01 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium
CN117331575A (en) * 2023-10-09 2024-01-02 上海合芯数字科技有限公司 Firmware restoration method, device, controller and storage medium
CN117472291A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment
CN117472291B (en) * 2023-12-27 2024-03-22 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN114281788A (en) BMC firmware data extraction method, device, terminal and storage medium
CN111625401B (en) Data backup method and device based on cluster file system and readable storage medium
CN109388622B (en) Log information processing method, device and equipment and readable storage medium
CN112491980B (en) Cloud host service management method, system, terminal and storage medium
CN111352700A (en) Method, system, terminal and storage medium for online migration of virtual machine across clouds
CN109257249A (en) A kind of network interface card stability test method, apparatus, terminal and storage medium
CN112783444A (en) Cluster disk sharing method, system and storage medium
CN111813495A (en) Node testing method and device, storage medium and electronic device
CN110569154B (en) Chip interface function testing method, system, terminal and storage medium
CN112000535A (en) SAS Expander card-based hard disk abnormity identification method and processing method
CN110008092B (en) Virtual machine safety monitoring method, device, equipment and readable storage medium
CN112214384A (en) Hard disk serial number management method, system, terminal and storage medium
CN112231170B (en) Data interaction card supervision method, system, terminal and storage medium
CN111966599B (en) Virtualization platform reliability testing method, system, terminal and storage medium
CN115373916A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
CN116303200A (en) PCIE equipment positioning management method, system, terminal and storage medium
CN115098342A (en) System log collection method, system, terminal and storage medium
CN112231159B (en) Memory installation position testing method, system, terminal and storage medium
CN113064750B (en) Tracking method, device and medium for BIOS log information
CN109783031B (en) Method, device, terminal and storage medium for checking drive letter and slot number of RAID card
EP4086756A1 (en) Method and apparatus for processing virtual machine component
CN109189638A (en) A kind of GPU driving detection method, device, terminal and storage medium
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN112463504A (en) Double-control storage product testing method, system, terminal and storage medium
CN114153503A (en) BIOS control method, device and 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220405

WW01 Invention patent application withdrawn after publication