{"id":730,"date":"2011-05-14T18:34:36","date_gmt":"2011-05-14T23:34:36","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=730"},"modified":"2011-05-14T18:34:36","modified_gmt":"2011-05-14T23:34:36","slug":"recovering-from-windows-registry-hive-corruption-the-smart-way","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=730","title":{"rendered":"Recovering from Windows registry hive corruption, the smart way"},"content":{"rendered":"<p>from Carl&#8217;s Geek Blog\u00a0\u00a0 <a href=\"http:\/\/www.css-networks.com\/2010\/12\/recovering-from-windows-registry-hive-corruption-the-clever-or-smart-way\/\" target=\"_blank\">http:\/\/www.css-networks.com\/2010\/12\/recovering-from-windows-registry-hive-corruption-the-clever-or-smart-way\/<\/a><\/p>\n<div>\n<p>I like this trick. Every time I do it, I think about all those people doing repair installs (in-place upgrades).<\/p>\n<p><!--more--><\/p>\n<p>It works pretty much every time unless the filesystem is really truly  screwed, in which case you need a backup, say from the system restore  directory (System Volume Information), as per <a href=\"http:\/\/support.microsoft.com\/kb\/307545\">this knowledgebase article<\/a> (don\u2019t bother with the recovery console though, use your USB to IDE or USB to SATA cable and fix it from your laptop.)<\/p>\n<p>Here are the symptoms. You try to start up your Windows 2000\/XP  (Vista too?) computer and you get a message, white text on black  background:<\/p>\n<p>Windows could not start because the following file is missing or corrupt: \\WINDOWS\\SYSTEM32\\CONFIG\\SYSTEM<\/p>\n<p>or<\/p>\n<p>Windows could not start because the following file is missing or corrupt: \\WINDOWS\\SYSTEM32\\CONFIG\\SOFTWARE<\/p>\n<p>Sometimes, the message is cut short, so you might see  \u201c\\WINDOWS\\SYSTEM32\\CONFIG\\SYS\u201d or similar. Hint: If it\u2019s really cut  short, and you can\u2019t see if it\u2019s SOFTWARE or SYSTEM, do the following  procedure on both files. Whichever one is identified as having been  repaired, well that\u2019s the one that was broken <img decoding=\"async\" src=\"http:\/\/www.css-networks.com\/wp-includes\/images\/smilies\/icon_wink.gif\" alt=\";)\" \/><\/p>\n<p>Anyway, how to fix it in 2 minutes:<\/p>\n<p>Use your USB to IDE\/SATA adapter cable, and connect the broken  machine\u2019s hard drive to your laptop, or your spare PC or whatever. You  don\u2019t have to use a USB to IDE\/SATA adapter cable \u2013 if you\u2019re a person  at home with another PC you can stick the drive on a spare IDE or SATA  channel. You just need to get that hard drive into a working Windows XP  computer for a few minutes.<\/p>\n<p>Windows will mount the broken computer\u2019s hard drive as, say E: or F:.  Make sure you have your computer set to show hidden files and also  system files. To check this, go into My Computer -&gt; Tools -&gt;  Folder Options, -&gt; View Tab, and select \u201cShow hidden files\u201d, and make  sure \u201cHide protected operating system files\u201d is not ticked.<\/p>\n<p>First things first, run chkdsk on that drive, after all it is most  likely filesystem corruption that has caused the registry to become  corrupt in the first place. In My Computer, right-click the broken  computer\u2019s drive and choose properties. Go to tools, \u201cCheck Now\u201d, put a  tick in only the first box (Automatically fix filesystem errors), and  click start. Let that finish before continuing.<\/p>\n<p>Here\u2019s where the magic happens. Go to start -&gt; run, and type  regedit [enter]. This will launch the registry editor on your computer.  In the registry editor, highlight HKEY_LOCAL_MACHINE, and then go to  File -&gt; Load Hive. Find the file that is \u201cmissing or corrupt\u201d (from  your error message earlier), and choose to load that. It will be in  E:\\(or F:\\)Windows\\System32\\Config, and will be called just SOFTWARE or  SYSTEM. Regedit will ask you to name the hive, just type \u201cbadpc\u201d (any  old garbage will do \u2013 it\u2019s only temporary).<\/p>\n<p>Regedit will say \u201cOne or more files containing the registry were  corrupt and had to be recovered by use of log files. The recovery was  successful.\u201d You have just repaired the registry! Now you need to  Un-load that hive, so highlight that \u201cbadpc\u201d hive that you can now see  under HKEY_LOCAL_MACHINE, and go to File -&gt; Unload Hive.<\/p>\n<p>You now just need to put that hard drive back in the broken computer,  which hopefully won\u2019t be broken any more! If you used a USB to SATA or  USB to IDE cable from your laptop, make sure you use the \u201cSafely remove  hardware\u201d icon in the system tray next to the clock to safely remove the  hard drive, else you may cause filesystem corruption again.  Alternatively just shut your laptop\/working computer down properly and  remove the hard drive once it\u2019s shut down.<\/p>\n<p>All done.<\/p>\n<p>Some background:<\/p>\n<p>The registry is a database. It has transaction log files which can be  used to recover from corruption. It would appear that the early Windows  boot process is not able to work with those log files, but regedit (and  Windows itself further on in the boot process) is.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>from Carl&#8217;s Geek Blog\u00a0\u00a0 http:\/\/www.css-networks.com\/2010\/12\/recovering-from-windows-registry-hive-corruption-the-clever-or-smart-way\/ I like this trick. Every time I do it, I think about all those people doing repair installs (in-place upgrades).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-730","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=730"}],"version-history":[{"count":2,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/730\/revisions"}],"predecessor-version":[{"id":732,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/730\/revisions\/732"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=730"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}