Thursday, December 28, 2006

A simple way 2 fix DMA problem of HDD in windows XP

Windows XP has a somewhat bad (IMHO) feature
that sets off the DMA of hard drives and CD/DVD drives when it gets CRC error in
reading the filesystem. This frequently happens when you are having subsequent power
cuts or if you have a bad sectors in your drive. And thus PC crawls when we want
to access data from that drive, as OS then retrieves data in PIO mode.



This problem has been bugging me for some time. So hacked my way into "regedit"
and finally made this script. This script deletes the registry entry that Windows
uses to calculate what addressing mode to use when accessing the drives. So upon
running the script, just rebooting PC will
force windows re-detect the drive resulting in restoration of UDMA mode 5 for the
hard drive.



Here is the code


#####################

REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0001
/v "MasterIdDataCheckSum" /f



REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0001
/v "SlaveIdDataCheckSum" /f



REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0002
/v "MasterIdDataCheckSum" /f



REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0002
/v "SlaveIdDataCheckSum" /f

#####################



Put this code fragment inside a text file and rename it to
"dma_restore.bat" or something like
it. Make sure you change the extension to ".bat".
Upon running the file, you may see some errors like "Error: the
system was unable to find the specific registry key or value". Do not worry
about it. Just
reboot
and your PC should be
fine in the next run.


2 Comments:

At 2:14 PM, Blogger Zico said...

U talked abt Windows platform here. But, what abt Unix/Linux/Mac?

Though this is a *Unix* blog...

So, dude.. tell something about unix/linux/mac.

Best,
Zico

 
At 1:41 PM, Blogger Jorge said...

Hola amigo: quería invitarte que visites el blog que estoy realizando con mis alumnos de segundo año de la secundaria sobre LA DISCRIMINACIÓN.
http://nodiscrimine.blogspot.com
Tema arduo e interesante.
Seguro será de tu agrado.
Tu aporte será valioso
Un abrazo desde la Argentina.

 

Post a Comment

<< Home