CN113220353A - Hard disk startup item ordering method, system, terminal and storage medium - Google Patents

Hard disk startup item ordering method, system, terminal and storage medium Download PDF

Info

Publication number
CN113220353A
CN113220353A CN202110582648.4A CN202110582648A CN113220353A CN 113220353 A CN113220353 A CN 113220353A CN 202110582648 A CN202110582648 A CN 202110582648A CN 113220353 A CN113220353 A CN 113220353A
Authority
CN
China
Prior art keywords
hard disk
type
item
sequencing
sorting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110582648.4A
Other languages
Chinese (zh)
Other versions
CN113220353B (en
Inventor
王优博
李道童
芦飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110582648.4A priority Critical patent/CN113220353B/en
Publication of CN113220353A publication Critical patent/CN113220353A/en
Application granted granted Critical
Publication of CN113220353B publication Critical patent/CN113220353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method, a system, a terminal and a storage medium for ordering hard disk startup items, wherein the method comprises the following steps: presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types; detecting that the current hard disk starting item has change, and acquiring the current change type; and sequencing the hard disk startup items according to a sequencing method corresponding to the current change type, and updating the sequencing result to a startup item mapping table. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.

Description

Hard disk startup item ordering method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of servers, in particular to a method, a system, a terminal and a storage medium for ordering hard disk startup items.
Background
The BIOS is a set of programs solidified on a ROM chip on the main board of the computer, which stores the most important basic input and output programs, self-test program after power-on and system self-starting program, and can read and write the specific information set by the system from the CMOS. Its primary function is to provide the lowest level, most direct hardware setup and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The change of system hardware is hidden by BIOS, and programs use BIOS functions rather than directly control the hardware.
With the rapid development of server technology, usability, performance and functions are continuously enhanced, maintenance difficulty and cost are more and more complex, and particularly with high-efficiency maintainability, server maintenance personnel can easily manage, quickly locate problems and efficiently work. With the development of server technology, the customization demand of clients to the server is more and more, and the requirement on maintainability is higher and higher.
At present, the NVME hard disk in the BIOS starting item is used for positioning the position of the newly accessed NMVE starting disk for the client, and the newly accessed NVME system disk is sequentially placed to the end, but the maintenance cost is greatly improved in the mode, the NVME hard disk is not beneficial to quick positioning and replacement of a fault NVME system disk by maintenance personnel, and the maintainability of the server is reduced.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for ordering hard disk startup items, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a hard disk startup item sorting method, including:
presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types;
detecting that the current hard disk starting item has change, and acquiring the current change type;
and sequencing the hard disk startup items according to a sequencing method corresponding to the current change type, and updating the sequencing result to a startup item mapping table.
Further, the presetting of the respective corresponding sorting methods of the multiple change types includes:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
Further, the sorting the hard disk startup items according to the sorting method corresponding to the current change type and updating the sorting result to the startup item mapping table includes:
if the current change type is the replacement type, sorting according to a sorting method corresponding to the replacement type to obtain a final order;
if the current change type is an add-delete type, sorting according to a sorting method corresponding to the add-delete type to obtain a final order;
if the current change type is a replacement type and an addition and deletion type, executing a sorting method corresponding to the replacement type first and then executing a sorting method corresponding to the addition and deletion type to obtain a final sequence;
the final sequence is updated to the startup item mapping table.
Further, detecting that there is a change in the current hard disk startup item, and obtaining the current change type includes:
establishing a hard disk starting item monitoring process, wherein the hard disk starting item monitoring process periodically collects hard disk starting items and compares whether the current hard disk starting item is consistent with the previous hard disk starting item, and if not, the hard disk starting item is judged to have change;
and the monitoring process acquires the current change type according to the difference between the current hard disk starting item and the previous hard disk starting item.
In a second aspect, the present invention provides a system for ordering hard disk boot entries, including:
the method presetting unit is configured for presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types;
the type detection unit is configured to detect that the current hard disk starting item has change and acquire the current change type;
and the sequencing updating unit is configured to sequence the hard disk startup items according to the sequencing method corresponding to the current change type and update the sequencing result to the startup item mapping table.
Further, the method presetting unit comprises:
the first setting module is configured to set a sequencing method corresponding to the replacement type to use the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
and the second setting module is configured to set the sorting method for the add-delete type to reorder all the hard disk startup items after adding the hard disk startup items or deleting the hard disk startup items according to the size of each bus number.
Further, the sorting update unit includes:
the first sequencing module is configured to sequence according to a sequencing method corresponding to the replacement type to obtain a final sequence if the current change type is the replacement type;
the second sorting module is configured to sort according to a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the addition and deletion type;
the third sorting module is configured to execute a sorting method corresponding to the replacement type first and then execute a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the replacement type and the addition and deletion type;
and the mapping updating module is configured to update the final sequence to the starting item mapping table.
The type detection unit includes:
the hard disk startup item monitoring process periodically collects hard disk startup items, compares whether the current hard disk startup item is consistent with the previous hard disk startup item, and judges that the hard disk startup item has change if the current hard disk startup item is inconsistent with the previous hard disk startup item;
and the type obtaining module is used for obtaining the current change type by the monitoring process according to the difference condition of the current hard disk starting item and the previous hard disk starting item.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the hard disk startup item sorting method provided by the invention realizes timely finding of the hard disk startup item changes, sorts the changed hard disk startup items according to the preset sorting method and updates the sorting result to the mapping table by presetting the sorting method corresponding to various change types and timely detecting the hard disk startup item change condition. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.
The hard disk startup item sorting system provided by the embodiment of the invention has the advantages that the sorting methods corresponding to various change types are preset by the method presetting unit, the change condition of the hard disk startup items is detected in time by the type detection unit, the change of the hard disk startup items is found in time, the changed hard disk startup items are sorted according to the preset sorting method by the sorting updating unit, and the sorting result is updated to the mapping table. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.
The terminal provided by the invention runs the hard disk boot entry sequencing method provided by the invention, the consistency of the BIOS boot entry sequence can be ensured, the actual physical position of the fault NVME boot disk can be quickly positioned, and the maintainability of the server is improved.
The storage medium stores the hard disk boot entry sequencing method provided by the invention, the consistency of the BIOS boot entry sequence can be ensured, the actual physical position of the fault NVME boot disk can be quickly positioned, and the maintainability of the server is improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, 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 invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a hard disk boot entry sorting system.
As shown in fig. 1, the method includes:
step 110, presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and deletion adding types;
step 120, detecting that the current hard disk starting item has change, and acquiring the current change type;
and step 130, sequencing the hard disk startup items according to the sequencing method corresponding to the current change type, and updating the sequencing result to the startup item mapping table.
In order to facilitate understanding of the present invention, the following further describes the principle of the hard disk startup item ordering method according to the present invention with reference to the embodiment.
Example 1
Specifically, the hard disk startup item ordering method includes:
s1, presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types.
Setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
The specific method provided by the embodiment is as follows:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item; the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
Taking an NVME hard disk as an example, replacing a replaced NVME hard disk boot entry with an original NVME boot entry in an order bit in a mapping table according to a replacement type; and aiming at the addition and deletion types, if the situation that an NVME hard disk starting item is newly added in the mapping table or removed from the mapping table is detected, sequencing according to the BUS number (BUS number) of the existing hard disk starting item in the mapping table from small to large.
And S2, detecting that the current hard disk startup item has change, and acquiring the current change type.
If the current change type is the replacement type, sorting according to a sorting method corresponding to the replacement type to obtain a final order; if the current change type is an add-delete type, sorting according to a sorting method corresponding to the add-delete type to obtain a final order; if the current change type is a replacement type and an addition and deletion type, executing a sorting method corresponding to the replacement type first and then executing a sorting method corresponding to the addition and deletion type to obtain a final sequence; the final sequence is updated to the startup item mapping table.
Specifically, the specific method provided in this embodiment is as follows:
the BIOS detects whether the hard disk boot entry has a change in the current UEFI or Legacy mode, the specific detection method is to periodically poll the boot entry mapping table, determine whether the contents of the mapping table queried this time are consistent with the last inquiry, and if not, indicate that a change exists. The specific change type can also be judged by comparing the contents of the mapping table. The polling period may be set to 5 min.
And S3, sequencing the hard disk startup items according to the sequencing method corresponding to the current change type, and updating the sequencing result to the startup item mapping table.
According to the change type detected in step S2, sorting hard disk startup items by using a corresponding sorting method, which specifically includes:
(1) if the current change type is the replacement type, sorting according to a sorting method corresponding to the replacement type to obtain a final order;
(2) if the current change type is an add-delete type, sorting according to a sorting method corresponding to the add-delete type to obtain a final order;
(3) if the current change type is a replacement type and an addition and deletion type, executing a sorting method corresponding to the replacement type first and then executing a sorting method corresponding to the addition and deletion type to obtain a final sequence;
(4) and updating the final sequence to a startup item mapping table, and applying the startup item mapping table to the BIOS startup item to generate a final BIOS startup item sequence.
Example 2
The embodiment provides a hard disk startup item sorting method, which specifically comprises the following steps:
s1, presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types.
Setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
The specific method provided by the embodiment is as follows:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item; the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
Taking an NVME hard disk as an example, replacing a replaced NVME hard disk boot entry with an original NVME boot entry in an order bit in a mapping table according to a replacement type; and aiming at the addition and deletion types, if the situation that an NVME hard disk starting item is newly added in the mapping table or removed from the mapping table is detected, sequencing according to the BUS number (BUS number) of the existing hard disk starting item in the mapping table from small to large.
And S2, detecting that the current hard disk startup item has change, and acquiring the current change type.
If the current change type is the replacement type, sorting according to a sorting method corresponding to the replacement type to obtain a final order; if the current change type is an add-delete type, sorting according to a sorting method corresponding to the add-delete type to obtain a final order; if the current change type is a replacement type and an addition and deletion type, executing a sorting method corresponding to the replacement type first and then executing a sorting method corresponding to the addition and deletion type to obtain a final sequence; the final sequence is updated to the startup item mapping table.
Specifically, the specific method provided in this embodiment is as follows:
the BIOS detects whether the hard disk boot entry has a change in the current UEFI or Legacy mode, the specific detection method is to periodically poll the boot entry mapping table, determine whether the contents of the mapping table queried this time are consistent with the last inquiry, and if not, indicate that a change exists. The specific change type can also be judged by comparing the contents of the mapping table. The polling period may be set to 5 min.
And S3, sequencing the hard disk startup items according to the sequencing method corresponding to the current change type, and updating the sequencing result to the startup item mapping table.
And calling the corresponding sorting method in the step S1 to sort the hard disk startup items according to the change types detected in the step S2, and updating the sorted hard disk startup items to the startup item mapping table in sequence.
Example 3
The embodiment provides a hard disk startup item sorting method, which specifically comprises the following steps:
s1, presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types.
Setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
The specific method provided by the embodiment is as follows:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item; the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
Taking an NVME hard disk as an example, replacing a replaced NVME hard disk boot entry with an original NVME boot entry in an order bit in a mapping table according to a replacement type; and aiming at the addition and deletion types, if the situation that an NVME hard disk starting item is newly added in the mapping table or removed from the mapping table is detected, sequencing according to the BUS number (BUS number) of the existing hard disk starting item in the mapping table from small to large.
And S2, detecting that the current hard disk startup item has change, and acquiring the current change type.
Establishing a monitoring process, monitoring the state of the hard disk startup items, acquiring the sequence of the changed hard disk startup items and the sequence of the prestored hard disk startup items before the change once the hard disk startup items are monitored to be changed, and acquiring the change type by comparing the difference between the two sequences, wherein the change type is an addition/deletion type if the original sequence is ABCD and the new sequence is ABCDE; the original sequence is ABCD, the new sequence is ABCE, and the new sequence is a replacement type; the original sequence is ABCD, the new sequence is ABCEF, and the new sequence is a replacement + addition and deletion mixed type.
And S3, sequencing the hard disk startup items according to the sequencing method corresponding to the current change type, and updating the sequencing result to the startup item mapping table.
And calling the corresponding sorting method in the step S1 to sort the hard disk startup items according to the change types detected in the step S2, and updating the sorted hard disk startup items to the startup item mapping table in sequence.
Example 4
The embodiment provides a hard disk startup item sorting method, which specifically comprises the following steps:
s1, presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types.
Setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
The specific method provided by the embodiment is as follows:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item; the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
Taking an NVME hard disk as an example, replacing a replaced NVME hard disk boot entry with an original NVME boot entry in an order bit in a mapping table according to a replacement type; and aiming at the addition and deletion types, if the situation that an NVME hard disk starting item is newly added in the mapping table or removed from the mapping table is detected, sequencing according to the BUS number (BUS number) of the existing hard disk starting item in the mapping table from small to large.
And S2, detecting that the current hard disk startup item has change, and acquiring the current change type.
Establishing a monitoring process, monitoring the state of the hard disk startup items, acquiring the sequence of the changed hard disk startup items and the sequence of the prestored hard disk startup items before the change once the hard disk startup items are monitored to be changed, and acquiring the change type by comparing the difference between the two sequences, wherein the change type is an addition/deletion type if the original sequence is ABCD and the new sequence is ABCDE; the original sequence is ABCD, the new sequence is ABCE, and the new sequence is a replacement type; the original sequence is ABCD, the new sequence is ABCEF, and the new sequence is a replacement + addition and deletion mixed type.
And S3, sequencing the hard disk startup items according to the sequencing method corresponding to the current change type, and updating the sequencing result to the startup item mapping table.
And calling the corresponding sorting method in the step S1 to sort the hard disk startup items according to the change types detected in the step S2, and updating the sorted hard disk startup items to the startup item mapping table in sequence.
And acquiring the difference between the sequence of the reordered startup items and the sequence of the hard disk startup items before changing, and updating the difference item information to a startup item mapping table.
The hard disk startup item sorting method provided by this embodiment realizes timely finding of a change of a hard disk startup item, sorting the changed hard disk startup item according to a preset sorting method, and updating a sorting result to a mapping table by presetting a sorting method corresponding to a plurality of change types and timely detecting a change condition of the hard disk startup item. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.
As shown in fig. 2, the system 200 includes:
a method presetting unit 210 configured to preset respective corresponding sorting methods of a plurality of change types, where the plurality of change types include a replacement type and an addition/deletion type;
a type detection unit 220 configured to detect that a current hard disk boot entry has a change, and obtain a current change type;
and the sorting updating unit 230 is configured to sort the hard disk startup items according to the sorting method corresponding to the current change type, and update the sorting result to the startup item mapping table.
Optionally, as an embodiment of the present invention, the method includes:
the first setting module is configured to set a sequencing method corresponding to the replacement type to use the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
and the second setting module is configured to set the sorting method for the add-delete type to reorder all the hard disk startup items after adding the hard disk startup items or deleting the hard disk startup items according to the size of each bus number.
The starting item changes are distinguished through the preset unit, different sorting methods corresponding to different change types are made, and a data base is laid.
Optionally, as an embodiment of the present invention, the sorting update unit includes:
the first sequencing module is configured to sequence according to a sequencing method corresponding to the replacement type to obtain a final sequence if the current change type is the replacement type;
the second sorting module is configured to sort according to a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the addition and deletion type;
the third sorting module is configured to execute a sorting method corresponding to the replacement type first and then execute a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the replacement type and the addition and deletion type;
and the mapping updating module is configured to update the final sequence to the starting item mapping table.
The sorting updating unit can realize the execution of the sorting of different hard disk startup items with different change types.
Optionally, as an embodiment of the present application, the type detecting unit includes:
the hard disk startup item monitoring process periodically collects hard disk startup items, compares whether the current hard disk startup item is consistent with the previous hard disk startup item, and judges that the hard disk startup item has change if the current hard disk startup item is inconsistent with the previous hard disk startup item;
and the type obtaining module is used for obtaining the current change type by the monitoring process according to the difference condition of the current hard disk starting item and the previous hard disk starting item.
In the hard disk startup item sorting system provided by this embodiment, the method presetting unit presets sorting methods corresponding to multiple change types, and the type detection unit detects the change condition of the hard disk startup items in time, so as to find the change of the hard disk startup items in time, sort the changed hard disk startup items according to the preset sorting method by using the sorting updating unit, and update the sorting result to the mapping table. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the hard disk boot entry sorting method according to the embodiment of the present invention.
Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. 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 320 may be used for storing instructions executed by the processor 310, and the memory 320 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 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 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 320 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 310 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 330, 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.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention realizes timely finding the change of the hard disk startup items by presetting the sequencing methods corresponding to various change types and timely detecting the change condition of the hard disk startup items, sequencing the changed hard disk startup items according to the preset sequencing method, and updating the sequencing result to the mapping table. The method can ensure the consistency of the BIOS starting item sequence, quickly locate the actual physical position of the fault NVME starting disk, and improve the maintainability of the server.
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.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional 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, systems 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.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A hard disk startup item ordering method is characterized by comprising the following steps:
presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types;
detecting that the current hard disk starting item has change, and acquiring the current change type;
and sequencing the hard disk startup items according to a sequencing method corresponding to the current change type, and updating the sequencing result to a startup item mapping table.
2. The method according to claim 1, wherein the presetting of the respective corresponding sorting methods of the plurality of change types comprises:
setting a sequencing method corresponding to the replacement type to take the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
the method for arranging the adding and deleting types is to reorder all the hard disk starting items after the hard disk starting items are added or deleted according to the size of each bus number.
3. The method of claim 2, wherein the sorting the hard disk startup items according to the sorting method corresponding to the current change type and updating the sorting result to the startup item mapping table includes:
if the current change type is the replacement type, sorting according to a sorting method corresponding to the replacement type to obtain a final order;
if the current change type is an add-delete type, sorting according to a sorting method corresponding to the add-delete type to obtain a final order;
if the current change type is a replacement type and an addition and deletion type, executing a sorting method corresponding to the replacement type first and then executing a sorting method corresponding to the addition and deletion type to obtain a final sequence;
the final sequence is updated to the startup item mapping table.
4. The method of claim 1, wherein detecting that there is a change in a current hard disk boot entry, and obtaining a current change type comprises:
establishing a hard disk starting item monitoring process, wherein the hard disk starting item monitoring process periodically collects hard disk starting items and compares whether the current hard disk starting item is consistent with the previous hard disk starting item, and if not, the hard disk starting item is judged to have change;
and the monitoring process acquires the current change type according to the difference between the current hard disk starting item and the previous hard disk starting item.
5. A system for ordering hard disk startup items, comprising:
the method presetting unit is configured for presetting a sorting method corresponding to each of a plurality of change types, wherein the plurality of change types comprise replacement types and addition and deletion types;
the type detection unit is configured to detect that the current hard disk starting item has change and acquire the current change type;
and the sequencing updating unit is configured to sequence the hard disk startup items according to the sequencing method corresponding to the current change type and update the sequencing result to the startup item mapping table.
6. The system of claim 5, wherein the method preset unit comprises:
the first setting module is configured to set a sequencing method corresponding to the replacement type to use the sequencing bit of the original hard disk startup item as the sequencing bit of the new hard disk startup item;
and the second setting module is configured to set the sorting method for the add-delete type to reorder all the hard disk startup items after adding the hard disk startup items or deleting the hard disk startup items according to the size of each bus number.
7. The system of claim 6, wherein the ordering update unit comprises:
the first sequencing module is configured to sequence according to a sequencing method corresponding to the replacement type to obtain a final sequence if the current change type is the replacement type;
the second sorting module is configured to sort according to a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the addition and deletion type;
the third sorting module is configured to execute a sorting method corresponding to the replacement type first and then execute a sorting method corresponding to the addition and deletion type to obtain a final order if the current change type is the replacement type and the addition and deletion type;
and the mapping updating module is configured to update the final sequence to the starting item mapping table.
8. The system of claim 5, wherein the type detection unit comprises:
the hard disk startup item monitoring process periodically collects hard disk startup items, compares whether the current hard disk startup item is consistent with the previous hard disk startup item, and judges that the hard disk startup item has change if the current hard disk startup item is inconsistent with the previous hard disk startup item;
and the type obtaining module is used for obtaining the current change type by the monitoring process according to the difference condition of the current hard disk starting item and the previous hard disk starting item.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202110582648.4A 2021-05-27 2021-05-27 Hard disk startup item sorting method, system, terminal and storage medium Active CN113220353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110582648.4A CN113220353B (en) 2021-05-27 2021-05-27 Hard disk startup item sorting method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110582648.4A CN113220353B (en) 2021-05-27 2021-05-27 Hard disk startup item sorting method, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113220353A true CN113220353A (en) 2021-08-06
CN113220353B CN113220353B (en) 2023-03-10

Family

ID=77099673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110582648.4A Active CN113220353B (en) 2021-05-27 2021-05-27 Hard disk startup item sorting method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113220353B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501300A (en) * 2013-09-30 2014-01-08 华为技术有限公司 Method, terminal and server for detecting phishing attack
CN106095680A (en) * 2016-06-12 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Linux
CN107422985A (en) * 2017-05-17 2017-12-01 郑州云海信息技术有限公司 A kind of control method of storage system disk sequence
CN109117195A (en) * 2018-07-27 2019-01-01 郑州云海信息技术有限公司 A kind of method, device and equipment of UEFI mode adjustment boot sequence
CN109240754A (en) * 2017-07-03 2019-01-18 中兴通讯股份有限公司 A kind of logical device and method, system configuring BIOS startup item
CN109656627A (en) * 2018-12-18 2019-04-19 广东浪潮大数据研究有限公司 Starting method, activation system and the relevant apparatus of hard disk in a kind of BIOS
US20190201088A1 (en) * 2017-12-28 2019-07-04 Ethicon Llc Surgical evacuation system with a communication circuit for communication between a filter and a smoke evacuation device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501300A (en) * 2013-09-30 2014-01-08 华为技术有限公司 Method, terminal and server for detecting phishing attack
CN106095680A (en) * 2016-06-12 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Linux
CN107422985A (en) * 2017-05-17 2017-12-01 郑州云海信息技术有限公司 A kind of control method of storage system disk sequence
CN109240754A (en) * 2017-07-03 2019-01-18 中兴通讯股份有限公司 A kind of logical device and method, system configuring BIOS startup item
US20190201088A1 (en) * 2017-12-28 2019-07-04 Ethicon Llc Surgical evacuation system with a communication circuit for communication between a filter and a smoke evacuation device
CN109117195A (en) * 2018-07-27 2019-01-01 郑州云海信息技术有限公司 A kind of method, device and equipment of UEFI mode adjustment boot sequence
CN109656627A (en) * 2018-12-18 2019-04-19 广东浪潮大数据研究有限公司 Starting method, activation system and the relevant apparatus of hard disk in a kind of BIOS

Also Published As

Publication number Publication date
CN113220353B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN110554938B (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN111669284A (en) OpenStack automatic deployment method, electronic device, storage medium and system
CN109788052B (en) Server configuration remote query method, device, terminal and storage medium
CN110674029A (en) Method and device for automatically generating test data, electronic equipment and storage medium
CN114385251A (en) Operating system booting method, system, terminal and storage medium based on memory
CN113220353B (en) Hard disk startup item sorting method, system, terminal and storage medium
CN110874365B (en) Information query method and related equipment thereof
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
CN110554992B (en) Distributed metadata path management method, system, terminal and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN111338964B (en) Ordered batch test method, system, terminal and storage medium
CN112052144B (en) Information management method, device, electronic equipment and storage medium
CN114756362A (en) Resource quota management method and system, intelligent terminal and storage medium
CN111124854A (en) Method, system, terminal and storage medium for distributing smoking test cases
CN114722927A (en) Collapse clustering method and device, electronic equipment and storage medium
CN110703988B (en) Storage pool creating method, system, terminal and storage medium for distributed storage
CN114448972A (en) Distributed storage log compression downloading method, system, terminal and storage medium
CN113064793B (en) Bus equipment position information polling collection method, system, terminal and storage medium
CN111966286A (en) Multi-data pool hierarchical migration method and system
CN112486556B (en) Method, system, terminal and storage medium for server to be compatible with BMC
CN111338677A (en) Component and drive association validity verification method, system, terminal and storage medium
CN110865932A (en) Program internal interface testing method, system, terminal and storage medium
CN111475349B (en) Method, system, terminal and storage medium for testing stability of cluster DPDK
CN112256500B (en) Storage system test server configuration method, system, terminal and storage medium
CN112988250B (en) Multi-mainboard USB service configuration method, system, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant