Partition table conversion method and device, equipment and storage medium

By obtaining and formatting GPT partition table data, the data loss and cumbersome operation of GPT to MBR conversion in the whole machine migration are solved, and fast and automatic lossless conversion is achieved, which improves conversion efficiency and accuracy.

CN119902710APending Publication Date: 2025-04-29INFORMATION2 SOFTWARE SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411983259.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

During the whole machine migration process, it is difficult for the prior art to quickly and automatically convert GPT partition tables into MBR partition tables without data loss, and the operation steps are cumbersome.

Method used

By obtaining the target GPT partition table data and formatting the data based on the preset table conversion format, the target MBR partition table is obtained and finally stored in the preset partition.

Benefits of technology

It realizes the rapid and automatic conversion of GPT partition tables into MBR partition tables when data is lost, which improves the efficiency and accuracy of data conversion and provides support for the migration of the entire machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902710A_ABST
    Figure CN119902710A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a partition table conversion method and device, equipment and a storage medium, and the method comprises the steps: obtaining target GPT partition table data; performing format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used for converting data from a GPT format into an MBR format; and storing the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data. According to the technical scheme, the problems that in the prior art, in the process of converting the GPT partition table into the MBR partition table, data loss is prone to occurring, and operation steps are tedious are solved, the GPT partition table can be rapidly and automatically converted into the MBR partition table under the condition that data are lossless, the efficiency and accuracy of data conversion are improved, and the user experience is improved. And support is provided for whole machine product migration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of partition table data processing, and in particular to a partition table conversion method, device, equipment and storage medium. Background Art

[0002] At present, when migrating the entire machine, it is often necessary to achieve cross-cloud platform migration. Some cloud platforms only support BIOS boot mode, so the entire machine migration sometimes requires the conversion of GPT to MBR partition table. Regarding the conversion of partition table under Windows, Microsoft only provides the GPT2MBR tool, which can achieve the conversion of Windows partition table without data loss. Although you can often find how to convert GPT to MBR partition table in some online materials, such tutorials often face the problem of hard disk data loss, or the operation steps are cumbersome and cannot be automatically converted. Summary of the invention

[0003] The embodiments of the present invention provide a partition table conversion method, apparatus, device and storage medium, which can quickly and automatically convert a GPT partition table into an MBR partition table without data loss, improve the efficiency and accuracy of data conversion, and provide support for whole machine migration products.

[0004] In a first aspect, an embodiment of the present invention provides a partition table conversion method, the method comprising:

[0005] Acquire target GPT partition table data; perform format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from GPT format to MBR format; store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0006] In a second aspect, an embodiment of the present invention provides a partition table conversion device, the device comprising:

[0007] A partition table acquisition module is used to acquire target GPT partition table data; a partition table conversion module is used to perform format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from GPT format to MBR format; a partition table storage module is used to store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0008] In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:

[0009] one or more processors;

[0010] A memory for storing one or more programs;

[0011] When the one or more programs are executed by the one or more processors, the one or more processors implement the partition table conversion method described in any embodiment.

[0012] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the partition table conversion method described in any embodiment.

[0013] The technical solution provided by the embodiment of the present invention obtains the target GPT partition table data; performs format conversion on the target GPT partition table data based on a preset table conversion format to obtain the target MBR partition table; wherein the preset table conversion format is used to convert the data from the GPT format to the MBR format; and the target MBR partition table is stored in a preset partition to complete the format conversion process of the target GPT partition table data. The technical solution of the embodiment of the present invention solves the problem of data loss and cumbersome operation steps in the process of converting the GPT partition table to the MBR partition table in the prior art, and can quickly and automatically realize the conversion of the GPT partition table to the MBR partition table without data loss, thereby improving the efficiency and accuracy of data conversion and providing support for the whole machine migration product. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a flow chart of a partition table conversion method provided by an embodiment of the present invention;

[0015] Figure 2 is a flow chart of another partition table conversion method provided by an embodiment of the present invention;

[0016] Figure 3 is a structural schematic diagram of a partition table conversion device provided by an embodiment of the present invention;

[0017] Figure 4 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Figure 1 It is a flow chart of a partition table conversion method provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the scenario of converting a GPT partition table into an MBR partition table. The method can be executed by a partition table conversion device, which can be implemented by software and / or hardware.

[0020] like Figure 1 As shown, the partition table conversion method includes the following steps:

[0021] S110, obtaining target GPT partition table data.

[0022] The target boot partition drive letter parameter may be identification information about the data to be converted. Exemplarily, the target boot partition drive letter parameter may be obtained by user input.

[0023] S120, converting the format of the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table.

[0024] The preset conversion format may be a conversion standard for converting the GPT format into the MBR format. Specifically, the preset table conversion format may be set manually. The target MBR partition table may be the MBR partition table finally obtained after the format conversion. Exemplarily, each item of data in the target GPT partition table data may be converted from the GPT format into the MBR format according to the preset table conversion format, thereby obtaining the target MBR partition table.

[0025] S130. Store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0026] The preset partition can be a preset partition for storing MBR partition table data. For example, a specified sector in the target hard disk can be used as a preset partition, and the target MBR partition table is finally stored in the preset partition, so that the target MBR partition table can be retrieved from the preset partition in a timely manner.

[0027] The technical solution provided by the embodiment of the present invention obtains the target GPT partition table data; performs format conversion on the target GPT partition table data based on a preset table conversion format to obtain the target MBR partition table; wherein the preset table conversion format is used to convert the data from the GPT format to the MBR format; and the target MBR partition table is stored in a preset partition to complete the format conversion process of the target GPT partition table data. The technical solution of the embodiment of the present invention solves the problem of data loss and cumbersome operation steps in the process of converting the GPT partition table to the MBR partition table in the prior art, and can quickly and automatically realize the conversion of the GPT partition table to the MBR partition table without data loss, thereby improving the efficiency and accuracy of data conversion and providing support for the whole machine migration product.

[0028] Figure 2 It is another partition table conversion method flow chart provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the scenario of converting a GPT partition table into an MBR partition table. Based on the above embodiment, this embodiment further illustrates how to obtain the target GPT partition table data; and how to convert the format of the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table. The device can be implemented by software and / or hardware and integrated in a computer device with application development function.

[0029] like Figure 2 As shown, the partition table conversion method includes the following steps:

[0030] S210, obtaining drive letter parameters of the target boot partition.

[0031] The target boot partition drive letter parameter may be identification information about the data to be converted. Exemplarily, the target boot partition drive letter parameter may be obtained by user input.

[0032] S220. Based on the target boot partition drive letter parameter, read sector data from the second sector in the target hard disk, and determine the target GPT partition table data according to the sector data.

[0033] Wherein, the target hard disk may be a hard disk for storing conversion data. Wherein, the target hard disk may include a first sector and a second sector. Wherein, the first sector may be a sector for storing MBR partition table data. The second sector may be a sector for storing GPT partition table data. Specifically, the sector data corresponding to the target boot partition drive letter parameter may be matched from the second sector of the target hard disk, and then the target GTP partition table data may be determined based on the matched sector data. Wherein, the target GPT partition table data may be partition table data that needs to be formatted. The technical solution of the embodiment of the present invention requires converting the target GPT partition table data from the GPT format to the MBR format.

[0034] Optionally, obtaining the target GPT partition table data includes: obtaining a target boot partition drive letter parameter; based on the target boot partition drive letter parameter, reading sector data from a second sector in the target hard disk, and determining the target GPT partition table data according to the sector data.

[0035] Among them, the preset GPT partition header type can be a preset table entry type contained in the GPT partition table. Specifically, the preset GPT partition header type can be set manually. The partition header data can be the header type data contained in the sector data. Specifically, according to the preset GPT partition header type, the corresponding header type data can be matched from the sector data, and the matched header type data can be used as the partition table data. Furthermore, the partition data can be specific parameter data corresponding to the partition header data. After determining the partition header data, the specific parameter data under the header type data name can be used as the partition data corresponding to the partition header data.

[0036] Furthermore, the target GPT partition table data may be the GPT partition table data that needs to be formatted. Exemplarily, a GPT partition table may be constructed, and then the partition table header data may be filled into the table header item of the partition table, and the partition data may be filled into the data column corresponding to the table header item, and the GPT partition table after the data filling is completed may be used as the target GPT partition table data.

[0037] S230: Determine the partition table item association relationship according to the preset table conversion format.

[0038] Among them, the preset conversion format can be a conversion standard for converting the GPT format into the MBR format. Specifically, the preset table conversion format can be set manually. Further, the partition table item association relationship is used to represent the association relationship between the GPT partition table item and the MBR partition table item. The GPT partition table item can be a table item in the GPT partition table. Specifically, the GPT partition table item can be understood as the partition table header of the GPT partition table described above. The MBR partition table item can be a table item in the MBR partition table. Specifically, the correspondence between each GPT partition table item and the MBR partition table item can be determined according to the preset table conversion format, thereby obtaining the partition table item association relationship.

[0039] S240. According to the partition table item association relationship, the target GPT partition table data is formatted to obtain a target MBR partition table.

[0040] The target MBR partition table may be the MBR partition table finally obtained after format conversion. Specifically, each partition data item in the target GPT partition table data may be format converted according to the partition table item association relationship to obtain the target MBR partition table.

[0041] Optionally, according to the association relationship of the partition table items, the target GPT partition table data is formatted to obtain the target MBR partition table, including: creating an initial MBR partition table; for each GPT partition table item in the target GPT partition table data, based on the association relationship of the partition table items, determining the corresponding MBR partition table item from the initial MBR partition table; filling the partition data of the GPT partition table item into the filling column corresponding to the MBR partition table item to obtain the target MBR partition table. The initial MBR partition table may be an MBR partition table without data filling. The MBR partition table item includes at least one of: an active partition, a starting CHS (sector) address, a partition type, an ending CHS address, a starting LBA (logical block address), and a partition occupancy.

[0042] S250: Store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0043] The preset partition may be a preset partition for storing MBR partition table data. Exemplarily, the first sector in the target hard disk may be used as the preset partition.

[0044] Optionally, storing the target MBR partition table in a preset partition includes: acquiring partition table entry data in the target MBR partition table, and storing the partition table entry data in a first sector of the target hard disk.

[0045] For example, in order to better understand the technical solution provided by the present invention, a specific embodiment is introduced below. The specific implementation of this technology is generally divided into three steps:

[0046] First, read the boot disk sector to obtain the partition table and format the partition table data. First, the program needs to obtain the boot partition drive letter parameters, and read the corresponding hard disk sector data according to the drive letter parameters. This tool converts the GPT partition table into the MBR partition table, so it needs to read the second sector of the boot partition. Then read the partition table header and all partition information according to the definition of the GPT partition table, and save this information into the structure.

[0047] Second, convert the partition table according to the data structure obtained in the above steps. After extracting the key information, the information required by the MBR partition table is converted into the format of the MBR partition table. Therefore, it is necessary to convert the sector information of the partition table into a format, and convert it into status marks in sequence, namely whether it is an active partition, the starting CHS address, the partition type, the ending CHS address, the starting LBA and the partition occupancy. Then fill this information into each MBR partition table entry.

[0048] 3. Write the MBR partition table entry to the location of the first sector partition table of the disk.

[0049] The technical solution provided by the embodiment of the present invention obtains the target boot partition drive letter parameter; based on the target boot partition drive letter parameter, reads the sector data from the second sector in the target hard disk, and determines the target GPT partition table data according to the sector data; determines the partition table item association relationship according to the preset table conversion format; performs format conversion on the target GPT partition table data according to the partition table item association relationship to obtain the target MBR partition table; stores the target MBR partition table in the preset partition to complete the format conversion process of the target GPT partition table data. The technical solution of the embodiment of the present invention solves the problem of data loss and cumbersome operation steps in the process of converting the GPT partition table to the MBR partition table in the prior art, and can quickly and automatically realize the conversion of the GPT partition table to the MBR partition table without data loss, thereby improving the efficiency and accuracy of data conversion and providing support for the whole machine migration product.

[0050] Figure 3 It is a structural schematic diagram of a partition table conversion device provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the scenario of converting a GPT partition table into an MBR partition table. The device can be implemented by software and / or hardware and integrated into a computer device with application development function.

[0051] like Figure 3As shown, the partition table conversion device includes: a partition table acquisition module 310, a partition table conversion module 320 and a partition table storage module 330.

[0052] Among them, the partition table acquisition module 310 is used to obtain the target GPT partition table data; the partition table conversion module 320 is used to convert the format of the target GPT partition table data based on the preset table conversion format to obtain the target MBR partition table; wherein the preset table conversion format is used to convert the data from the GPT format to the MBR format; the partition table storage module 330 is used to store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0053] The technical solution provided by the embodiment of the present invention obtains the target GPT partition table data; performs format conversion on the target GPT partition table data based on a preset table conversion format to obtain the target MBR partition table; wherein the preset table conversion format is used to convert the data from the GPT format to the MBR format; and the target MBR partition table is stored in a preset partition to complete the format conversion process of the target GPT partition table data. The technical solution of the embodiment of the present invention solves the problem of data loss and cumbersome operation steps in the process of converting the GPT partition table to the MBR partition table in the prior art, and can quickly and automatically realize the conversion of the GPT partition table to the MBR partition table without data loss, thereby improving the efficiency and accuracy of data conversion and providing support for the whole machine migration product.

[0054] In an optional implementation, the partition table acquisition module 310 is specifically used to: obtain the target boot partition drive letter parameters; based on the target boot partition drive letter parameters, read sector data from the second sector in the target hard disk, and determine the target GPT partition table data based on the sector data.

[0055] In an optional embodiment, the partition table acquisition module 310 includes: a partition table construction unit, used to: determine the partition header data from the sector data based on a preset GPT partition header type, and the partition data corresponding to each partition header data; and construct the target GPT partition table data based on all the partition header data and the partition data.

[0056] In an optional embodiment, the partition table conversion module 320 is specifically used to: determine the partition table item association relationship according to the preset table conversion format; wherein the partition table item association relationship is used to represent the association relationship between the GPT partition table item and the MBR partition table item; and perform format conversion on the target GPT partition table data according to the partition table item association relationship to obtain the target MBR partition table.

[0057] In an optional embodiment, the partition table conversion module 320 includes: a format conversion unit, used to: create an initial MBR partition table; for each GPT partition table item in the target GPT partition table data, determine the corresponding MBR partition table item from the initial MBR partition table based on the partition table item association relationship; fill the partition data of the GPT partition table item into the fill column corresponding to the MBR partition table item to obtain the target MBR partition table.

[0058] In an optional implementation, the partition table storage module 330 is specifically used to: obtain partition table entry data in the target MBR partition table, and store the partition table entry data in the first sector of the target hard disk.

[0059] In an optional implementation, the MBR partition table entry includes at least one of an active partition, a starting CHS address, a partition type, an ending CHS address, a starting LBA, and a partition occupancy.

[0060] The partition table conversion device provided in the embodiment of the present invention can execute the partition table conversion method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0061] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 4 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capability and can be configured in the partition table conversion device.

[0062] like Figure 4 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0063] The bus 18 may be one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0064] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0065] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0066] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0067] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 20. Figure 4 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 4Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0068] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the partition table conversion method provided in the embodiment of the present invention, which includes:

[0069] Acquire target GPT partition table data; perform format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from GPT format to MBR format; store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0070] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the partition table conversion method provided in any embodiment of the present invention is implemented, including:

[0071] Acquire target GPT partition table data; perform format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from GPT format to MBR format; store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

[0072] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0073] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0074] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0075] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or combinations thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0076] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0077] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A partition table conversion method, characterized in that: include: Get the target GPT partition table data; Performing format conversion on the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from a GPT format to an MBR format; The target MBR partition table is stored in a preset partition to complete the format conversion process of the target GPT partition table data.

2. The method according to claim 1, characterized in that The step of obtaining target GPT partition table data includes: Get the drive letter parameters of the target boot partition; Based on the target boot partition drive letter parameter, sector data is read from the second sector in the target hard disk, and the target GPT partition table data is determined according to the sector data.

3. The method according to claim 2, characterized in that The step of determining the target GPT partition table data according to the sector data comprises: Determine partition header data from the sector data based on a preset GPT partition header type, and partition data corresponding to each partition header data; The target GPT partition table data is constructed according to all the partition table header data and the partition data.

4. The method according to claim 1, characterized in that: The method of converting the target GPT partition table data into a format based on a preset table conversion format to obtain a target MBR partition table includes: Determine the partition table item association relationship according to the preset table conversion format; wherein the partition table item association relationship is used to represent the association relationship between the GPT partition table item and the MBR partition table item; According to the partition table item association relationship, the target GPT partition table data is formatted to obtain a target MBR partition table.

5. The method according to claim 4, characterized in that The step of converting the target GPT partition table data into a format according to the partition table item association relationship to obtain a target MBR partition table includes: Create the initial MBR partition table; For each GPT partition table entry in the target GPT partition table data, based on the partition table entry association relationship, determine a corresponding MBR partition table entry from the initial MBR partition table; The partition data of the GPT partition table entry is filled into the filling column corresponding to the MBR partition table entry to obtain the target MBR partition table.

6. The method according to claim 2, characterized in that The storing the target MBR partition table in a preset partition comprises: The partition table entry data in the target MBR partition table is obtained, and the partition table entry data is stored in the first sector of the target hard disk.

7. The method according to claim 5, characterized in that The MBR partition table entry includes at least one of an active partition, a start CHS address, a partition type, an end CHS address, a start LBA, and a partition occupancy.

8. A partition table conversion device, characterized in that: The device comprises: A partition table acquisition module is used to obtain target GPT partition table data; A partition table conversion module, used for converting the format of the target GPT partition table data based on a preset table conversion format to obtain a target MBR partition table; wherein the preset table conversion format is used to convert data from a GPT format to an MBR format; The partition table storage module is used to store the target MBR partition table in a preset partition to complete the format conversion process of the target GPT partition table data.

9. A computer device, characterized in that: The computer device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the partition table conversion method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the partition table conversion method as described in any one of claims 1 to 7 is implemented.