Windows XP Stop Error 0x0000007B FIX

From richud.com
Jump to navigation Jump to search


The Error

Stop Error 0x0000007B is caused by Windows not loading a mass storage driver from the CDDB (CriticalDeviceDatabase) in the CurrentControlSet. It usually occurs when moving hardware as the device controller will be different on a different motherboard.

(To see if this is the problem, press F8 just as Windows first starts booting, on the menu select 'Disable Automatic Restart....'. Or, set HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CrashControl , AutoReboot , DWORD value 0 , - but remember to check your current ControlSet is 001, see below )

The easiest way to fix it is to get hold of a copy of (newish)Hirens Boot CD (/ BartPE disk / UBCD4Win), and load RegeditPE up. These will have most of these drivers built in and should be able to see your main drive without this problem.

You point RegeditPE to the target drives Windows folder only (like c:\Windows) and click next to load the various registry hives.

I have made several cover-all registry files you can import to make fixing it very simple (below)

The registry file is composed of the CDDB entries for (most) of the Intel boards (should be using AHCI for ICH8 and newer with modern hdd's!) and the corresponding Service entries.

If you are having this after upgrading/altering to AHCI or RAID, please see here

Registry File - Fix All

  • Save the registry file out (link at bottom of it) and just double click on it to import it, AFTER you have loaded the registry hives with RegeditPE. (_REMOTE_SYSTEM key is where regeditPE mounts them)
  • Make sure the following .sys files are in \Windows\system32\drivers, if the are missing copy them from a Windows CD or another copy of Windows.
  1. atapi.sys
  2. intelide.sys
  3. pciide.sys
  4. pciidex.sys
  • Check HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\Select\Current is DWORD 0x00000001 to make sure ControlSet001 is correct and if not search & replace in the registry file to change it (to say ControlSet002) if 'Current' DWORD value is 0x00000002
  • Remember the ranking order for devices PCI\VEN_*&DEV_* then PCI\VEN_*&CC_* then PCI\CC_* (Therefore it wont have to necessarily be listed to work so long as a catchall matches it, see comments in reg file)

{{#fileanchor: _07b-ATA-IDE-SATA-forPE.reg}}

REGEDIT4
;this is for (Intel) IDE ATA and IDE SATA controllers
;load into Regedit PE 0.9C from Hiren boot cd or equivalent
;controlset001 is what currentcontrolset is made from at boot unless its changed in [HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\Select\Current]
;"Windows Registry Editor Version 5.00 header", any REG_EXPAND_SZ and REG_MULTI_SZ data types are represented as Unicode, double-byte, characters. 
;"REGEDIT4" header, any REG_EXPAND_SZ and REG_MULTI_SZ data types are represented as single-byte characters. 
;This file can be regedit 4 or 5 as no longer bothering with REG_EXPAND_SZ and the ImagePath in hex(2), leaving it as StringValue instead which seems fine - in fact the path probably isnt needed anyway


[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\primary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\secondary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\*pnp0600]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\*azt0502]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\gendisk]
"ClassGUID"="{4D36E967-E325-11CE-BFC1-08002BE10318}"
"Service"="disk"

;Catchall to IDE ATA devices if no more specific matches
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#cc_0101]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_0e11&dev_ae33]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1039&dev_0601]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1039&dev_5513]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1042&dev_1000]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_105a&dev_4d33]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1095&dev_0640]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1095&dev_0646]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1095&dev_0648]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1095&dev_0649]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1097&dev_0038]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_10ad&dev_0001]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_10ad&dev_0150]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_10b9&dev_5215]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_10b9&dev_5219]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_10b9&dev_5229]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="pciide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1106&dev_0571]
"Service"="pciide"
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"

;d915 chipset ICH6
;may get caught via pciide catchall if its HardwareID supports just pci#cc_0101 so below cddb not needed
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_266f]
"Service"="pciide"
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_2651]
"Service"="pciide"
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"

;catchall to Intel IDE ATA devices if no others match
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&cc_0101]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

;above Intel catchall above should capture everything intelide so all cddb intelide lines below here are not really needed
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_1222]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_1230]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_2411]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_2421]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_7010]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_7111]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_7199]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

;d945 chipset ICH7
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\PCI#VEN_8086&DEV_27C0]
"ClassGUID"="{4d36e96a-e325-11ce-bfc1-08002be10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\PCI#VEN_8086&DEV_27DF]
"ClassGUID"="{4d36e96a-e325-11ce-bfc1-08002be10318}"
"Service"="intelide"

;dq965 chipset ICH8
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\PCI#VEN_8086&DEV_2820]
"ClassGUID"="{4d36e96a-e325-11ce-bfc1-08002be10318}"
"Service"="intelide"

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\PCI#VEN_8086&DEV_2825]
"ClassGUID"="{4d36e96a-e325-11ce-bfc1-08002be10318}"
"Service"="intelide"


;Add driver for Atapi (requires Atapi.sys in Drivers directory)
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Services\atapi]
"ErrorControl"=dword:00000001
"Group"="SCSI miniport"
"Start"=dword:00000000
"Tag"=dword:00000019
"Type"=dword:00000001
"DisplayName"="Standard IDE/ESDI Hard Disk Controller"
"ImagePath"="system32\\drivers\\atapi.sys"

;Add driver for intelide (requires intelide.sys in \windows\system32\drivers\)
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Services\IntelIde]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Tag"=dword:00000004
"Type"=dword:00000001
"ImagePath"="system32\\drivers\\intelide.sys"


;Add driver for Pciide (requires Pciide.sys and Pciidex.sys in \windows\system32\drivers\)
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Services\PCIIde]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Tag"=dword:00000003
"Type"=dword:00000001

[{{#filelink: _07b-ATA-IDE-SATA-forPE.reg}} Download the entire .reg file HERE]

Registry File - Quick Fix, Intel only

The below is the minimum to fix IDE mode on Intel boards only that use the IntelIde .sys driver. This will match vendor 8086 (Intel) and cc_0101 which is an ATA controller.

{{#fileanchor: _07b-ATA-IDE-SATA-Intel_min-forPE.reg}}

REGEDIT4

[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&cc_0101]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

;Add driver for intelide (requires intelide.sys in \windows\system32\drivers\)
[HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet001\Services\IntelIde]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Tag"=dword:00000004
"Type"=dword:00000001
"ImagePath"="system32\\drivers\\intelide.sys"

[{{#filelink: _07b-AHCI-SATA-Intel_min-forPE.reg}} Download the entire .reg file HERE]

Explanation of whats going on

Best way to explain what is going on is with a simple example -if you want to fiddle suggest virtualbox with a snapshot or too!

These are the hardware ID's for the IDE controller VirtualBox

PCI\VEN_8086&DEV_7111&SUBSYS_00000000&REV_01
PCI\VEN_8086&DEV_7111&SUBSYS_00000000
PCI\VEN_8086&DEV_7111&REV_01
PCI\VEN_8086&DEV_7111
PCI\VEN_8086&DEV_7111&CC_01018A
PCI\VEN_8086&DEV_7111&CC_0101

Remember the ranking order for devices PCI\VEN_*&DEV_* then PCI\VEN_*&CC_* then PCI\CC_*

By default the cddb entry is the below, the ClassGUID specifies its a HDC (hard disk controller) and the Service it relies on is intelide.sys (in system32\drivers\)

PCI#VEN_8086&DEV_7111

with info

ClassGUID {4D36E96A-E325-11CE-BFC1-08002BE10318}

Service intelide

If you change the cddb key name to

PCI#VEN_8086&CC_0101

It will still work as its dropping back to a lower ranked match, still matching and running the intelide.sys service, (cc_0101 being the 'generic' IDE ATA setting.)

However if you delete that, disable the intelide.sys service (startup 4) and hope to rely on just the pciide.sys service (set startup to 0) using the cddb entry

PCI\#CC_0101

..you will get a 7B stop error as it isn't in the Hardware ID list to match.

(If you looked at the hardwareID list and saw PCI\CC_0101, then it should still work)

Other things to check

BIOS

Modern PC's usually have the storage controller mode set to AHCI in the BIOS by default (instead of IDE or RAID).

This is good because it will let the OS use Native Command Queueing (NCQ) to speed the drive up.

If you have moved hardware and getting a 7B stop error, you can often fix the issue by dropping it back to IDE mode, but this will hamper performance.

You really need to fix it to work with AHCI.

If you just changed it to AHCI and got the 0x00000007B stop error or moved to new hardware with it enabled by default its basically the same problem as described above To fix AHCI or RAID 7B, please see here.

Chipset

There are (very) oldschool AliIde, ViaIde, TosIde service drivers if you look in the Services part of the registry. Although this tut only covers Intel its really the same deal for other chipsets. If you are fiddling with very old kit it may be worth changing these Service's startup to 0 if the board has these chipsets and poking the dev/ven in the CDDB.

The next most likely chipset it probably NVidia If you have moved to NVidia board, the service to look at will be 'nvstor' with Startup set to 0 and again put the correct CDDB entries in. (Although I found in Win7 the nvstor just needed to startup 0 without needing the CDDB entries)

Finding / Understanding your Vendor and Device codes

As this little tut is aimed at Windows users the easiest way is probably using Hirens Boot CD (15.1 at time of writing) and going to the 'System Information' menu. There are several programs to try, the simplest is probably PCI32 which dumps all the hardware as text. Search through it for IDE or ATA or SATA and note down the 4 character device and vendor codes. Generally there will be two for SATA/IDE controllers, (one for pure IDE if it has another chipset on it for IDE, or if its very old probably two IDE and no SATA) and one for AHCI if it is enabled.

  • Note you will see either the SATA/IDE -OR- AHCI but not both at the same time. This depends on what the BIOS is set to at the time you are looking.

In this example from my VM, the VEN is 8086 and DEV is 7111 , which is emulated oldschool IDE controller (not SATA)

Bus 0 (PCI), Device Number 1, Device Function 1
 Vendor 8086h Intel Corporation
 Device 7111h 82371AB/EB/MB PIIX4 IDE
 Command 0007h (I/O Access, Memory Access, BusMaster)
 Status 0000h
 Revision 01h, Header Type 00h, Bus Latency Timer 00h
 Self test 00h (Self test not supported)
 PCI Class Storage, type IDE (ATA)

If you are using Linux (e.g. via Parted Magic Live CD) the easiest thing to do is drop to a terminal and do

lspci -nn

and look through the result. Note I dont see my normal SATA/IDE controllers as I have AHCI enabled. If I changed the BIOS back to IDE compatability mode I would only see the SATA/IDE and not the AHCI.

Look for the device class code starting [01 , ([0106] here with, bus:slot.function=00:1f.2)

00:1f.2 SATA controller [0106]: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller [8086:3a22]
  • Note the [0106] is the device class code (in this case AHCI). (class: 01 "Mass storage controller", subclass: 06 "AHCI controller") This will be part of the catchall matching under AHCI (see the AHCI page) like CC_0106 in Windows - if you look at an SATA/IDE device it will be [0101] (see catchall in .reg file above)

For more info you can do lspci -vvv to get text info and lspci -n to see the vendor/device id's (use the code e.g. 00:1f.2 to match)

I can see from this I am using my SATA drive in AHCI mode, the vendor is 8086 (Intel) and the device ID is 3A22. The reg codes to add for this can be seen here.