CN108829351A - A kind of MBR disk turns the method and its system of GPT disk - Google Patents
A kind of MBR disk turns the method and its system of GPT disk Download PDFInfo
- Publication number
- CN108829351A CN108829351A CN201810564939.9A CN201810564939A CN108829351A CN 108829351 A CN108829351 A CN 108829351A CN 201810564939 A CN201810564939 A CN 201810564939A CN 108829351 A CN108829351 A CN 108829351A
- Authority
- CN
- China
- Prior art keywords
- disk
- mbr
- gpt
- subregion
- current
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0661—Format or protocol conversion arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A kind of MBR disk of the present invention turns the method and its system of GPT disk, and method includes the following steps:Step 1, judge whether the system of current computer supports MBR disk to turn GPT disk;Step 2, judge whether the district location on current MBR disk supports MBR disk to turn GPT disk;Step 3, read and save the partition information of MBR disk;Step 4, the partition table information of MBR disk is removed;It step 5, is GPT disk by MBR disk initialization;Step 6, the partition information of the MBR disk saved according to step 3 rebuilds GPT partition table;Step 7, the MBR disk if necessary to convert then needs to distribute drive into the disk where current system and guidance is repaired.The present invention can be operated directly on computers, and to realize the purpose that MBR disk is turned to GPT disk, simple to operate, use cost is lower.
Description
Technical field
The invention belongs to computer disk subregion fields, it particularly relates to which a kind of be by what MBR disk turned GPT disk
System and its method.
Background technique
Microsoft is proposed the PC desktop system Windows8 of a new generation in 2012, and Microsoft is releasing
While Windows8, disk partition technology --- the GPT of a new generation has been used(GUID Partition Table)Disk point
Area's format has used the MBR in many years to substitute(Master Boot Record)Disk partition format.Novel GPT subregion
The relatively traditional MBR partitioned mode of mode is all more excellent in terms of ease for use and scalability, therefore, novel GPT partitioned mode
It is gradually more and more popular with consumers.
Need first to remove all subregions ability on MBR disk to GPT disk in view of MBR disk is converted in view of Windows itself
The restricted problem that can be converted, application publication number CN104238952A, data of publication of application are the middle promulgated by the State Council on December 24th, 2014
Bright patent application discloses a kind of disk partition format conversion method, the method includes:It is read from hard disk and adapts to first
First disk partition table of disk partition format;It is closed according to the mapping of the first disk partition format and second disk zoned format
First disk partition table, is converted to the second disk partition table for adapting to second of disk zoned format by system;By hard disk by first
Disk partition format is converted to second disk zoned format;Hard disk is written into second disk partition table.Wherein the first disk partition
Format is MBR disk partition format, and second disk zoned format is GPT disk partition format, the method provided by the invention
MBR disk partition format can be converted into GPT disk partition format.But it has the following deficiencies:
1, need one electronic device of individually designed assembling, electronic device installation central processing unit, storage device, display,
Input unit, disk read-write interface and disk partition format conversion system when needing to carry out zoned format conversion, are needed hard disk
It is disassembled from computer, after then connecting with the disk read-write interface of electronic device, operation electronic device could will answer hard disk
The area MBR format be converted into GPT zoned format.The area the MBR format of hard disk is being converted into GPT using the device by apparent user
When zoned format, need to disassemble and install the hard disk on computer, operation is more troublesome.And user needs individually purchase one
Electronic device, higher operating costs.
2, if it is the disk where system(Disk where current system)Conversion also needs to reconfigure drawing for system
Information is led, is difficult to repair the boot configuration of the system after converting if it is amateur taxi, it is evident that user is after conversion
The probability that system cannot start is very high, easily leads to system failure.
Summary of the invention
The present invention in order to solve it is existing the area the MBR format of hard disk is converted into defect existing for the method for GPT zoned format,
The present invention provides a kind of methods that MBR disk turns GPT disk, can directly be operated on computers by this method, to realize
MBR disk is turned to the purpose of GPT disk, simple to operate, use cost is lower.
In order to solve the above technical problems, the technical scheme adopted by the invention is that:
A kind of method that MBR disk turns GPT disk, it is characterised in that:Described method includes following steps:
Step 1, judge whether the system of current computer supports MBR disk to turn GPT disk;
Step 2, the MBR disk converted if necessary then judges the subregion on current MBR disk into the disk where current system
MBR disk whether is supported to turn GPT disk in position;If necessary to the MBR disk converted into the disk where non-present system, then not
The step for execution;
Step 3, the partition information of MBR disk is read and saves, the MBR disk converted if necessary is the magnetic where current system
Disk is then needed necessary file copy to windows directory, and the MBR disk converted if necessary is the magnetic where non-present system
Disk does not need necessary file copy to windows directory then;
Step 4, the partition table information of MBR disk is removed;
It step 5, is GPT disk by MBR disk initialization;
Step 6, the partition information of the MBR disk saved according to step 3 rebuilds GPT partition table;
Step 7, the MBR disk if necessary to convert then needs to distribute drive into the disk where current system and guidance is repaired,
If necessary to the MBR disk converted into the disk where non-present system, then the step for execution.
The specific judgment method of step 1 is:Where judging disk and being disk or non-present system where current system
Disk, if it is the disk where non-present system, needing current system is that 2,003 64 systems of Windows or more are
System just supports MBR disk to turn GPT disk;If it is the disk where current system, need current system be Vista 64 and
Above 64 systems, and the Windows of current system Boot there are files required for System guides under EFI catalogue
Bootmgfw.efi and bootmgr.efi just supports MBR disk to turn GPT disk.
In step 2, if the district location on current MBR disk does not support MBR disk to turn GPT disk, need to be implemented
Subregion adjustment, specific method are:Judge the System subregion of the system of current computer separated with Boot subregion or regardless of
From;If separation, need that System zoned format is first melted into FAT32 file system, and set the type of the subregion to
EFI subregion;If do not separated, need first to judge Boot subregion later either with or without the free space of 100MB, if so, then straight
The FAT32 subregion that a 100MB is created on the clear position after Boot subregion is connect as EFI subregion, if Boot subregion
It then needs to detect whether current Boot subregion has enough unused storage spaces without free space later, if it is not, subregion
Adjustment failure if there is the tail portion of Boot subregion is then reduced 100BM by enough unused storage spaces, and uses the sky of this 100MB
Between create a FAT32 subregion be used as EFI subregion.
In step 2, if separation, need that System zoned format is first melted into FAT32 file system, and pass through and configure
The type of the subregion is set EFI subregion by the mode of GPT partition table, and specific method is:By the type of System subregion in GPT
EFI type is set on disk, each single item of each subregion in partition table is defined as follows:
struct GptTableItem
{
GUID PartitionType;The type of // the subregion
GUID UniqueGUID;The unique identification of // the subregion
UINT64 FirstLBA;The initial sector of // the subregion
UINT64 LastLBA;The end sector of // subregion
UINT64 Attributes;The attribute of // the subregion
WCHAR Name[GPT_NAME_SIZE];The title of // the subregion
};
{ c12a7328-f81f-11d2-ba4b-00a0c93ec93b } is set by the value of PartitionType, finally by this
This subregion has reformed into EFI subregion when in the partition table of item write-in GPT disk.
In step 3, the specific method for reading and saving the partition information of MBR disk is:By the subregion of the MBR disk of reading
Information uses DiskMgr(Disk administrator, behind be collectively referred to as DiskMgr)Unified management is found needs in DiskMgr and is turned
The MBR disk changed, clone needs the MBR disk converted from DiskMgr.
In step 3, the recovery for also needing to back up original system in the specific method of the partition information of MBR disk is read and saved
The BCD copy that environment and being transformed into needs after GPT, if the recovery environment of original system is present in System subregion, need by
Recovery catalogue in System subregion all copies in the Recovery catalogue of the root of Boot subregion, is converted into
Again by the recovery environment remediation of system after function, it is ensured that the integrality of system function.
In step 3, necessary file copy to windows directory is referred to the 2GPT_BCD file copy in installation directory
To the windows directory of current system.
In step 4, the specific method for removing the partition table information of MBR disk is:Preceding 34 sectors on disk are read
0 is filled out after backup into memory, removes the partition table of MBR disk.It is true in order to retain with removing the main mesh of MBR partition table
Subregion but allow the disk to be expressed as one piece of blank diskette, be in order to call conversion function that can succeed below, and for
GPT disk partition table is initialized, in order to avoid partition information wrong caused by residual risk.
In step 5, it is by the specific method that MBR disk initialization is GPT disk:Call Windows's
DeviceIoControl function and incoming control code IOCTL_DISK_CREATE_DISK, set initiation parameter to
PARTITION_STYLE_GPT。
In step 5, after setting PARTITION_STYLE_GPT for initiation parameter, the table if function returns successfully
Show and initialize successfully, is written back to the partition table information backuped in memory in step 4 currently if function call failure
Disk, it is ensured that the integrality of user data.
In step 6, when rebuilding GPT partition table, the MBR disk converted if necessary is the magnetic where current system
Disk, then manual organization partition table information and by the direct regeneration block table of written document function of system, if necessary to the MBR of conversion
Disk is the disk where non-present system, calls directly the DeviceIoControl function of system and uses control code
IOCTL_DISK_SET_DRIVE_LAYOUT_EX regeneration block table.
In step 6, manual organization partition table information simultaneously passes through the specific of the direct regeneration block table of written document function of system
Method is:The GptTableItem array of building one 128, each single item represent a subregion, by the type of each subregion, only
One mark, terminates sector auxiliary information, attribute, title at initial sector, and the 3rd sector of the disk then is written in this array and is started
Continuous 32 sectors in, the mark of GPT with the GPT disk in MBR are constructed and are written after success to be written again.
In step 7, the specific method of the distribution drive is:It is notified according to the Arc Number of System subregion
The MountPointManager of Windows registers new equipment, then distributes drive for new equipment.
In step 7, the specific method that the guidance is repaired is:First in the catalogue of System partition creating such as flowering structure:
EFI
┏━┻━┓
┃ ┃
Boot Microsoft
┃
Boot
By Windows in current system Boot EFI bootmgfw.efi copy to EFI renamed as under Boot catalogue
Bootx64.efi, then by EFI All Files under Boot catalogue in addition to bootmgfw.efi copy to EFI
Microsoft under Boot catalogue, will be copied in step 3 the BCD file copy of windows directory to EFI Microsft
Boot catalogue and renamed as BCD filename.
BCD is repaired:In order to solve the problems, such as System guides, need be according to current to the BCD file for copying System to
The initial position of system subregion is reconfigured, since this BCD file is customized by depth, so only needing File Open
Search key is simultaneously substituted for corresponding value;
Drive reparation:By the partition information of the original disk of reservation registration table HKEY_LOCAL_MACHINE SYSTEM
Corresponding key assignments is found in the position MountedDevices, and is updated to the data after conversion, is finished above step and is restarted
System and the start-up mode that BIOS is arranged are that UEFI completes lossless conversion.
Technical term is explained:
System subregion:Refer to boot partition.
Boot subregion:Subregion where referring to system.
In order to realize above-mentioned steps, the present invention provides the systems that a kind of MBR disk turns GPT disk, it is characterised in that:Packet
Include disk read-write module, disk administrator, file system module and conversion module;
The disk read-write module is used to be responsible for the read-write of disk sector;
The disk administrator is for constructing disk and partition information;
The file system module is used to provide the creation of respective file system, is sized, and responsible MBR turns the creation of GPT
The size of FAT32 file system and adjustment Boot subregion;
The MBR zoned format of disk is changed into GPT zoned format for being responsible for by the conversion module.
It further include Native module, which supports for providing system in the display of Native environment and running environment.
It further include guidance repair module, the module is for being responsible for ensuring that system can normally start after converting.
It further include systems inspection module and disk check module, whether the systems inspection module is for judging current system
It supports to change into the MBR zoned format of disk into GPT zoned format, the disk check module is for judging that when front disk be current
The disk where disk or non-present system where system.
Compared with prior art, the invention has the advantages that:
The method provided through the invention can be operated directly on computers, to realize the mesh that MBR disk is turned to GPT disk
, it does not need user and disassembles disk from computer to convert, be installed again after converting on computers, time saving province
Power, user use very convenient.The present invention also provides the systems that a kind of MBR disk turns GPT disk, which is mounted on
On computer, above-mentioned steps can be realized, after being installed, user need to only select that the MBR disk converted is needed to can be realized certainly
Turn is changed, simple to operate.Since the present invention is pure software structure, do not need to install and buy other hardware, use cost
It is substantially reduced for compared with the existing technology.The present invention converts the reparation of rear automatic realizing system guidance information, and user is not
It needs by equal tripartites or oneself repairs manually, time cost is greatly saved and improves the stability of system.
Detailed description of the invention
Fig. 1 is process flow chart of the invention.
Specific embodiment
The present invention will be further described with reference to the examples below, and described embodiment is only present invention a part
Embodiment is not whole embodiment.Based on the embodiments of the present invention, those skilled in the art are not making
Other embodiments used obtained, belong to protection scope of the present invention under the premise of creative work.
The present invention provides the methods that MBR disk can directly be turned GPT disk by one kind on computers, specially:
Step 1, judge whether the system of current computer supports MBR disk to turn GPT disk, specific Rule of judgment is:
Judge that disk is the disk where current system or the disk where non-present system(Can be with artificial judgment, it can also be with
System judges automatically), if it is the disk where non-present system, needing current system is 2,003 64 systems of Windows
And system above just supports MBR disk to turn GPT disk;If it is the disk where current system, needing current system is Vista
64 or more 64 systems, and the Windows of current system Boot there are texts required for System guides under EFI catalogue
Part bootmgfw.efi and bootmgr.efi just support MBR disk to turn GPT disk;
Step 2, whether district location of the judgement on the front disk supports MBR disk to turn GPT disk, is then to enter step 3, no,
Subregion adjustment is then executed, is successfully entering step 3 if adjusted, is terminated if adjusting failure;Only when front disk is current
Disk where system just executes the step, does not execute the step then if it is the disk where non-present system;
Executing the specific method that subregion adjusts is:The System subregion and Boot subregion for judging the system of current computer are to separate
Still it does not separate;If separation, need that System zoned format is first melted into FAT32 file system, and pass through GP configuring T points
The type of the subregion is set EFI subregion by the mode of area's table;If do not separated, need first to judge have not after Boot subregion
There is the free space of 100MB, if so, then creating the FAT32 of a 100MB directly on the clear position after Boot subregion
Subregion is used as EFI subregion, needs to detect whether current Boot subregion has enough if not having free space after Boot subregion
Unused storage space, if it is not, subregion adjustment failure, if there is enough unused storage spaces are then by the tail portion of Boot subregion
100BM is reduced, and is used as EFI subregion using the subregion that the space of this 100MB creates a FAT32;
EFI subregion is set by the type of the subregion by way of GP configuring T partition table, specific method is:By System points
The type in area is set to EFI type on GPT disk, and each single item of each subregion in partition table is defined as follows:
struct GptTableItem
{
GUID PartitionType;The type of // the subregion
GUID UniqueGUID;The unique identification of // the subregion
UINT64 FirstLBA;The initial sector of // the subregion
UINT64 LastLBA;The end sector of // subregion
UINT64 Attributes;The attribute of // the subregion
WCHAR Name[GPT_NAME_SIZE];The title of // the subregion
};
{ c12a7328-f81f-11d2-ba4b-00a0c93ec93b } is set by the value of PartitionType, finally by this
This subregion has reformed into EFI subregion when in the partition table of item write-in GPT disk;
Step 3, the partition information of MBR disk is read and saves, the MBR disk converted if necessary is the magnetic where current system
Disk is then needed necessary file copy to windows directory, and the MBR disk converted if necessary is the magnetic where non-present system
Disk does not need necessary file copy to windows directory then;
The specific method for reading and saving the partition information of MBR disk is:The partition information of the MBR disk of reading is used
DiskMgr(Disk administrator, behind be collectively referred to as DiskMgr)The MBR for needing to convert is found in unified management in DiskMgr
Disk, clone needs the MBR disk converted from DiskMgr, and clone needs the disk converted, main mesh from DiskMgr
Be in order to save original disk partition information facilitate convert successfully after rebuild partition table suitable for GPT disk;
It reads and saves the recovery environment for also needing to back up original system in the specific method of the partition information of MBR disk and be transformed into
The BCD copy needed after GPT, if the recovery environment of original system is present in System subregion, needing will be in System subregion
Recovery catalogue all copies in the Recovery catalogue of the root of Boot subregion, again by system after success to be converted
Recovery environment remediation, it is ensured that the integrality of system function.
Necessary file copy to windows directory is referred to the 2GPT_BCD file copy in installation directory to current system
The windows directory of system;
Step 4, the partition table information of MBR disk is removed, specially:By before on disk 34(It is opened from the 1st sector of the disk
Continuous 34 sectors begun)A sector fills out 0 after being read into memory backup, removes the partition table of MBR disk.Remove MBR points
It is the main mesh of area's table to retain true subregion and the disk is but allowed to be expressed as one piece of blank diskette, is to call turn below
Changing function can succeed, and for initialization GPT disk partition table, in order to avoid subregion letter wrong caused by residual risk
Breath.
Step 5, it calls the initialization function of system for computer that current MBR disk is reinitialized to GPT disk, has
Body is:The DeviceIoControl function of Windows and incoming control code IOCTL_DISK_CREATE_DISK are called, it will be first
Beginningization parameter is set as PARTITION_STYLE_GPT, indicates to initialize successfully if function returns successfully, if function tune
Then the partition table information backuped in memory in step 4 be written back to worked as front disk with failure, it is ensured that user data it is complete
Property;
Step 6, the partition information of the MBR disk saved according to step 3 rebuilds GPT partition table;If necessary to the MBR of conversion
Disk of the disk where current system, then manual organization partition table information and the written document function by system, which directly update, divides
Area's table, the MBR disk if necessary to convert call directly system into the disk where non-present system
DeviceIoControl function simultaneously uses control code IOCTL_DISK_SET_DRIVE_LAYOUT_EX regeneration block table;Manually
It organizes partition table information and is by the specific method of the direct regeneration block table of the written document function of system:Building one 128
GptTableItem array, each single item represents a subregion, by the type of each subregion, unique identification, initial sector, end
Then sector auxiliary information, attribute, title this array are written in continuous 32 sectors that the 3rd sector of the disk starts, to be written
The mark of the GPT disk in GPT and MBR is constructed and is written after entering successfully again;
Step 7, the MBR disk if necessary to convert then needs to distribute drive into the disk where current system and guidance is repaired,
If necessary to the MBR disk converted into the disk where non-present system, then the step for execution;
In step 7, the specific method of the distribution drive is:Windows is notified according to the Arc Number of the System subregion
MountPointManager register new equipment, be then that new equipment distributes drive;
In step 7, the specific method that the guidance is repaired is:First in the catalogue of System partition creating such as flowering structure:
EFI
┏━┻━┓
┃ ┃
Boot Microsoft
┃
Boot
By Windows in current system Boot EFI bootmgfw.efi copy to EFI renamed as under Boot catalogue
Bootx64.efi, then by EFI All Files under Boot catalogue in addition to bootmgfw.efi copy to EFI
Microsoft under Boot catalogue, will be copied in step 3 the BCD file copy of windows directory to EFI Microsft
Boot catalogue and renamed as BCD filename;
BCD is repaired:In order to solve the problems, such as System guides, need to divide the BCD file for copying System to according to current system
The initial position in area is reconfigured, since this BCD file is customized by depth, so only needing to search for File Open
Keyword is simultaneously substituted for corresponding value;
Drive reparation:By the partition information of the original disk of reservation registration table HKEY_LOCAL_MACHINE SYSTEM
Corresponding key assignments is found in the position MountedDevices, and is updated to the data after conversion, is finished above step and is restarted
System and the start-up mode that BIOS is arranged are that UEFI completes lossless conversion.
In order to realize above-mentioned steps, the present invention provides the systems that a kind of MBR disk turns GPT disk, it is characterised in that:Packet
Include disk read-write module, disk administrator, file system module and conversion module;
The disk read-write module is used to be responsible for the read-write of disk sector;
The disk administrator is for constructing disk and partition information;
The file system module is used to provide the creation of respective file system, is sized, and responsible MBR turns the creation of GPT
The size of FAT32 file system and adjustment Boot subregion;
The MBR zoned format of disk is changed into GPT zoned format for being responsible for by the conversion module.
It further include Native module, which supports for providing system in the display of Native environment and running environment.
It further include guidance repair module, the module is for being responsible for ensuring that system can normally start after converting.
It further include systems inspection module and disk check module, whether the systems inspection module is for judging current system
It supports to change into the MBR zoned format of disk into GPT zoned format, the disk check module is for judging that when front disk be current
The disk where disk or non-present system where system.
Claims (10)
1. a kind of method that MBR disk turns GPT disk, it is characterised in that:Described method includes following steps:
Step 1, judge whether the system of current computer supports MBR disk to turn GPT disk;
Step 2, the MBR disk converted if necessary then judges the subregion on current MBR disk into the disk where current system
MBR disk whether is supported to turn GPT disk in position;If necessary to the MBR disk converted into the disk where non-present system, then not
The step for execution;
Step 3, the partition information of MBR disk is read and saves, the MBR disk converted if necessary is the magnetic where current system
Disk is then needed necessary file copy to windows directory, and the MBR disk converted if necessary is the magnetic where non-present system
Disk does not need necessary file copy to windows directory then;
Step 4, the partition table information of MBR disk is removed;
It step 5, is GPT disk by MBR disk initialization;
Step 6, the partition information of the MBR disk saved according to step 3 rebuilds GPT partition table;
Step 7, the MBR disk if necessary to convert then needs to distribute drive into the disk where current system and guidance is repaired,
If necessary to the MBR disk converted into the disk where non-present system, then the step for execution.
2. the method that a kind of MBR disk according to claim 1 turns GPT disk, it is characterised in that:Step 1 is specifically sentenced
Disconnected method is:Judge that disk is the disk where current system or the disk where non-present system, if it is non-present system
Disk where uniting, needing current system is that 2,003 64 systems of Windows and system above just support MBR disk to turn GPT
Disk;If it is the disk where current system, needing current system is Vista 64 or more 64 systems, and current
The Windows of system Boot under EFI catalogue there are file bootmgfw.efi required for System guides and
Bootmgr.efi just supports MBR disk to turn GPT disk.
3. the method that a kind of MBR disk according to claim 1 turns GPT disk, it is characterised in that:In step 2, if worked as
District location on preceding MBR disk does not support MBR disk to turn GPT disk, then needs to be implemented subregion adjustment, and specific method is:Sentence
The System subregion of the system of disconnected current computer is separated with Boot subregion or is not separated;If separation, first will need
System zoned format is melted into FAT32 file system, and sets EFI subregion for the type of the subregion;If do not separated, need
Boot subregion is first judged later either with or without the free space of 100MB, if so, the then spare bits directly after Boot subregion
The FAT32 subregion for setting one 100MB of creation is used as EFI subregion, needs to examine if not having free space after Boot subregion
Survey whether current Boot subregion there are enough unused storage spaces, if it is not, subregion adjustment failure, does not make if there is enough
The tail portion of Boot subregion is then reduced into 100BM with space, and is used as using the subregion that the space of this 100MB creates a FAT32
EFI subregion.
4. the method that a kind of MBR disk according to claim 1 turns GPT disk, it is characterised in that:In step 3, read simultaneously
The specific method of partition information for saving MBR disk is:The partition information of the MBR disk of reading is managed using DiskMgr is unified
Reason finds the MBR disk for needing to convert in DiskMgr, and clone needs the MBR disk converted from DiskMgr, then backs up
The recovery environment of original system is copied with the BCD needed after GPT is transformed into, if the recovery environment of original system is present in System points
Area needs all to copy the Recovery catalogue in System subregion to the Recovery catalogue of the root of Boot subregion
In, again by the recovery environment remediation of system after success to be converted, it is ensured that the integrality of system function.
5. the method that a kind of MBR disk according to claim 1 turns GPT disk, it is characterised in that:In step 5, by MBR
Disk initialization is that the specific method of GPT disk is:Call the DeviceIoControl function of Windows and incoming control code
Initiation parameter is set PARTITION_STYLE_GPT by IOCTL_DISK_CREATE_DISK.
6. the method that a kind of MBR disk according to claim 5 turns GPT disk, it is characterised in that:It, will be initial in step 5
After change parameter is set as PARTITION_STYLE_GPT, indicate to initialize successfully if function returns successfully, if function tune
Then the partition table information backuped in memory in step 4 be written back to worked as front disk with failure, it is ensured that user data it is complete
Property.
7. the method that a kind of MBR disk according to claim 1 turns GPT disk, it is characterised in that:In step 7, described point
Specific method with drive is:The MountPointManager note of Windows is notified according to the Arc Number of System subregion
The new equipment of volume, then distributes drive for new equipment.
8. the system that a kind of MBR disk turns GPT disk, it is characterised in that:Including disk read-write module, disk administrator, file
System module and conversion module;
The disk read-write module is used to be responsible for the read-write of disk sector;
The disk administrator is for constructing disk and partition information;
The file system module is used to provide the creation of respective file system, is sized, and responsible MBR turns the creation of GPT
The size of FAT32 file system and adjustment Boot subregion;
The MBR zoned format of disk is changed into GPT zoned format for being responsible for by the conversion module.
9. the system that a kind of MBR disk according to claim 8 turns GPT disk, it is characterised in that:It further include that guidance is repaired
Module, the module is for being responsible for ensuring that system can normally start after converting.
10. the system that a kind of MBR disk according to claim 8 turns GPT disk, it is characterised in that:It further include system inspection
Module and disk check module are looked into, the systems inspection module is for judging whether current system is supported the MBR subregion of disk
Format changes into GPT zoned format, the disk check module be used to judge to work as front disk be disk where current system or
Disk where non-present system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810564939.9A CN108829351B (en) | 2018-06-04 | 2018-06-04 | Method for converting MBR disk into GPT disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810564939.9A CN108829351B (en) | 2018-06-04 | 2018-06-04 | Method for converting MBR disk into GPT disk |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108829351A true CN108829351A (en) | 2018-11-16 |
CN108829351B CN108829351B (en) | 2021-10-12 |
Family
ID=64144000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810564939.9A Active CN108829351B (en) | 2018-06-04 | 2018-06-04 | Method for converting MBR disk into GPT disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108829351B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112328287A (en) * | 2020-11-24 | 2021-02-05 | 杭州海康威视数字技术股份有限公司 | Embedded equipment system updating method, device, equipment and storage medium |
CN112416657A (en) * | 2020-12-09 | 2021-02-26 | 成都傲梅科技有限公司 | System cloning method |
CN112445677A (en) * | 2019-09-04 | 2021-03-05 | 中国石油化工股份有限公司 | Health state checking and repairing method of computer cluster and storage medium |
CN114924914A (en) * | 2022-05-31 | 2022-08-19 | 广州鼎甲计算机科技有限公司 | Disk partition table information backup and recovery method and system |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591691A (en) * | 2011-12-31 | 2012-07-18 | 曙光信息产业股份有限公司 | Hard disc starting method and operation system starting and loading method based on basic input/output system (BIOS) |
CN103268241A (en) * | 2013-05-28 | 2013-08-28 | 山东超越数控电子有限公司 | Method for achieving hiding or display of hard disk partitions in BIOS |
CN104238952A (en) * | 2013-06-06 | 2014-12-24 | 鸿富锦精密工业(武汉)有限公司 | Magnetic disk partition format switching method and system |
CN104348902A (en) * | 2013-07-23 | 2015-02-11 | 英特尔公司 | Techniques for moving data between a network input/output device and a storage device |
CN105446758A (en) * | 2014-08-29 | 2016-03-30 | 昆达电脑科技(昆山)有限公司 | Method for installing operating system |
US9304703B1 (en) * | 2015-04-15 | 2016-04-05 | Symbolic Io Corporation | Method and apparatus for dense hyper IO digital retention |
EP3057270A1 (en) * | 2015-02-12 | 2016-08-17 | Intel Corporation | Technologies for modular forwarding table scalability |
CN105912428A (en) * | 2016-05-20 | 2016-08-31 | 上海数腾软件科技股份有限公司 | System and method for converting source data into mirror image of virtual machine in real time |
CN107193506A (en) * | 2017-06-22 | 2017-09-22 | 山东超越数控电子有限公司 | A kind of implementation method for kylin system root partition dilatation of getting the bid |
CN107436761A (en) * | 2017-07-01 | 2017-12-05 | 武汉噢易云计算股份有限公司 | The management method that UEFI systems based on UEFI mainboards coexist with legacy system |
CN107870739A (en) * | 2017-03-15 | 2018-04-03 | 珠海市杰理科技股份有限公司 | Disk file storage method and system |
-
2018
- 2018-06-04 CN CN201810564939.9A patent/CN108829351B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591691A (en) * | 2011-12-31 | 2012-07-18 | 曙光信息产业股份有限公司 | Hard disc starting method and operation system starting and loading method based on basic input/output system (BIOS) |
CN103268241A (en) * | 2013-05-28 | 2013-08-28 | 山东超越数控电子有限公司 | Method for achieving hiding or display of hard disk partitions in BIOS |
CN104238952A (en) * | 2013-06-06 | 2014-12-24 | 鸿富锦精密工业(武汉)有限公司 | Magnetic disk partition format switching method and system |
CN104348902A (en) * | 2013-07-23 | 2015-02-11 | 英特尔公司 | Techniques for moving data between a network input/output device and a storage device |
CN105446758A (en) * | 2014-08-29 | 2016-03-30 | 昆达电脑科技(昆山)有限公司 | Method for installing operating system |
EP3057270A1 (en) * | 2015-02-12 | 2016-08-17 | Intel Corporation | Technologies for modular forwarding table scalability |
US9304703B1 (en) * | 2015-04-15 | 2016-04-05 | Symbolic Io Corporation | Method and apparatus for dense hyper IO digital retention |
CN105912428A (en) * | 2016-05-20 | 2016-08-31 | 上海数腾软件科技股份有限公司 | System and method for converting source data into mirror image of virtual machine in real time |
CN107870739A (en) * | 2017-03-15 | 2018-04-03 | 珠海市杰理科技股份有限公司 | Disk file storage method and system |
CN107193506A (en) * | 2017-06-22 | 2017-09-22 | 山东超越数控电子有限公司 | A kind of implementation method for kylin system root partition dilatation of getting the bid |
CN107436761A (en) * | 2017-07-01 | 2017-12-05 | 武汉噢易云计算股份有限公司 | The management method that UEFI systems based on UEFI mainboards coexist with legacy system |
Non-Patent Citations (3)
Title |
---|
BRUCE J.NIKKEL: "《Forensic analysis of GPT disks and GUID partition tables》", 《DIGITAL INVESTIGATION》 * |
余立强: "《正确设置EFI BIOS与Legacy BIOS安装Windows***》", 《教育教学论坛》 * |
张伟: "《免重装*** 手把手教你MBR转GPT分区表》", 《中关村在线》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112445677A (en) * | 2019-09-04 | 2021-03-05 | 中国石油化工股份有限公司 | Health state checking and repairing method of computer cluster and storage medium |
CN112328287A (en) * | 2020-11-24 | 2021-02-05 | 杭州海康威视数字技术股份有限公司 | Embedded equipment system updating method, device, equipment and storage medium |
CN112328287B (en) * | 2020-11-24 | 2024-05-03 | 杭州海康威视数字技术股份有限公司 | Method, device, equipment and storage medium for updating embedded equipment system |
CN112416657A (en) * | 2020-12-09 | 2021-02-26 | 成都傲梅科技有限公司 | System cloning method |
CN114924914A (en) * | 2022-05-31 | 2022-08-19 | 广州鼎甲计算机科技有限公司 | Disk partition table information backup and recovery method and system |
Also Published As
Publication number | Publication date |
---|---|
CN108829351B (en) | 2021-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0901073B1 (en) | Method for automatically installing and transferring data to a computer disk drive | |
CN108829351A (en) | A kind of MBR disk turns the method and its system of GPT disk | |
US6851073B1 (en) | Extensible system recovery architecture | |
US6205527B1 (en) | Intelligent backup and restoring system and method for implementing the same | |
US6820214B1 (en) | Automated system recovery via backup and restoration of system state | |
CN102576322B (en) | Proxy backup of virtual disk image files on NAS devices | |
US7000231B1 (en) | Method of manufacturing operating system master template, method of manufacturing a computer entity and product resulting therefrom, and method of producing a production version of an operating system | |
TWI250451B (en) | Method and system for creating and employing an operating system having selected functionality | |
TW408286B (en) | Software pre-installation method | |
US5907679A (en) | Hard drive upgrade system | |
US20060288168A1 (en) | Transportable computing environment | |
US20040098426A1 (en) | Backup system, backup method, program for backup, and backup service provision system | |
US20050235281A1 (en) | Combined software installation package | |
CN100583041C (en) | Device and method for configuring software in computer system | |
CN101770384A (en) | Car audio system and software upgrading method thereof | |
CN105138431A (en) | Linux system back-up and restoring method | |
CN103250134A (en) | Upgrade of software images based on streaming technique | |
CN107463467A (en) | A kind of method and system that can quickly reduce virtual platform | |
CN104077196A (en) | Linux boot failure recovering method and device | |
US6976145B1 (en) | Method and apparatus for automatically configuring data storage subsystems | |
CN112527366B (en) | Update rollback fault tolerant design technique for embedded processor boot | |
US20060069902A1 (en) | Method for recovering operating system and user data executed in a computer and its recovery system thereof | |
CN100504787C (en) | Virtual executing method for installing software, and system | |
CN100336036C (en) | Multiple operating system boot loading method | |
CN102681859A (en) | Method for starting Windows operation systems from USB (universal serial bus) mass storage device |
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 |