Sunday, April 27, 2008

'\windows\system32\config' and '\windows\system32\ntoskrnl.exe' missing or corrupted!Save it with Linux

Often Windows system suffers from dreaded errors like '\windows\system32\config\system' and '\windows\system32\ntoskrnl.exe' missing or corrupted! Most people consider reinstalling the whole system but that's not the solution when you could save it.One can save windows from these dreaded errors using Linux Live CD(Uuntu,fedora etc.).If you have dual boot it's even better.First I would discuss '\windows\system32\ntoskrnl.exe' error. The solution is simple.Your ntoskrnl.exe is damaged and you have to replace it with backup copy from dllcache folder. If you have NTFS partition you have to install ntfs-3g (In case you don't have that on CD or Linux partition).Here we go.

*Boot into Linux partition or Live CD.

*Open command console and login as root.

*Create a directory by typing 'sudo mkdir /media/windows'

*Then mount your windows partition on to this by typing 'sudo mount -o rw /dev/sdaX /media/windows' .In most cases your windows partition will be sda1 or hda1.Try to get this info by using Gparted.

*Now copy the backup copy of ntoskrnl.exe by typing 'cp /media/windows/windows/system32/dllcache/ntoskrnl.exe /media/windows/windows/system32'.

*It will ask do you want to overwrite.Type 'y'.You are done.Remove Live CD or exit from Linux partition to restart.You can happily log on to your windows back without any error.

If your machine sufers from '\windows\system32\config\system' error then process is similar but you have to copy the back up copies of registry files from system volume information folder.This works only if you had turned on system restore feature in windows.You have to find 5 registry files(system,security,sam,software,user) and copy them to \windows\system32\config\system folder.Here is the link that details this process.

Hope this helps to people who are in need and don't want to reinstall the whole thing.You can also do this operation using windows installation CD and entering in recovery console.But I prefer Linux because you can simultaneously do other things rather than getting stuck in command prompt.

No comments: