Manual backup and recovery of Hard Drive boot records

Source: Internet
Author: User

I. Back up the Master Boot Record of the hard disk to a file:

C:/DOS> debug
-A100
1078: 0100 mov ax, 0201; 02 = read, 01 = number of read sectors
1078: 0103 mov BX, 0200; put it at 0200 of the memory after reading
1078: 0106 mov CX, 0001; 00 = track number, 01 = start fan area number
1078: 0109 mov dx, 0080; 00 = 0 head, 80 represents Hard Disk
1078: 010c INT 13; BIOS disk interrupted
1078: 010e INT 20; End
1078: 0110 ^ C
-G = 100; executed from 0100
Program terminated normally; program display
-RcX; The CX register defines the size of the file to be saved.
CX 0000; set the file size
: 300; 300 h = 768 bytes
-N mainboot. dat; stored in the mainboot. dat file
-W; write files
Writing 00300 bytes; program display
-Q; exit debug

2. Restore the Master Boot Record

C:/DOS> debug
-N mainboot. dat; load the backup data file
-L; load
-A100
1078: 0100 mov ax, 0301; 03 = write, 01 = number of sectors
1078: 0103 mov BX, 0200; write from 0200 of the memory
1078: 0106 mov CX, 0001; 00 = track number, 01 = start fan area number
1078: 0109 mov dx, 0080; 00 = 0 head, 80 represents Hard Disk
1078: 010c INT 13; BIOS disk interrupted
1078: 010e INT 20; End
1078: 0110 ^ C
-G = 100; executed from 0100
Program terminated normally
-Q; exit debug

! Note: because the data contains partition tables, After partitioning, the data backed up before the partition cannot be restored. It cannot be used between different hard disks.
------------------------------------------------
Author: Zhang Qing zhangking@263.net
QQ: 9365822
MSN: zhangking@hotmail.com
Personal Homepage: http://www.why100000.com ("100,000 why" computer learning network)
Other Websites: http://sogo99.com (sogou 99 web portal)
Http://neteye.blogchina.com ("mesh" blog China)
2004.11.14

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.