Solved

How to compact the SYSTEM hive of the registry?

Posted on 2003-12-02
14
2,978 Views
Last Modified: 2007-12-19
Whenever I do something to my system (which otherwise works fine) that causes the SYSTEM-hive of the registry (i.e. the file C:\WinNT\System32\config\SYSTEM) to grow a few bytes I get a "loader error 4" during a subsequent reboot.

I have experimented by now with several different devices, which all used to work with the very same version of their drivers (e.g. it's enough to simply plug in a USB-device into a different port of my hub...) that I have come to the conclusion, that this is not actually a problem of a specfic driver nor some problem with one of the installation programs or such, but rather that I seem to have bumped into some size limit of the registry! I suspect, that I have reached some filebuffer size or some other limit so that my SYSTEM hive can not be loaded into memory during the very first boot phase (the one that starts with the black and white rectangles along the bottom of the screen).

My SYSTEM file is currently at 9'936 KB and I tried de- and re-installing a few devices, but whenever the SYSTE'file's size grows to 9'940 or beyond, I am hosed  and I get this darn "loader error 4". I then always copy down a backup of that file and I'm up and running again.

The idotic thing is: I *can* (re-)install new devices, and I even can use them - all fine - I only MUST NOT reboot after installing them, since then I get this darn "loader error 4" and have to copy back my old SYSTEM file.

So - in short: I want to compact and clean the SYSTEM hive of my registry: Is there any program out there, that really cleans and compacts the registry, particulary the SYSTEM part? I tried a few registry cleaners so far (Norton, MS RegClean, RegDrill, RegScrub, and a few others), but they all clean out only unused or false class definitions, left behind SW settings, dangling application paths, etc. which is all fine and usefull but all these changes eventually refer to stuff that sits in the SOFTWARE part of the registry, none of them so far cleaned anything, that caused my SYSTEM file to shrink.

Since I have attached tons of devices and gadgets to my system over the last couple of years I seem to have an abundance of obsolete drivers and device entries (e.g. when I go to Control Panel => Add/Remove Hardware Wizard => Uninstall/Unplug a device => Uninstall a device and then check the "show hidden devices" checkbox, I see TONS of devices that are obsolete and many others that appear 10, 15 or even more times (e.g. the MS mouse driver or some scan-pen that I use). How can one clean up the superfluous entries? Uninstalling these via the above dialog takes AGES and one always has to restart from the control panel again so I consider that not an appropriate way to remove 200 or more entries. There must be some faster way, e.g. by zapping the corresponding subtrees in the registry. But for that I would first need a decent description and a better understanding of how these devices and their drivers and settings are organized in the registry. Any good pointers on that subject?

Michael
0
Comment
Question by:mmo18
  • 6
  • 5
14 Comments
 
LVL 18

Expert Comment

by:JConchie
ID: 9860964
Instead of "compacting" your registry, why not just give it more room?
For W2K/XP:

--Right click on my computer and go to properties
--select the Advanced tab
--click the Performance Options button
--under Virtual Memory, click change
--at the bottom, under Registry size, increase the maximum registry size.....I'd bet it is currently set at 10 mg.

For NT:
http://www.cae.wisc.edu/fsg/winnt/winnt-performance.html
0
 

Author Comment

by:mmo18
ID: 9861825
Nope - its set to 75 MB (and the dialog you mention indicates that it's current size is at 60MB) and I already tried to give it 100MB (to see, whether that amount is somehow oddly "split" between the misc. hives) but that didn't cure that boot loader error. It seems (i.e. I read that in some other forum) that during the boot phase the SYSTEM part of the registry plus a minimal set of drivers and misc. other stuff have to fit into 16MB. That's seems to be the absolute minimum amount of RAM required to boot a Win2K system. That might explain the roughly 10MB limit for the system part of the registry...
0
 
LVL 18

Expert Comment

by:JConchie
ID: 9861902
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:mmo18
ID: 9862595
Hm - sounded good... However, it turned out that this is a procedure for Win NT 4. Win2K does not have an RDISK utility anymore - in Win2K the equivalent function was integrated into the NTBACKUP utility.

And with NTBACKUP the creation of a registry backup does not seem to reorganize or compact the files anymore: e.g. the SYSTEM file that I just created using NTBACKUP in C:\WinNT\repair\RegBack has a length of 9'932 KB (instead of 9'936 that my "active" registry has right now). So there seems to be no (or no significant) compaction or reorganization taking place with NTBACKUP (as seems to have taken place with RDISK - at least according to the article mentioned).

I also checked NTBACKUP's commandline options, but none seems to trigger a registry compaction...
0
 
LVL 18

Accepted Solution

by:
JConchie earned 250 total points
ID: 9862690
hmmmm........it may be that you are back to option 1.....getting rid of all the old garbage driver entries, etc...........no matter what a laborious job that may be.......I've never run into a situation where increasing the amount of space available for the registry didn't cure this sort of a problem.......very interested if anyone else can come up with something here...
0
 
LVL 18

Expert Comment

by:JConchie
ID: 10044528
Answered.........although it may not have completely solved the issue.......hard to know without feedback from mmo18
0
 

Author Comment

by:mmo18
ID: 10044663
Hi there,
pre-christmas was too busy here, so I haven't yet found time to do the (presumably) laborious job and clean up my garbage drivers (as already foreseen by myself in my initial append...). I hope to get around doing that soon.
So, although JConchie didn't exactly solve my issue, I appreciated his effort. Give him 250 (i.e. half of the points) and the rest I keep for my next challenge...

Hope, JConchie finds that acceptable...
0
 
LVL 18

Expert Comment

by:JConchie
ID: 10044700
Fine by me, thanks. 250 pts and an "A" to me, refund 250 pts to mmo18
0
 

Author Comment

by:mmo18
ID: 10108101
Sorry - this is still pending. The problem is: How do I grant only a part of the points as discussed above? The "Split Points" page insists that I have to distribute ALL points (i.e. I can't "keep" points nor assign them to myself).
0
 
LVL 18

Expert Comment

by:JConchie
ID: 10108354
mmo18,
Go to community support, ask a zero point question requesting that the mods review this question (paste in the url of this question) and requesting that they award 250 pts and an "A" to me and refund the other 250 to you.

Mods, this arrangement is fine by me.
0
 

Author Comment

by:mmo18
ID: 11264539
Fine with me - thanks! And sorry to JConchie for having completely forgotten about him. I had intended to follow his slightly convoluted solution in a spare minute, but then completely forgotten about it.
Michael
0
 

Expert Comment

by:GraemeAsh
ID: 15140940
Hello,

If you get these errors and have tried every other option but have a copy of the software and system hiles either via using REGBACK or from tape, you can use the MS tool called CHKREG.EXE.

See the link

http://www.microsoft.com/downloads/details.aspx?FamilyID=56D3C201-2C68-4DE8-9229-CA494362419C&displaylang=en

This has helped in the past where the hives have exceeded 'Microsoft's recommendations', cheers Bill!

The tool can be used to check and compress the hives.

See parameters below:

D:\Admin\Chkreg>chkreg /?
Checks a hive file and perform repairs, compacts or displays a status report.

CHKREG /F <filename[.<LOG>]> [/H] [/D [<level>] [/S [<bin>]] [/C] [/L] [/R] [/V]


    <filename>      FileName of hive to be analyzed
    /H              This manual
    /D [<level>]    Dump subkeys up to level <level>. If level is not
                    specified, dumps the entire hive. No checks are done
                    when dumping.
    /S [<bin>]      Displays space usage for the bin <bin>. When bin is
                    not specified, displays usage for the entire hive.
    /C              Compacts the hive. Bad hives cannot be compacted.
                    The compacted hive will be written to <filename>.BAK
    /L              Lost space detection.
    /R              Repair the hive.
    /V              Verbose Mode.

You will then need to copy them back through command console into the %WINDIR%\SYSTEM32\CONFIG folder.
TIP: rename the old ones, DO NOT OVERWRITE, just in case.

Cheers
Graeme
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 8 in a W2K Domain 7 586
Cannot raise Forest Functional Level - Administrative Limit Exceeded 8 1,898
Windows 2000, Ghost 2003, disk1 disk 2 mirroring 17 366
Can’t delete a file 14 179
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question