China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-30 03:29
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » 40G hard disk not detected in CMOS, here I urgently ask for help from all experts, I am very grateful! View 4,262 Replies 26
Floor 16 Posted 2005-10-14 16:28 ·  中国 山西 临汾 联通
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
I don't know if DM will work. It is said that DM can recognize this kind, but I haven't tried it yet! Now I'm not at home and can't do anything! I'll try when I go back. It is suggested that the poster try DM! If it works, give a message!
房东说:这娃是个好孩子!
Floor 17 Posted 2005-10-14 22:24 ·  中国 江苏 扬州 电信
新手上路
Credits 1
Posts 1
Joined 2005-10-14 21:49
20-year member
UID 43513
Status Offline
The LZ MM is amazing! The computer has reached this level, doing low-level formatting of the hard disk and hot swapping, admiring...

Let me talk about my views on the problem you encountered.
Judging from the phenomenon you described, it is a hard disk failure, not like being infected with a boot sector virus. If it were infected with a boot sector virus, although the OS cannot start normally, the hard disk should be detected by the BIOS. So the possibility of physical damage to the hard disk is relatively high.
Now, let's treat it as if it were infected with a boot sector virus and try the following method:
1. Disable the hard disk in the CMOS settings, then the machine can boot from the floppy disk.
2. Use the "DM /M" command to start the DM universal version, select "(A)dvanced Options -> (M)aintenance Options -> (U)tilities -> (U)tilities -> Zero Fill Drive", and zero fill the hard disk. You don't need to finish the zero filling. In fact, you can immediately press the esc key to stop it as soon as the zero filling starts.
  3. At this time, the hard disk can be like a new hard disk that has never been partitioned, and you can do whatever you want.
  This method uses the feature that the DM universal version can still operate the hard disk when the hard disk is set to "NONE". (DM download address: http://chengyi.luyingwei.net/download/DM957cyA.rar) If the hard disk cannot be seen in DM, then there is no way.
Floor 18 Posted 2005-11-01 15:58 ·  中国 安徽 淮南 电信
银牌会员
★★★
爱DOS但不迷DOS
Credits 1,708
Posts 509
Joined 2004-02-25 00:00
22-year member
UID 18460
Gender Male
From 安徽淮南
Status Offline
I don't know if the little girl's hard drive is good. It can't even be detected by CMOS. It's estimated that it will say goodbye to you.
°·.∴▍★∴ 我们的泰坦尼克.....
   I l☆ve you!
☆.°·▍▍.☆█☆.°★ 永不会沉没.
◥█▅▅██▅▅██▅▅▅▅███◤
我的主页:http://wphs.ik8.com我的网络硬盘:wphs.ys168.com
Email:wphs@ah163.com QQ:43500498(附加消息:中国DOS联盟)
Floor 19 Posted 2005-11-04 17:43 ·  中国 重庆 城口县 电信
中级用户
★★
Credits 335
Posts 96
Joined 2004-05-07 00:00
22-year member
UID 23928
Gender Male
Status Offline
1. Power off to discharge the CMOS.
2. Check or replace the hard disk cable and set the correct jumper.
3. Set the hard disk type to NONE in CMOS.
4. Boot with DOS 7.1 + DM 9.56 to see if there is a hard disk, then use DM.... (specifically see floor 17)
Note the steps.
Floor 20 Posted 2005-11-04 23:03 ·  中国 广东 广州 联通
新手上路
Credits 2
Posts 2
Joined 2005-11-04 21:49
20-year member
UID 44602
Gender Male
Status Offline
So many hot swaps are actually a means to solve the problem of poor contact;
Specifically, it is more practical to use a multimeter for measurement. Setting specific hard disk parameters is sometimes very useful;

But if the CMOS still does not recognize the hard disk after ensuring that the data cable is in good contact and the voltage is okay, you can listen to whether there is a motor startup sound when booting. If there is no motor startup sound and the hard disk light is always on or directly off, then there must be a problem with the circuit part.

Another most typical situation is that the optical drive boots normally and the disc is inserted and flashes normally, but there are two situations where it is not recognized:
Either the optical pick-up in the circuit is aged and damaged or the power supply circuit is damaged, or the data cable is oxidized, has poor contact, is loose, and the CMOS does not recognize it.
Floor 21 Posted 2005-11-26 21:26 ·  中国 江西 抚州 电信
高级用户
★★★
中國DOS聯盟常任參議员
Credits 686
Posts 318
Joined 2005-11-04 13:00
20-year member
UID 77577
Gender Male
Status Offline
Possible failure analysis:
1. BIOS is not of sufficient level. If it can be upgraded,
2. Logic lock. Fill sector 0, 0, 1 with DM software or fill it with DEBUG assembly.
3. Re - insert the power cable or data cable and check if there is any problem with the power cable or data cable.
4. Open BIOS - AUTO function
Floor 22 Posted 2005-12-13 14:05 ·  中国 广东 韶关 电信
初级用户
Credits 26
Posts 13
Joined 2005-12-13 12:13
20-year member
UID 47037
Status Offline
### Principle of Hard Disk Locking

A hard disk logical lock usually tamper with the partition table of the hard disk, so first, one should understand the hard disk partition table. The hard disk partition table is located in cylinder 0, head 0, sector 1. The first more than 200 bytes of this sector are the master boot program, and from 01BEH onwards, there are 64 bytes of the partition table. The partition table is 64 bytes long and is divided into 4 columns, each column being 16 bytes, used to describe a partition. If partitioned using the DOS FDISK program, at most two columns are used. The first column describes the basic DOS partition, and the second column describes the extended DOS partition.

The structure of one column of the partition table and the meaning of each byte are as follows:

- 00H - Active byte. An active DOS partition is 80H, others are 00H.
- 01H - The head number of the logical sector 0 of this partition.
- 02H - The sector number in the cylinder of logical sector 0.
- 03H - The cylinder number of logical sector 0.
- 04H - Partition type flag.
- 05H - The head number of the last sector of this partition.
- 06H - The sector number of the last sector.
- 07H - The cylinder number of the last cylinder.
- 08H - The total number of sectors before this partition on the hard disk, represented by a double word.
- 0CH - The total number of sectors of this partition, counted from logical sector 0, excluding hidden sectors, represented by a double word.

Although the cylinder number and sector number given in the above introduction each occupy one byte, actually, the sector number is represented by 6 bits, and the cylinder number is represented by 10 bits. The highest two bits of the byte where the sector number is located are actually the highest two bits of the cylinder number.

The last two bytes of the partition table are the valid flag of the partition table. If it is changed, booting from the hard disk will not be possible. This is a simple method to lock the hard disk. The solution is to boot from a floppy disk, and the hard disk can still be used after booting. Use Debug or Diskedit software in Norton to restore the flag in the partition table of the hard disk, and then booting from the hard disk will also be fine. Another method to lock the hard disk is to tamper with the partition parameters. If all partition parameters are changed to 0, when booting, since the partition parameters cannot be found, booting from the hard disk is impossible. After booting from a floppy disk, the hard disk is not recognized. If you type the drive letter C and press Enter, a prompt "Invalid driver specification" will appear. But fortunately, the computer can still be booted. It doesn't matter if the hard disk is not recognized. On drive A, you can still use DOS Debug to read the content of cylinder 0, head 0, sector 1 of the hard disk, modify it, and then write it back to cylinder 0, head 0, sector 1. Restarting the computer will be fine again. If the partition table parameters are arbitrarily changed to other parameters, it may not be possible to boot with a DOS system disk that can install DOS. After pressing F3 to exit, a memory allocation error will occur, and a prompt that the command interpreter COMMAND of DOS cannot be loaded will appear, and the system will crash. The author has encountered such a situation. But with a floppy disk formatted as a system disk, it can be booted smoothly. As long as there is Debug, you can still modify the partition table parameters back. The terrible thing is that if you unfortunately change the partition table parameters to a cyclic chain, that is, the next partition of drive C points to drive D, and the next partition of drive D points to drive C, and so on cyclically, when DOS or WIN95 boots, due to endless reading of logical drives, it will only crash. As long as the hard disk exists, whether you use a floppy disk or a hard disk, the computer cannot be booted. Since the inability to boot is caused by the hard disk, even if you remove the hard disk and put it on another computer, it cannot be used. Thus, the hard disk is completely locked. The author has encountered such a situation. If you don't believe it, you can just change the 1D0H at cylinder 0, head 0, sector 1 of the hard disk to 1 (if the starting cylinder number of your drive D is not large enough, this place is originally 1), and change the 1D1H to 0, indicating that the starting cylinder number of drive D is the same as that of drive C, and see if your computer can still boot. But don't try it without sufficient preparation.

A complete hard disk locking program is nothing more than rewriting the boot program of cylinder 0, head 0, sector 1, and destroying or deliberately creating a cyclic partition table, while placing the real hard disk partition table parameters and boot program in other hidden sectors and protecting them. If the password is incorrect during booting, the computer cannot be booted. If the password is correct, it can be booted smoothly. For such a hard disk locking program, in a good situation, it can be booted from a floppy disk; in a serious situation, even the floppy disk cannot be booted, and the hard disk is really locked.

### Program Method to Unlock the Hard Disk Lock

If the hard disk is locked, is it really impossible to unlock it? Of course not. Let's see the crux of the problem. The root lies in the IO.SYS file in DOS, which contains four modules: LOADER, IO1, IO2, IO3. Among them, IO1 contains a very critical program SysInt_I, which is very stubborn during booting and must read the partition table, and will not stop until it finishes reading the partition table. If it encounters a cyclic partition table, it will only crash. This is the fragility and incompleteness of DOS. Actually, this cannot be blamed on DOS, because in order to obtain the right to use the hard disk, DOS must read the partition table parameters, and DOS also stipulates that the drive number cannot exceed 26, but it did not consider such a cyclic partition table situation. In a word, the computer cannot be booted only because of the DOS operating system. If another operating system is written, perhaps the computer can be booted. Of course, this is just a joke.

After understanding that the cause of the problem is DOS, the problem is easy to solve. Doesn't DOS need to read the hard disk partition table during booting? If we prevent it from reading the partition table or even prevent it from reading the hard disk, it can be booted smoothly. Indeed, this is the case. The implementation method of the hard disk locking program is based on this idea. Of course, this can only start from booting from a floppy disk.

Let's look at the computer boot process. The multiple hardware self-tests carried out first when power is on have nothing to do with us. What we care about is what it does when it first deals with the disk. If booting from the hard disk is selected, the computer first deals with the disk by reading the content of cylinder 0, head 0, sector 1 of the hard disk into memory 0000:7C00 and jumping to 0000:7C00 to execute it. If booting from a floppy disk is selected, the computer first deals with the disk by reading the content of track 0, head 0, sector 1 of drive A into memory 0000:7C00 and jumping to 0000:7C00 to execute it. During execution, the computer does not check what the content of this sector is, but mechanically executes the read command, which makes many system viruses survive. But using this point, it just gives our program unlocking method a place to use. If we use DOS to format a system floppy disk that can boot the computer, move the content of track 0, head 0, sector 1 of this floppy disk to the subsequent blank sectors, and rewrite a section of program to track 0, head 0, sector 1 of this floppy disk, then when booting from the floppy disk, the program we wrote will be executed first. In this section of program, it has such functions: intercept INT13H in advance before DOS boots, stay in the upper memory and monitor INT13H, judge whether it is reading the hard disk, and if it is reading the hard disk, directly return. This prohibits reading the hard disk, thus avoiding the crash caused by DOS reading the cyclic partition table of the hard disk. At the same time, intercept the reading of the floppy disk. If it is reading track 0, head 0, sector 1 of the floppy disk, change it to reading the sector that really has the boot program and the disk parameter table, so as to avoid DOS crashing because it cannot find the disk parameter table of the floppy disk during booting. While completing these tasks, it is also necessary to read the real boot program of the floppy disk and hand over the control to it.

This method can be called universal because when booting from a floppy disk, it never deals with the hard disk, so no matter how the hard disk is locked by any method, it has no impact on the booting of DOS. Of course, the computer booted in this way does not recognize the hard disk, but this is okay. After the computer boots, you can use Debug to transfer the new INT 13H program staying in the upper memory, change it to a statement that directly executes the old INT 13H. In this way, under Debug, you can use INT 13H to read the content of cylinder 0, head 0, sector 1 of the hard disk. If you have a backup, restore the partition table parameters and then write them back to cylinder 0, head 0, sector 1. Restarting the computer will be fine. If there is really no backup, remove the cyclic chain in the partition table. After restarting the computer with a normal DOS boot disk, you can at least re-partition the hard disk again, so that the hard disk will not be locked and cannot be opened.

### Program and Instructions

1. The following is the source program key.com written to track 0, head 1, sector 1 of the floppy disk. The program is input with debug.

C>debug

-a100

100 CLI

101 XOR AX,AX

103 MOV DS,AX

105 MOV ES,AX

107 MOV SS,AX

109 MOV AX,7C00

10C MOV SP,AX

10E STI

10F MOV SI,AX

111 MOV DI,7E00

114 CLD

115 MOV CX,0200

118 REPNZ

119 MOVSB

11A JMP 0000:7E1F

11F MOV CX,0003

122 PUSH CX

123 MOV AX,0201;Read the boot sector of the boot floppy disk

126 MOV BX,7C00

129 MOV CX,4F01

12C MOV DX,0100

12F INT 13

131 POP CX

132 DEC CX

133 JNZ 0122

135 MOV AX,;Pre-emptively obtain the position of INT 13H

138 MOV ,AX

13B MOV AX,

13E MOV ,AX

141 MOV AX,

144 DEC AX

145 MOV ,AX

148 MOV CL,06

14A SHL AX,CL

14C MOV ES,AX

14E XOR AX,AX

150 MOV DS,AX

152 MOV SI,7E6D;Copy the rewritten INT 13H program to the upper memory

155 MOV DI,0000

158 MOV CX,0030

15B REPNZ

015C MOVSB

015D MOV AX,0000;Write the new INT 13H position to the interrupt vector table

0160 MOV ,AX

0163 MOV AX,ES

0165 MOV ,AX

0168 JMP 0000:7C00

016D PUSHF;New INT 13H program

016E CMP DX,0080;Is it the hard disk

0172 JNZ 0176;If not the hard disk, continue

0174 POPF

0175 IRET;If it is the hard disk, directly return

0176 CMP DX,+00;Is it reading the boot area of the floppy disk?

0179 JNZ 0186

017B CMP CX,+01

017E JNZ 0186

0180 MOV CX,4F01;If yes, read track 79, head 1, sector 1

0183 MOV DX,0100

0186 POPF

0187 JMP 0000:0000;Jump here to execute the old INT 13. The position of the old INT 13H is obtained earlier and written.

N key.com

RCX

200

W

Q

2. Loading of the program

Before carrying out the following work, first use DOS to format a bootable system disk, and ensure there are no bad sectors. It is best to carry out a boot test to ensure that it can boot the computer. Since most computers now only have a 3-inch floppy drive, choose a 3.5-inch floppy disk with 1.44M.

Then use debug key.com to load the program key.com into memory at offset address 100H, and at the same time write a loading program at 400H. That is:

C>debug key.com

-a400

400 MOV CX,0003

403 PUSH CX

404 MOV AX,0201;Read the boot program of drive A into memory at 1000H

407 MOV BX,1000;To ensure success, read 3 times repeatedly for the first time

40A MOV CX,0001

40D MOV DX,0000

410 INT 13

412 POP CX

413 DEC CX

414 JNZ 0403

416 MOV AX,0301;Write the read boot program of the floppy disk to the floppy disk

419 MOV BX,1000;The first sector of the last track

41C MOV CX,4F01

41F MOV DX,0100

422 INT 13

424 MOV AX,0301;Write the key.com program to track 0, head 1, sector 1 of the floppy disk

427 MOV BX,0100

42A MOV CX,0001

42D MOV DX,0000

430 INT 13

432 INT 3

To be absolutely safe, it is best to read the content of these two sectors of the floppy disk again to ensure that the writing is successful. After doing all this, it is still safe to carry out a test, that is, boot the computer once with this floppy disk and see if it is successful. If it boots successfully, you can use the cyclic partition table method to lock the hard disk, see if it can be booted from the normal DOS, and then boot the computer with this floppy disk to see how effective it is?

After booting from this floppy disk, the hard disk is not recognized, and the new INT13H program stays in the upper memory. This section of program is actually the part from 16D to 187 in key.com. Due to the existence of this section of program, the hard disk cannot be read under debug, and thus the hard disk partition table cannot be restored. Therefore, after the computer boots, this section of program should be modified first. The basic memory of the current computer is usually 640K, so this section of program is located at 9FC0:0000 in the memory. Under debug, use U9FC0:0 to display this section of program. You can see that at 9FC0:001A, there is a jump instruction, which jumps to execute the original INT 13H. Since the BIOS version is different, the position pointed to by the jump instruction may be different. For example, on the computer, there is a JMP F000:A5D4 statement. At this time, under debug, write such a statement: a9FC0:0 JMP F000:A5D4. In this way, the writing and reading ban on the hard disk no longer work. Under debug, use the 2nd sub-function of INT13H to read the hard disk partition table, modify and restore it, and then use the 3rd sub-function to write the data back to the partition table. Exit debug and restart the computer with the normal DOS.

By the way, under the normal DOS, since this floppy disk has no boot area, there is no disk parameter table, and thus it cannot be used. The command DIR A: will appear a General failure reading drive A prompt. Ignore it, which does not affect it as a special boot disk.

### Suggestion

To better protect your hard disk, the author suggests that you had better back up the partition table information of your hard disk. There are two ways to back up.

One is to store the partition information of each logical disk of the hard disk in the form of a file. The other is to back up the partition information in the hidden sectors of the hard disk. For example, you can back up cylinder 0, head 0, sector 1 to cylinder 0, head 0, sector 3, back up the starting cylinder number of drive D, head 0, sector 1 to cylinder 0, head 0, sector 3 of the same cylinder, and so on for other logical disks. This method is simple, convenient, and very reliable. It is very easy to operate and implement with DISKEDI in NORTAN. With the backed-up partition table information, you are not afraid of viruses that destroy the partition table; plus the program I gave you, even if someone really locks your hard disk, you can easily unlock it.

[ Last edited by sgtao on 2005-12-13 at 14:23 ]
Floor 23 Posted 2005-12-13 20:55 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
It's said to be so complicated. Couldn't the IO.SYS that can unlock the hard disk work? You this is too complicated! Not something ordinary people can understand!
Floor 24 Posted 2006-02-08 17:32 ·  中国 上海 东方有线
新手上路
Credits 12
Posts 6
Joined 2006-01-26 20:01
20-year member
UID 49550
Gender Male
From 上海
Status Offline
It's not about hard drive repair. Those various strange and fallacious remarks are really brilliant.

If there's an error in hard drive initialization, the BIOS naturally can't recognize it.

It's estimated that the G-List is overflowing, causing an error in the G-List initialization module, and then the initialization fails. The BIOS naturally can't recognize it.

This is not something that can be solved by posting a few threads online. Even hard drive repairers may not be able to fix it. If there's no urgent data, just discard it.

The poster is in Kunshan, and I'm in Shanghai.

The distance is still not far.
Floor 25 Posted 2006-02-12 16:15 ·  中国 浙江 湖州 安吉县 电信
新手上路
Credits 4
Posts 2
Joined 2006-02-12 10:10
20-year member
UID 50226
Gender Male
Status Offline
My hard drive is the same situation.
Floor 26 Posted 2006-02-12 23:06 ·  中国 浙江 衢州 电信
初级用户
Credits 41
Posts 5
Joined 2005-09-25 20:25
20-year member
UID 42830
Status Offline
It is recommended to use the MHDD tool for detection. If MHDD can't even test the hard disk information, then it's really hopeless.

In addition, I want to correct the views of a few friends upstairs: 1. The fact that the BIOS doesn't recognize the hard disk doesn't mean it's hopeless; 2. The hard disk can be hot-swapped, but it's better to put the hard disk into the power-off mode (use the Shift+F4 shortcut key in the MHDD tool), then unplug the power cable first and then the data cable. Although it's theoretically not allowed to be hot-swapped, I've been repairing hard disks for so many years and haven't had any problems.

[ Last edited by qzxuyimin on 2006-2-12 at 23:14 ]
Floor 27 Posted 2006-04-09 15:27 ·  中国 北京 鹏博士BGP
初级用户
Credits 30
Posts 15
Joined 2006-04-03 14:47
20-year member
UID 53256
Status Offline
Forum Jump: