How to repair a Windows registry error with Puppy Linux

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

How to repair a Windows registry error with Puppy Linux

#1 Post by steve_s »

I had put together a Windows computer for a friend and she ran into a problem and I got to fix it. It seems she has encountered the "blue-screen of death." Symptoms: the computer would start, begin booting Windows, a registry conflict would occur, the blue-screen error message would flash up for a split-second and the computer would reboot. This would happen indefinitely.

I found this solution to repair a registry using an Ubuntu livecd. Although Ubuntu was one of my first Linux's, and it had its points, Puppy is the way to go for me.

For example, if you follow the steps on the Ubuntu Forum (which I did) yet you use a Puppy livecd, 4.1.2, your life will go much easier as everything is already included with Puppy. So, my hat's off to the person that figured this out on the Ubuntu forum (kerrnoPanic), but I've modified the instructions using a Puppy Livecd.

Oh, if you do this on your own, you assume complete risk of everything. This should be a given, but can sometimes get missed. When you mess with the registry, you can screw everything up if you do it wrong. However if, like me, your computer was already screwed up, then you have nothing to lose. This is what I did:

Summary: essentially what you are doing is relying on the fact that Windows does a registry backup periodically. All we are doing is copying the old registry files to replace the current corrupted ones, making the system reboot and check itself, thus fixing the registry.

Find out what drive is the NTFS drive:

The easiest way I've found is, from terminal run:

Code: Select all

fdisk -l
That's fdsik -list so it tells you what is on every partition of your drive. In this case we are going to assume that your NTFS drive was /dev/sda1, which mine was.

Mount NTFS filesystem:

You will need to mount your Windows partition to backup your corrupted registry files. To do this run the following commands

Code: Select all

 
mkdir /mnt/windows
mount -t ntfs /dev/sda1 /mnt/windows
In Ubuntu this is much more complicated than in Puppy 4.1.2, what with "sudo" this and that and I've always thought that Puppy had much better ntfs support which, in this case, it does.

Replace these files:

You might want to back up the files in /mnt/windows/WINDOWS/system32/config/ before replacing them just in case this is not a registry problem.

Now look in /mnt/windows/System Volume Information/_restore{xxxx}/ and you will see a whole bunch of registry backup folders, each RP(somenumberhere). I found that if you picked one of the ones with an early number you had a better chance of avoiding the registry error that has given you this proble in the first place. So, I picked one of the folders a few options back, not the oldest one.

Now copy the following files from the /mnt/windows/System Volume Information/_restore{xxx}/RPxxx/snapshot/ dir:


_REGISTRY_USER_.DEFAULT
_REGISTRY_MACHINE_SECURITY
_REGISTRY_MACHINE_SOFTWARE
_REGISTRY_MACHINE_SYSTEM
_REGISTRY_MACHINE_SAM

to the /mnt/windows/WINDOWS/system32/config/ dir and rename them as follows:


_REGISTRY_USER_.DEFAULT => default
_REGISTRY_MACHINE_SECURITY => security
_REGISTRY_MACHINE_SOFTWARE => software
_REGISTRY_MACHINE_SYSTEM => system
_REGISTRY_MACHINE_SAM => sam

I noticed that when I renamed the "default" file I ended up with a file called "default.DEFAULT" and that seemed to work prefectly.

Schedule a consistency check:

Run this command to schedule a NTFS consistency check for the first boot into Windows

Code: Select all

ntfsfix /dev/sda1
At first this kicked back an error message saying it couldn't do that. I then unmounted the partition:

Code: Select all

umount /mnt/windows
...and ran the ntfsfix command again. That worked as ntfsfix then mounted it and prepared it to be checked on the next reboot. If that still gives you an error message, reboot your system back into Puppy, then run the command on the correct partition. This way it will be ready to check on the next Windows reboot.

Reboot into Windows twice:

The first reboot you should get a blue screen telling you that you should run a filesystem consistency check. Let the check run and then the second reboot should bring you back into a bootable Windows.

Once I got the copy right and then rebooted, it checked the system perfectly then rebooted great. I was pleased at how easy this was to do with the Puppy 4.1.2 livecd.

Hope you have as much luck with registry repair as I did and then you will have conquered the infamous blue-screen of death!

User avatar
midi
Posts: 10
Joined: Sat 17 Jan 2009, 18:25
Location: earth

#2 Post by midi »

a much easier approach:

Code: Select all

format /y c:/
install linux
be happy
:lol:

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#3 Post by steve_s »

midi wrote:a much easier approach:

Code: Select all

format /y c:/
install linux
be happy
:lol:
Yep, that's the choice I usually make too...

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#4 Post by ecomoney »

Remember to leave the the cd, for when it goes wrong again, or for when they want to do their online banking/shopping/general computing safely. That way they keep their data/phots/documents

Thank you for posting this tutorial Steve.....we all have come to linux in different ways :wink:
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#5 Post by steve_s »

ecomoney wrote: Thank you for posting this tutorial Steve.....we all have come to linux in different ways :wink:
Welcome, just wish we could get a few of them to come to Linux sooner... 8)

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#6 Post by Burn_IT »

but Seriously
Everyone using Windows SHOULD install ERDNT (Emergency Recovery Disk NT) which can automatically back up the registry every day and makes the above recovery procedure easier and more likely to use up to date registry files.
"Just think of it as leaving early to avoid the rush" - T Pratchett

padr
Posts: 1
Joined: Sat 18 Apr 2009, 19:03
Location: Ireland

Thanks to Puppy Linux Community

#7 Post by padr »

I would like thank steve_s for his post above. I had been experiencing a problem with one XP pc with "Windows cannot start due to windows\system32\config\system being missing or corrupt". I did try to follow the microsoft knowledge base kb307545 but for some reason could not get the recovery console to work for me.

I broadly used the steps posted by steve_s but mostly used the GUI and Roxfiler to do the copying renaming etc. I did find I had to try several times to get Roxfiler to open the windows\system32 directory - maybe because there a large number of files in that directory ?

Before I had attempted any of this I had also previously mounted sda1( my windows partition) by clicking the sda1 icon on the desktop and copied over all data type folders to a USB stick in case I was unable to rescue the installation ( or made of mess of the process !). As mentioned in steve_s post all of this at your own risk !

Main thing is the overall operation seems to have been a success - thanks to Puppy Linux for saving the day.

In reply to some of the subsequent comments to steve_s post I think there is a place for both Linux and Windows. Although I have been around computers for a long time ( since DOS - no actually CP/M days ) I have only recently ( in the past couple of months) taken the plunge and delved in a meaningful way into Linux ( have managed to get both Puppy and Tiny Core booting from CD's and USB sticks) so I am still a Linux newbie but am picking things up as I go along. No matter how hard I have tried I simply have not been able so far to get printing working with Linux - neither Puppy or Tiny Core ( but as I say I am still learning). Why must Windows and Linux be portrayed as in competition with each other - why not simply use whichever is easiest for the job at hand ?

I have been lurking in these forums for some time but this is my first post. Thanks again to Barry Kauler and Puppy Community for Puppy Linux

Padr

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#8 Post by steve_s »

padr: weclome to puppy! Yeah, I agree that there is certainly a place for Windows, but I just wish that Windows would admit that. it is a pain to explain to many newbies that yes, there are choices. The beauty of linux: there are plenty of choices.

Anyway, soap-box diatribe moderately averted, glad my thread helped a little. 8)

User avatar
Kicalaf
Posts: 52
Joined: Wed 22 May 2013, 19:54
Location: Belgrade

Just to say thanks to the author of this thread

#9 Post by Kicalaf »

Thanks so much steve_s.

This method saved me yesterday. I am so happy. :P

Much obliged sir.

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#10 Post by Burn_IT »

An even better way to back up and restore the registry in Windows is to use the ERUNT utility rather than rely on the built in one.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#11 Post by steve_s »

Kicalaf wrote:Thanks so much steve_s.

This method saved me yesterday. I am so happy.

Much obliged sir.
You're welcome. Glad it helped! 8)

Post Reply