Debugging Windows Setup and the OS Loader
If your computer hangs in text-mode at the Starting Windows screen and has not connected into the debugger, it may be possible to modify your setup to allow the debugger to connect during startup.
Before debugging can begin, you must start your target computer in Safe Mode and make the following preparations:
- Install the checked version of $LDR$ on the target computer. If you install the full checked build of Windows, this file will be included. If you want to install only this file, you need to look for it under the name setupldr.bin. Copy this file to the root of the first bootable partition on the target computer and rename it $LDR$ (with no file name extension). For instructions on how to install a full checked build or individual checked files, see the Windows Driver Kit.
- Make sure the symbols for the checked version of $LDR$ are included in the debugger's symbol path.
- Set the debugger baud rate to 19200.
- Modify the file txtsetup.sif on the target computer by adding the /debugstop, /debugport, and /baudrate switches to the OsLoadOptions line. Here is an example of a modified txtsetup.sif file:
OsLoadOptions = "/fastdetect /noguiboot /debugstop /debugport=com2 /baudrate=19200"
; OsLoadOptionsVar = "/fastdetect"
; SetupCmdLinePrepend = "CDB"
The exact contents of your file may differ from this. The baud rate should match that used by the debugger (19200 is recommended). The COM port should be the port on the target computer to which the debugging cable is attached.
After these steps have been completed, use the following procedure to connect the debugger:
Debugging Windows Setup and the OS Loader
- Start up the debugger with the -d command-line option, or use CTRL+K to cause the debugger to break in when the first kernel module is loaded.
- When the debugger breaks in, you will see a message that the symbol checksum cannot be verified. Ignore this message! If you want to verify that your symbols are correct, do a stack trace and make sure the first line of the stack trace says osloader!DbgBreakPoint.
Build machine: CAPEBUILD