I had worked on a server that had corrupted NTOSKRNL.EXE and HAL.DLL files causing the server to be unable to boot. With the Windows 2003 CD in the system, I could access the recovery console. The files are compressed on the Windows CD in the i386 folder in files ntoskrnl.ex_ and hal.dl_ respectively.
*TIP* By typing the command "MAP" you can see which drive the cd-rom is mapped to as well as the local hard disks.
In order to extract the files, you are supposed to use the expand command like the following: "expand <cd-drive-letter>:\i386\ntoskrnl.ex_ c:\windows\system32". Do the same for hal.dl_.
The problem that I had was that it said "access denied" when trying to expand the files or copy anything to the C drive. I could rename the existing files as a backup without any problems. In order to get around this problem to expand the files from the disk, you can use the SET command. [more]
Typing "SET" command in recovery console will show you the following four settings. By default all entries are set to FALSE.
allowwildcards = Turning this variable on will allow you to use wildcards (the asterisk) with certain commands.
allowallpaths = This variable, when enabled, will allow you to change directories to any folder on any drive.
allowremovablemedia = Turning on this variable will allow you to copy files from the hard drive to any removable media that Windows recognizes.
nocopyprompt = When this variable is enabled, you will not see a message when you try to copy over another file.
Type "set AllowRemovableMedia = TRUE" and then it will let you expand the files from the CD to the hard disk.