Pages

Jumat, 11 November 2011

清除硬盘分区表信息 Clear hard disk partition table information

Sinbad Sinbad
(Jan 18, 2001) (Jan 18, 2001)

这篇文章是很久以前写给几个爱折腾机器的朋友看的,以协助解决DOS下怎么删除Linux等Non-DOS分区、如何重整硬盘等问题,给个一了百了的解决方法,大家都省事。 This article is written for a long time ago a few friends love tossing the machine to see, to help resolve how to delete DOS, Linux, etc. Non-DOS partition, how to drive restructuring and other issues, to a solution once and for all, we all save trouble.

在pure dos下面: In pure dos following:

c:\>debug c: \> debug
-a //开始代码 -A / / start code
0ACD:0100 mov ax,201 //ah=2是读功能,al=01忘了什么意思了,好久没摸了。 0ACD: 0100 mov ax, 201 / / ah = 2 is a read function, al = 01 forgot what it means, do not touch a long time. :( : (
0ACD:0103 mov bx,200 //把第一扇区的信息读入200开始的缓冲区 0ACD: 0103 mov bx, 200 / / to read the first sector of the information buffer 200 start
0ACD:0106 mov cx,1 //是指定读柱面和磁道的吧, 0ACD: 0106 mov cx, 1 / / is specified cylinder and track read it,
0ACD:0109 mov dx,80 //读第一块硬盘,如果想读第二块硬盘,就mov dx,81 0ACD: 0109 mov dx, 80 / / read the first hard disk, if you want to read a second hard drive, on the mov dx, 81
0ACD:010C int 13 //int 13中断 0ACD: 010C int 13 / / int 13 interrupt
0ACD:010E int 20 //中止程序 0ACD: 010E int 20 / / stop the program
0ACD:0110 0ACD: 0110
-g //执行 -G / / execute

Program terminated normally Program terminated normally

-d380 //看读入内存中的信息 -D380 / / read the information into memory
0ACD:0380 0ACD: 0380
0ACD:0390 //这里略去若干。 0ACD: 0390 / / number of omitted here. 。 . 因为在Win2k下写这篇文章,不允许直接通过中断读写硬盘, Because in Win2k to write this article, does not allow direct read and write disk by interrupt,
0ACD:03A0 //这些字节是我凑出来的。 0ACD: 03A0 / / I take care of these bytes is out. :) :)
0ACD:03B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 80 10 .>...u$.....u... 0ACD: 03B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 80 10 .>... u $..... u. ..
0ACD:03C0 74 19 0B 0E D5 96 E3 13-B0 1A 06 33 FF 8E 00 B4 t..........3.... 0ACD: 03C0 74 19 0B 0E D5 96 E3 13-B0 1A 06 33 FF 8E 00 B4 t. ......... 3 ....
0ACD:03D0 96 F2 05 07 75 05 4F 89-3E D5 96 BB BA 97 00 00 ....uO>......> 0ACD: 03D0 96 F2 05 07 75 05 4F 89-3E D5 96 BB BA 97 00 00 .... uO >......>
0ACD:03E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ...t.....w..>... 0ACD: 03E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ... t. .... w. .>...
0ACD:03F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 55 AA ......< t....... 0ACD: 03F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 55 AA ......< t. ......

可以看出,从:03BE开始的地方就是硬盘的分区表信息,最后的55AA是有效表示符,所以分区表信息一共有4项,共64字节。 Can be seen from: 03BE place to start is the hard drive's partition table information, the final 55AA to be effective, said Fu, the partition table information, a total of four, a total of 64 bytes. 把这64字节清空,硬盘就几乎空空如也了。 This 64-byte empty, almost empty the hard drive.

下面往这64个字节填充零。 Here to fill this 64-byte zero.

-f3be 3fd 0 -F3be 3fd 0

写入硬盘,生效: Written to disk, entry into force:

-a100 //修改刚才的代码 -A100 / / modify the code just
0ACD:0100 mov ax,301 //调用int13的写功能 0ACD: 0100 mov ax, 301 / / write function call int13
0ACD:0103 0ACD: 0103
-g=100 //从100处开始执行 -G = 100 / / started from 100

搞定,fdisk看看,啥都没有了! Get, fdisk to see, and consequently no!

这其实就是对硬盘主引导扇区的修改,可要千万小心,如果往里面写入了一大堆垃圾,你的硬盘就over了。 In fact, this is the hard disk master boot sector changes, you had better be careful, if entered, and writes a lot of garbage, on your hard drive over the. 找第三方工具来修复也可以,不过操作的时候还是小心为好。 Find a third-party tools to fix you can, but when the operation is careful as well.


注意:一定要有懂汇编的人协助,偶可不承担你误操作的后果。 Note: The person must be compiled to help understand, even from time to bear the consequences of your mistake. :) :)

Tidak ada komentar:

Posting Komentar