CN105095017A - Partition table based hard disk repair method and apparatus - Google Patents
Partition table based hard disk repair method and apparatus Download PDFInfo
- Publication number
- CN105095017A CN105095017A CN201410223513.9A CN201410223513A CN105095017A CN 105095017 A CN105095017 A CN 105095017A CN 201410223513 A CN201410223513 A CN 201410223513A CN 105095017 A CN105095017 A CN 105095017A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- partition table
- mbr
- information
- normal
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a partition table based hard disk repair method and apparatus and relates to the technical field of hard disks. The method comprises the following steps of: during the start-up period of a hard disk, performing detection on information of a master boot sector MBR of the hard disk to judge whether the hard disk is normal; if judging the MBR of the hard disk is abnormal, reducing a partition table in the MBR of the hard disk to a backup partition table that is previously saved so as to continuously execute a hard disk start-up operation by utilizing the previously saved backup partition table; and if judging the MBR of the hard disk is normal, saving the partition table in the MBR of the normal hard disk as a backup partition table used for next hard disk startup. According to the present invention, hard disk software faults, such as abnormality of partition table information, can be simply and effectively repaired, thereby improving user experience.
Description
Technical field
The present invention relates to seagate field, particularly a kind of Hard Disk Repair method based on partition table and device.
Background technology
Hard disk, as a kind of main storage medium, is employed extensively in the product of various band memory function.
But due to destruction or the operational error of virus, often easily make hard disk main bootstrap program and partition table become the object of virus attack, be tampered even destroyed, cause hard disk to start.
In this case, need a kind of simple and effective hard disk to detect restorative procedure and carry out disk recovery.
Summary of the invention
The object of the present invention is to provide a kind of Hard Disk Repair method based on partition table and device, the problem that cannot normally start after solving the exception occurred in hard disk use procedure in prior art.
According to an aspect of the present invention, provide a kind of Hard Disk Repair method based on partition table, comprise the following steps:
During hard disk startup, hard disk master boot sector MBR information is detected, to judge that whether hard disk is normal;
If judge, described hard disk MBR is abnormal, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continues to perform hard disk startup operation at the backup partition table of front preservation to utilize;
If judge, described hard disk MBR is normal, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.
Preferably, also comprise:
Judge that whether the effective marker position in described hard disk MBR information is effective;
When judging that the effective marker position in described hard disk MBR information is effective, described hard disk MBR information is detected.
Preferably, also comprise:
Read the normal partition table information file of hard disk;
Normal for read hard disk partition table information file is kept in other storeies.
Preferably, described being reduced to by partition table in described hard disk MBR comprises at the backup partition table of front preservation:
Reading and saving is normal partition table information file in other storeies described;
Read normal partition table information is reverted in described abnormal partition table information.
Preferably, described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.
According to a further aspect in the invention, provide a kind of Hard Disk Repair device based on partition table, comprising:
Detection module, for during hard disk startup, detects hard disk master boot sector MBR information, to judge that whether hard disk is normal;
Repair process module, judge that described hard disk MBR is abnormal for working as, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continue to perform hard disk startup operation at the backup partition table of front preservation to utilize, and when judging that described hard disk MBR is normal, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.
Preferably, also comprise:
Judge effective marker position module, whether effective for judging the effective marker position in described hard disk MBR information, and when judging that the effective marker position in described hard disk MBR information is effective, described hard disk MBR information is detected.
Preferably, also comprise:
Preserving partition table information module, for reading the normal partition table information file of hard disk, and normal for read hard disk partition table information file being kept in other storeies.
Preferably, described repair process module comprises:
Reading unit, for reading and saving normal partition table information file in other storeies described;
Reduction unit, for reverting to read normal partition table information in described abnormal partition table information.
Preferably, described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.
Compared with prior art, beneficial effect of the present invention is:
The present invention, for the hard disk software fault of partition information exception and so on, repairs effectively simple, improves Consumer's Experience.
Accompanying drawing explanation
Fig. 1 is a kind of Hard Disk Repair method flow diagram based on partition table provided by the invention;
Fig. 2 is a kind of Hard Disk Repair device schematic diagram based on partition table provided by the invention;
Fig. 3 is the Hard Disk Repair method flow diagram that the embodiment of the present invention provides.
Embodiment
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, should be appreciated that following illustrated preferred embodiment is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 1 shows a kind of Hard Disk Repair method flow diagram based on partition table provided by the invention, as shown in Figure 1, comprises the following steps:
Step S101: during hard disk startup, detects hard disk master boot sector MBR information, to judge that whether hard disk is normal;
Described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.
Step S102: described hard disk MBR is abnormal if judge, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continues to perform hard disk startup operation at the backup partition table of front preservation to utilize;
Described being reduced to by the partition table in described hard disk MBR comprises at the backup partition table of front preservation: reading and saving is normal partition table information file in other storeies described; Read normal partition table information is reverted in described abnormal partition table information.
Step S103: described hard disk MBR is normal if judge, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.
The present invention also comprises: judge that whether the effective marker position in described hard disk MBR information is effective; When judging that the effective marker position in described hard disk MBR information is effective, described hard disk MBR information is detected.
The present invention also comprises: read the normal partition table information file of hard disk; Normal for read hard disk partition table information file is kept in other storeies.
Fig. 2 shows a kind of Hard Disk Repair device schematic diagram based on partition table provided by the invention, as shown in Figure 2, comprising: detection module 201, for during hard disk startup, detects hard disk master boot sector MBR information, to judge that whether hard disk is normal; Wherein, described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.Repair process module 202, judge that described hard disk MBR is abnormal for working as, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continue to perform hard disk startup operation at the backup partition table of front preservation to utilize, and when judging that described hard disk MBR is normal, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.Specifically, described repair process module 202 comprises: reading unit, for reading and saving normal partition table information file in other storeies described; Reduction unit, for reverting to read normal partition table information in described abnormal partition table information.
Whether the present invention also comprises: judge effective marker position module, effective for judging the effective marker position in described hard disk MBR information, and when judging that the effective marker position in described hard disk MBR information is effective, detects described hard disk MBR information.Preserving partition table information module, for reading the normal partition table information file of hard disk, and normal for read hard disk partition table information file being kept in other storeies.
Fig. 3 shows the Hard Disk Repair method flow diagram that the embodiment of the present invention provides, as shown in Figure 3, utilize partition table information and latter two byte 55, the effective end mark of AA subregion of 64 bytes in hard disk MBR (Master boot sector), fdisk effectiveness of information is detected and is repaired, specifically comprises the following steps:
Step S301: back up normal hard disk partition table;
Read 64 the byte partitions table information of hard disk under normal circumstances from 0x1be position, backing up to the place beyond hard disk, can be product internal memory or other memory devices.
Step S302: detect hard disk MBR information;
Read hard disk MBR information, totally 512 bytes.First judge that whether partition table is effective, namely whether the effective marker position of hard disk is effective, that is last two bytes (skew 1FEH-offsets 1FFH) " 55, AA ", then check the geological information and subregion contents in table that obtain disk, comprise 4 subregion list item information.
Step S303: if detect normal, then again back up partition table information file;
Step S304: if testing result is abnormal, reduction partition table.
Reduction partition table, is the partition table information file reading backup, by 64 byte content read, is written back to abnormal hard disk MBR from 0x1be position.
In sum, the present invention has following technique effect:
The present invention, by backing up partition table information, when detecting that hard disk occurs abnormal, utilizes the hard disk of the partition table information of described backup to exception to repair, effectively simple to operate, improves Consumer's Experience.
Although above to invention has been detailed description, the present invention is not limited thereto, those skilled in the art of the present technique can carry out various amendment according to principle of the present invention.Therefore, all amendments done according to the principle of the invention, all should be understood to fall into protection scope of the present invention.
Claims (10)
1., based on a Hard Disk Repair method for partition table, it is characterized in that, comprise the following steps:
During hard disk startup, hard disk master boot sector MBR information is detected, to judge that whether hard disk is normal;
If judge, described hard disk MBR is abnormal, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continues to perform hard disk startup operation at the backup partition table of front preservation to utilize;
If judge, described hard disk MBR is normal, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.
2. method according to claim 1, is characterized in that, also comprises:
Judge that whether the effective marker position in described hard disk MBR information is effective;
When judging that the effective marker position in described hard disk MBR information is effective, described hard disk MBR information is detected.
3. method according to claim 2, is characterized in that, also comprises:
Read the normal partition table information file of hard disk;
Normal for read hard disk partition table information file is kept in other storeies.
4. method according to claim 3, is characterized in that, described being reduced to by the partition table in described hard disk MBR comprises at the backup partition table of front preservation:
Reading and saving is normal partition table information file in other storeies described;
Read normal partition table information is reverted in described abnormal partition table information.
5. the method described arbitrarily according to claim 1-4, it is characterized in that, described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.
6., based on a Hard Disk Repair device for partition table, it is characterized in that, comprising:
Detection module, for during hard disk startup, detects hard disk master boot sector MBR information, to judge that whether hard disk is normal;
Repair process module, judge that described hard disk MBR is abnormal for working as, then the partition table in described hard disk MBR is reduced to the backup partition table in front preservation, continue to perform hard disk startup operation at the backup partition table of front preservation to utilize, and when judging that described hard disk MBR is normal, then the partition table in described normal hard disk MBR is saved as the backup partition table for next hard disk startup.
7. device according to claim 6, is characterized in that, also comprises:
Judge effective marker position module, whether effective for judging the effective marker position in described hard disk MBR information, and when judging that the effective marker position in described hard disk MBR information is effective, described hard disk MBR information is detected.
8. device according to claim 6, is characterized in that, also comprises:
Preserving partition table information module, for reading the normal partition table information file of hard disk, and normal for read hard disk partition table information file being kept in other storeies.
9. device according to claim 7, is characterized in that, described repair process module comprises:
Reading unit, for reading and saving normal partition table information file in other storeies described;
Reduction unit, for reverting to read normal partition table information in described abnormal partition table information.
10. the method described arbitrarily according to claim 6-9, it is characterized in that, described hard disk master boot sector MBR information comprises main bootstrap program information and partition table information.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410223513.9A CN105095017A (en) | 2014-05-23 | 2014-05-23 | Partition table based hard disk repair method and apparatus |
| PCT/CN2014/086982 WO2015176433A1 (en) | 2014-05-23 | 2014-09-19 | Hard disk repairing method and device based on partition table |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410223513.9A CN105095017A (en) | 2014-05-23 | 2014-05-23 | Partition table based hard disk repair method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105095017A true CN105095017A (en) | 2015-11-25 |
Family
ID=54553320
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410223513.9A Pending CN105095017A (en) | 2014-05-23 | 2014-05-23 | Partition table based hard disk repair method and apparatus |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105095017A (en) |
| WO (1) | WO2015176433A1 (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108052342A (en) * | 2017-12-12 | 2018-05-18 | 杭州华为数字技术有限公司 | Partition table restorative procedure, device and electronic equipment |
| CN108776577A (en) * | 2018-05-04 | 2018-11-09 | 新华三技术有限公司成都分公司 | Disk management method, device, electronic equipment and storage medium |
| CN109597715A (en) * | 2018-12-04 | 2019-04-09 | 深圳创维数字技术有限公司 | A kind of disk restorative procedure, device and equipment |
| CN110502386A (en) * | 2019-08-30 | 2019-11-26 | 西安易朴通讯技术有限公司 | The on-line fault diagnosis method and apparatus of hard disk |
| CN110795155A (en) * | 2019-10-23 | 2020-02-14 | 杭州迪普科技股份有限公司 | System starting method and device, electronic equipment and storage medium |
| CN113157213A (en) * | 2021-04-30 | 2021-07-23 | 深圳市数存科技有限公司 | Method for extracting and reconstructing partition based on guidance |
| CN117112304A (en) * | 2023-08-31 | 2023-11-24 | 成都傲梅科技有限公司 | Disk cloning method and system |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108737469A (en) * | 2017-04-20 | 2018-11-02 | 北京雷石天地电子技术有限公司 | A kind of method and apparatus hard disk praameter monitoring and fed back |
| CN114924914B (en) * | 2022-05-31 | 2023-04-25 | 广州鼎甲计算机科技有限公司 | Disk partition table information backup and recovery method and system |
| CN115639967A (en) * | 2022-11-10 | 2023-01-24 | 联想开天科技有限公司 | A system backup recovery tool deployment method and system recovery method |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020059498A1 (en) * | 2000-07-12 | 2002-05-16 | Ng Weiloon | Partition recovery method |
| CN101930384A (en) * | 2010-09-10 | 2010-12-29 | 北京中科院软件中心有限公司 | Fault tolerance method and device for file system |
| CN103534690A (en) * | 2011-05-23 | 2014-01-22 | 日本电气英富醍株式会社 | Computer and computer control method |
-
2014
- 2014-05-23 CN CN201410223513.9A patent/CN105095017A/en active Pending
- 2014-09-19 WO PCT/CN2014/086982 patent/WO2015176433A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020059498A1 (en) * | 2000-07-12 | 2002-05-16 | Ng Weiloon | Partition recovery method |
| CN101930384A (en) * | 2010-09-10 | 2010-12-29 | 北京中科院软件中心有限公司 | Fault tolerance method and device for file system |
| CN103534690A (en) * | 2011-05-23 | 2014-01-22 | 日本电气英富醍株式会社 | Computer and computer control method |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108052342A (en) * | 2017-12-12 | 2018-05-18 | 杭州华为数字技术有限公司 | Partition table restorative procedure, device and electronic equipment |
| CN108776577A (en) * | 2018-05-04 | 2018-11-09 | 新华三技术有限公司成都分公司 | Disk management method, device, electronic equipment and storage medium |
| CN109597715A (en) * | 2018-12-04 | 2019-04-09 | 深圳创维数字技术有限公司 | A kind of disk restorative procedure, device and equipment |
| CN110502386A (en) * | 2019-08-30 | 2019-11-26 | 西安易朴通讯技术有限公司 | The on-line fault diagnosis method and apparatus of hard disk |
| CN110502386B (en) * | 2019-08-30 | 2023-08-22 | 西安易朴通讯技术有限公司 | Method and device for diagnosing faults of hard disk on line |
| CN110795155A (en) * | 2019-10-23 | 2020-02-14 | 杭州迪普科技股份有限公司 | System starting method and device, electronic equipment and storage medium |
| CN110795155B (en) * | 2019-10-23 | 2023-08-25 | 杭州迪普科技股份有限公司 | System starting method and device, electronic equipment and storage medium |
| CN113157213A (en) * | 2021-04-30 | 2021-07-23 | 深圳市数存科技有限公司 | Method for extracting and reconstructing partition based on guidance |
| CN113157213B (en) * | 2021-04-30 | 2021-09-17 | 深圳市数存科技有限公司 | Method for extracting and reconstructing partition based on guidance |
| CN117112304A (en) * | 2023-08-31 | 2023-11-24 | 成都傲梅科技有限公司 | Disk cloning method and system |
| CN117112304B (en) * | 2023-08-31 | 2024-02-20 | 成都傲梅科技有限公司 | Disk cloning method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2015176433A1 (en) | 2015-11-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105095017A (en) | Partition table based hard disk repair method and apparatus | |
| CN101221508B (en) | Method and device for starting equipment | |
| WO2008092162A3 (en) | Systems, methods, and media for recovering an application from a fault or attack | |
| WO2011056880A3 (en) | Rollback feature | |
| JP2013545207A5 (en) | ||
| CN103984627A (en) | Test method for memory pressure of Linux server | |
| CN104461947A (en) | Power failure protection method and solid-state disk | |
| CN102375765A (en) | Server power failure detection system and method | |
| CN104636221A (en) | Method and device for processing computer system fault | |
| WO2008099786A1 (en) | Memory failure recovery method, information processing device, and program | |
| CN104021058A (en) | Method for quickly starting test board card | |
| CN102799499A (en) | Vehicular Android equipment system recovery method and vehicular Android equipment | |
| CN101324859A (en) | Method for detecting hard disk hardware fault | |
| CN103631677B (en) | A kind of method that PLC device power-down data keeps | |
| CN102662787A (en) | Method for protecting system disk RAID (redundant array of independent disks) | |
| CN105446832A (en) | Master boot sector data recovery method and apparatus | |
| JP6128388B2 (en) | Information processing device | |
| CN107480033B (en) | Virtual machine blue screen detection method and equipment | |
| CN110750375B (en) | An embedded device and method for processing abnormal information thereof | |
| KR101217668B1 (en) | Malicious program hooking prevention apparatus and method | |
| CN102063365B (en) | Method and device for recording operation information of single plate | |
| CN106354635B (en) | A kind of the program code segments self checking method and device of embedded device | |
| CN103793283A (en) | Terminal fault handling method and terminal fault handling device | |
| CN102955755B (en) | The restorative procedure of data card and inter-host communication exception and data card | |
| CN103065690A (en) | System and method for reducing starting current of storage system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20151125 |
|
| WD01 | Invention patent application deemed withdrawn after publication |