notes to help me remember

Category Archives: HDD

Disk Partitioning for Win 7

We received a replacement HDD that had Win 7 conveniently installed on an 8 GB partition at the end of the drive.  There was a small partition at the beginning of the disc, and roughly 60 GB of unpartitioned space in the middle.  Since the partitions can only be expanded to the right, it was not possible to use Win 7 Disk Management to correct the issue.  I looked at a couple of programs to move the partition, but some of them were only free for home use.  I found Aomei Partition Assistant Home Edition, however, for which commercial use is very specifically allowed. While I don’t remember exactly what I did, whether it was moving or merging, I ended up with a usably sized partition for the OS.


Finally figured out how to run a chkdsk when Windows startup results in a reboot.  First of all, at the safe mode startup menu (press F8 when Windows is starting), you can select an option to stop the automatic reboot.  This allows you to perhaps actually read the BSOD (more than one character at a time, anyway).  Then, if that doesn’t give you anything towards opening Windows, the recovery option with a Windows XP install disk puts you at a C: prompt from whence you can run chkdsk.

Slow Running HDDs on Laptops

Found that HDDs were running in PIO mode instead of DMA (or Ultra DMA).  Check this in device manager under IDE, primary device.  It will say run in DMA mode if available, and then show currently running in PIO mode, if this is the issue.  Ran “HD Tune” program to verify drive performance issues.

Ran a Visual Basic script to reset the registry settings to force WinXP back to DMA mode on the drive.  DMA mode causes the PC to go through the Disk Management processor.  In PIO mode disk access goes through the CPU, causing slow performance and heavy CPU usage (90-100% usage).

Ran this on both Teresa P’s and Amanda K’s Dell D610s.  Teresa’s was back to PIO a few days later.  Amanda opted for a different laptop.  Have seen this on a few others and generally recommend that the user back up all files, and prepare for possible HDD failure.

Script name is resetdma.vbs

Script follows:

‘ Visual Basic Script program to reset the DMA status of all ATA drives
‘ Copyright © 2006 Hans-Georg Michna
‘ Version 2007-04-04
‘ Works in Windows XP, probably also in Windows 2000 and NT.
‘ Does no harm if Windows version is incompatible.

If MsgBox(“This program will now reset the DMA status of all ATA drives with Windows drivers.” _
& vbNewline & “Windows will redetect the status after the next reboot, therefore this procedure” _
& vbNewline & “should be harmless.”, _
vbOkCancel, “Program start message”) _
= vbOk Then
RegPath = “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\”

ValueName1Master = “MasterIdDataChecksum”
ValueName1Slave = “SlaveIdDataChecksum”
ValueName2Master = “UserMasterDeviceTimingModeAllowed”
ValueName2Slave = “UserSlaveDeviceTimingModeAllowed”
ValueName3 = “ResetErrorCountersOnSuccess”
MessageText = “The following ATA channels have been reset:”
MessageTextLen0 = Len(MessageText)
ConsecutiveMisses = 0
Set WshShell = WScript.CreateObject(“WScript.Shell”)
For i = 0 to 999
RegSubPath = Right(“000” & i, 4) & “\”
‘ Master
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Master
errMaster = Err.Number
On Error Goto 0
If errMaster = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Master
WshShell.RegDelete RegPath & RegSubPath & ValueName2Master
On Error Goto 0
MessageText = MessageText & vbNewLine & “Master”
End If
‘ Slave
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Slave
errSlave = Err.Number
On Error Goto 0
If errSlave = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Slave
WshShell.RegDelete RegPath & RegSubPath & ValueName2Slave
On Error Goto 0
If errMaster = 0 Then
MessageText = MessageText & ” and ”
MessageText = MessageText & vbNewLine
End If
MessageText = MessageText & “Slave”
End If
If errMaster = 0 Or errSlave = 0 Then
On Error Resume Next
WshShell.RegWrite RegPath & RegSubPath & ValueName3, 1, “REG_DWORD”
On Error Goto 0
ChannelName = “unnamed channel ” & Left(RegSubPath, 4)
On Error Resume Next
ChannelName = WshShell.RegRead(RegPath & RegSubPath & “DriverDesc”)
On Error Goto 0
MessageText = MessageText & ” of ” & ChannelName & “;”
ConsecutiveMisses = 0
ConsecutiveMisses = ConsecutiveMisses + 1
If ConsecutiveMisses >= 32 Then Exit For ‘ Don’t search unnecessarily long.
End If
Next ‘ i
If Len(MessageText) <= MessageTextLen0 Then
MessageText = “No resettable ATA channels with Windows drivers found. Nothing changed.”
MessageText = MessageText & vbNewline _
& “Please reboot now to reset and redetect the DMA status.”
End If
MsgBox MessageText, vbOkOnly, “Program finished normally”
End If ‘ MsgBox(…) = vbOk
‘ End of Visual Basic Script program