NTOSKRNL.EXE is Missing or Corrupt

Filed under: PC Errors 

What is the NTOSKRNL.EXE anyway? Well, it is a Windows system file that is located in the Windows\System32 folder on your system disk. It is basically a kernel image of the operating system, and it is critical in Windows operating systems. The file is loaded at computer startup, so the error message “NTOSKRNL.EXE is missing” will appear during the start up phase in case of an error. Related files and error messages can indicate problems with the “hall.dll”, or “ntdll.dll” Windows library files.

What Causes NTOSKRNL.EXE Errors?

NTOSKRNL.EXE errors are mostly caused by a missing or corrupt ntoskrnl.exe or hall.dll file, or by a missing or corrupt boot.ini file. All these files are required during Windows startup, so any problem with the files will cause Windows not to start.

The first requirement is to start your system, which will require a bootable XP CD-ROM or DVD. In the case of W2K, you need the Emergency Repair Disk. Boot NT from the setup disks and select R in the boot menu, after which you will need to enter the ERD. For XP, start from the CD-ROM or DVD and in the setup menu, select R for recovery. Next you will need to select the installation you want to repair and enter the admin password.

Windows XP Recovery Console

To restore the ntoskrnl.exe and/or hall.dll files type these commands at the prompt (each followed by pressing the Enter key):

expand d:\i386\ntoskrnl.ex_ c:\windows\system32
expand d:\i386\hal.dl_ c\windows\system32

Note: This assumes that the Windows system disk is drive C: and that the CD/DVD drive is drive D:. Please modify the command in case your drive letter assignment is different.
When prompted, type a Y and press Enter to overwrite the files during the expand command. Once the files are restored, remove the CD-ROM or DVD and reboot your PC.

BOOT.INI Problems

If the previous action did not solve the problem, the boot.ini file can be the cause of the ntoskrnl.exe error. The boot.ini file is a relatively small text file that stores the configuration of the operating systems on your PC. The boot.ini file is always located in the root of the boot disk, so mostly in C:\.

An example of a boot.ini file looks like this:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect

The timeout value indicates how long the boot menu is shown in case of a multi boot configuration and the [operating systems] section contains entries for each configuration, basically where the operating system is located and using what name it is listed in the boot menu. More details can be found on the Microsoft support site.

If you want to see the boot.ini file, you can access the contents from the System option in the Control Panel (Advanced tab, Settings button in Startup and Recovery), or you can open the system root (C:\) in the Windows Explorer. You will need to enable displaying system files and unhide hidden files before you can see the boot.ini file.

Rebuild the BOOT.INI File

Although you can manually edit the boot.ini file to solve Windows startup errors, the easiest way to restore the boot.ini file is to rebuild it. For this you would again need to start your PC from the Windows XP CD-ROM or DVD. In the setup menu, press the R for the recovery console, select the installation to repair and enter the admin password.

This time, when you see the command prompt, type the command below followed by Enter:

bootcfg /rebuild

The program will search your hard disk(s) for Windows installations (NT, 2000, XP) and show you the results. For each installation it finds, you need to select if you want to add the installation to the boot list (Y) or not (N). When prompted to “Enter Load Identifier”, type the name with which you want to see the installation in the boot menu (this is really only important when you have a multiple boot configuration), and press Enter. When prompted to “Enter OS Load Options”, type “/fastdetect”, which instructs the installation to automatically detect options.

When no new installations are found, you need to type “exit” and press Enter to exit the recovery console and restart your PC.

Further Steps…

Of course there is a reason for any of the Windows system boot files to get corrupted, so once your system starts again, run a chkdsk (check disk) to verify the integrity of your hard disk. It could be that the ntoskrnl.exe error was caused by turning off the computer while it was still shutting down, but in the worst case scenario, your disk has real problems that need to be fixed.

Recommended: scan your PC’s registry for errors.


23 Comments to “NTOSKRNL.EXE is Missing or Corrupt”

  1. gana says:

    i cant install my new printer its canon i think problem is my laptop every time its show me error there is no numbers its something wrong with my defender so could u solve my problem please thanks

  2. Anthony says:

    @gana – I do not think your problem is related to the ntoskrnl.exe, but more likely related to the security settings.
    Defender is probably the Windows Defender program, which is a security program in Windows. It is integrated in Vista, and optional in XP, but in both cases you can disable it. Just go to the Windows Firewall settings in the Security section of the Control Panel and disable it. One warning though: make sure you have some other antivirus software active when you do this, or disconnect from the internet while you do this.
    After disabling the defender, try installing the printer again and then you can enable defender again if you want.

    Here is how to disable Defender in Vista: http://pcauthorities.com/content/pc-security/how-to-disable-windows-defender-in-vista


  3. don says:

    thanks for your explanation about ntoskrnl and hal. dll. That’s can solve my problem

  4. Rick says:

    Great piece- I’m getting


    Error in safe mode. The CD doesn’t fix the problem but noticed that XP home and XP pro were installed on this computer.. help?

  5. Anthony says:

    @Rick – So you have a multi-boot configuration? Did you select the right Windows installation to repair?
    You can try using the Disk Manager to see your partitions on the hard disk, check the driver letter assignments and then see which is the valid Windows version.
    If you use only one of them, I suggest you remove one of them and use a single boot system.
    But make sure you know which partition has the Windows installation you want to keep!

  6. Rick says:

    Anthony- thanks- unable to boot windows to use Disk manager- Can this be done in DOS?

  7. Anthony says:

    @Rick – In the Repair Console, you can use a command called “diskpart” for this (replaces the earlier “fdisk”). But be very careful, as you should not remove the wrong partition. Read the command reference before you use it…

    Have you tried the Recovery Console, run CHKDSK followed by FIXBOOT when the check disk command completes?

  8. Rick says:

    Thanks Anthony- no disk for Windows XP from Compaq unit- I’ll have to manually access the Repair or recovery console via DOS

  9. Robert Blazer says:

    I had the error message :Windows could not start because the following file is missing or corrupt: \system32\ntoskrnl.exe.
    I followed your instructions of May 25, 2009. Windows does start up now, but then I get the error message:
    STOP: 000021 {Bad image checksum}.
    The image comdlg32.dll is possibly corrupt. The header checksum does not match the computed checksum.
    What do I do now???? Help, please!!!

  10. Robert Blazer says:

    Further to my message 9. The error code should read c0000221 and it appears on a blue screen, after the regular Windows XP start up screen with the moving bar disappears.

  11. Anthony says:

    @Robert Blazer – Seems there are more Windows files corrupt. Maybe the simplest is to have the Windows setup repair your installation. Use the CD/DVD to boot the computer, select the regular setup (do not go into the repair console, just press Enter to install Windows). Next, select the existing Windows installation and then press the R key to repair it. If the repair option is not available, end the installation otherwise you will overwrite your Windows installation with a new one.
    The repair will replace all missing or corrupt Windows files.
    Here are some more details on this procedure.

  12. Robert Blazer says:

    Anthony, much better than this it does not get. I followed your instructions and it is working like a charm. Thanks very much.
    PS There were some jpg files that could not be copied, but it is still working great!!

  13. sushant says:

    i have entered the command(top expand to repair the ntoskrnl) as u have entered but its not working.system cannot find the file is coming

  14. sushant says:

    nowits working but the message is unable to create file only in system32 i expanded it other folder it expanded with no prob any reason

  15. sushant says:

    i need sp3 file as i had upgraded my window sp2 to sp3 so its give me a error stop:c000021a

  16. How to fix NTOSKRNL.EXE is Missing or Corrupt…

    # Boot into the Recovery Console (F6) with a Windows Server 2003 CDand a floppy with the Dell SAS5 RAID controller drive (for HinLing’s Dell PE 840 server). # Enter the following commands on the Recovery Console: ## expand e:\i386\ntoskrnl…

  17. Kayla says:

    Need help on this exact issue. I am following the recovery steps for the error ntoskrnl.exe is corrupt or missing, my XP will not boot. I have a dell latitude E6400. When I go to the blue screen above and type R for recovery, the next step does not happen for me (step: Next you will need to select the installation you want to repair and enter the admin password.)

    I am never asked which installation or an admin password. It simply goes to the black command prompt screen where I proceeded to type in the expand commands and it did something (hearing the hard disk activity) then returns ACCESS DENIED.

    Any ideas? I am using the Windows XP Pro 2000 installation CD which includes SP2.

    Any help is GREATLY appreciated.


  18. Anthony says:

    @Kayla – If you have a single boot system, the OS selection screen might indeed not come up. I tested on multi-boot systems, hence the details in the article.
    That it not asking for an admin password is only possible if you have not set an admin password.
    But once you see the command prompt window, the commands should work as long as you are certain it is the admin account.
    The error you are getting indicates there is a problem with the access to the file you are trying to overwrite (restore).
    Try typing:
    attrib -r -s -h c:\windows\system32\ntoskrnl.exe
    Before you execute the first command. This should remove the read-only, hidden and system file attributes of the file.

  19. Shari says:


    Experiencing the same issue as @kayla.

    Tried the attrib command and still get the “Access is Denied” message when trying to remove the read-only, hidden and system file attributes of the file.



  20. Allen Ngaiza says:

    Thanx a lot. Every thing is cool now. It has worked for me.

  21. mohsen says:

    My computer has the ntoskrnl.exe problem
    I put xp cd in my drive & boot from cd
    but the bluescreen doesnt appear
    I cant use R key to repear the windows. my system is restarting.
    please help me.

  22. Anthony says:

    @mohnsen – Not sure if you are using a laptop or desktop, but it could be that there is a problem with the cables of the HDD, so if you use a desktop you can check that.
    Other than that, also make sure the BIOS is configured to boot from CD/DVD, since that can also be disabled.

  23. Rahul says:

    Dell Poweredge 840 Operating System not working/ Kolkata MSC EWS has got corrupted… any solution???

Leave a Reply

You must be logged in to post a comment.