Saturday, April 26, 2008

System hive too large with 32 bit XP and 3GB switch

When using the /3GB switch with 32 bit Windows XP, you can easily hit a 12 (or 10.4?) MB limit for the system registry hive. This is the size of your C:\Windows\System32\config\SYSTEM file.

Symptoms include errors like Windows cannot start new hardware devices because the system hive is too large (exceeds the Registry Size Limit). (Code 49), and can get as bad as a STOP error when trying to boot the system with the /3GB switch.

To reduce the size of this registry hive, you can:

Run a registry optimizer like Lars Hederer's free NTREGOPT.

This will defragment the registry and save some space.

While there, also get his registry backup and restore program ERUNT ("Emergency Recovery Utility NT"). Run that regularly, and consider making him a donation for his fine utilties.

If that is not enough, you need to

Remove references in the registry to hardware you no longer use.

Usually, this is mostly external drives and USB flash drives which are no longer connected to the system. These can be removed automatically with the Veritas VxScrub program. Just run
Vxscrub -p
and reboot.

If you would like to also remove refenrences to unused printers, mice, keyboards and other stuff, you need to do it manually in the Device Manager, deleting devices one by one.

To make Device Manager display all the devices in the registry instead of only the currently connected devices, you need to run this in a command prompt window (or put both lines into a batch file which you could name ShowAllDevices.bat:
set DEVMGR_SHOW_DETAILS=1
set DEVMGR_SHOW_NONPRESENT_DEVICES=1
start devmgmt.msc
Then in Device Manager, you need to select View -> Show hidden devices. They will appear in a lighter color.

After deleting what you don't need, reboot and run NTREGOPT (which will have you reboot again).

A note about NTREGOPT:
It is not a very polite utility in a multitasking environment. It will tend to completely freeze your system, and it's progress bars are not very informative either (they only move when going from one registry hive to the next). The software and system hive optimization can easily take many minutes, during which you can do nothing on the system except watching a progress window which seems caught in an endless loop. Don't worry and be patient. The utility does work fine.

Labels: , , , ,