How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS on
it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One *assumes* that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi, Christine,

The SoftICE that comes with DriverStudio or DriverSuite Rev. 2.6 can be used
to debug just about anything, we put in special code to load it almost the
first thing. If you need detailed info on how to do it, the guys at our tech
support side (for example, Doug.Johnson@ compuware.com
mailto:xxxxx ) can help you with it.

Alberto.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS on
it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.


You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx>

Edit txtsetup.sif and replace the ‘osloadoptions /nodebug’ with the standard
debug flags from boot.ini. There may be more than one instance of
txtsetup.sif, depending on which version of nt you are installing. If you do
an unattended install you can fully automate this process, otherwise you
have to intervene manually after winnt32 runs and before the system reboots
(the /noreboot option to winnt32 helps here,) or make sure that your boot
drive is FAT, boot to dos and edit the setup files on the harddrive. Of
course you have to have a way to get at your disk from DOS - but you need
this anyhow.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS on
it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One *assumes* that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The preferred, MS “blessed” way is to do two-machine debugging. Run
WinDBG on your debugging host, it’s most convenient if that is also where
you do your building, though that isn’t necessary. Install your driver on
your target, which is *****NOT***** the system where you do your code
development and building, and restart it with the kernel debugger enabled.
If you have set up everything right, you will be able to do full
source-level debugging. For WinNT/2K, your only interface option is a
serial cable, which is really slow if you actually try to do anything
besides break, single step and run. Lots of debug prints will slow it
down a lot, and conditional breakpoints in the StartIo or Interrupt path
will make it so slow, you might as well go take a really long lunch while
you are waiting for it to complete a boot. For WinXP, you can also use
1394, which makes it far nicer. You need XP on both your target and host
in order to use 1394, though.

Alternatively, you can use SoftICE, but that requires extra steps, extra
$$$, and isn’t “blessed”. It can be installed on your target, or you can
debug remotely over several interfaces, though I don’t know exactly which
ones. Running on the target, it’s much (several orders of magnitude, in
my experience) faster for things like conditional breakpoints that take a
lot of hits before the conditional becomes true. Also much faster for
code with lots of DbgPrint() calls. They pack a *lot* of info into that
text mode display…

Do you want it pretty, or do you want it fast?

Hope this helps.

Phil

Please respond to “NT Developers Interest List”
Sent by: xxxxx@lists.osr.com
To: “NT Developers Interest List”
cc:

Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS
on it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.

You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Since Christine didn’t specify whether her driver is replacing one of the
MS drivers that ships with the OS, it’s possible that she would not need
to do this. If she’s replacing a stock driver, such as ATAPI, none of
that is necessary, even if the entire disk is one big NTFS partition. Just
install the driver over the stock one, reboot, and fix the bugs. If she’s
adding a driver to the installation, then this is all correct.

Phil

Please respond to “NT Developers Interest List”
Sent by: xxxxx@lists.osr.com
To: “NT Developers Interest List”
cc:

Subject: [ntdev] RE: How to debug windows startup?

Edit txtsetup.sif and replace the ‘osloadoptions /nodebug’ with the
standard debug flags from boot.ini. There may be more than one instance
of txtsetup.sif, depending on which version of nt you are installing. If
you do an unattended install you can fully automate this process,
otherwise you have to intervene manually after winnt32 runs and before
the system reboots (the /noreboot option to winnt32 helps here,) or make
sure that your boot drive is FAT, boot to dos and edit the setup files on
the harddrive. Of course you have to have a way to get at your disk from
DOS - but you need this anyhow.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS
on it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I guess I assumed she meant initial boot of a non-standard boot driver, as
otherwise indeed the answer is simply use a debugger. She could also have
meant how to debug the osloader and/or the bios boot process, but generally
there is no reason to do that. There are low level x86 debuggers if one
really has to grovel down in that mudpile.

-----Original Message-----
From: Phil Barila [mailto:xxxxx@seagate.com]
Sent: Tuesday, December 18, 2001 3:08 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How to debug windows startup?

Since Christine didn’t specify whether her driver is replacing one of the MS
drivers that ships with the OS, it’s possible that she would not need to do
this. If she’s replacing a stock driver, such as ATAPI, none of that is
necessary, even if the entire disk is one big NTFS partition. Just install
the driver over the stock one, reboot, and fix the bugs. If she’s adding a
driver to the installation, then this is all correct.

Phil

Please respond to “NT Developers Interest List”

Sent by: xxxxx@lists.osr.com

To: “NT Developers Interest List”
cc:

Subject: [ntdev] RE: How to debug windows startup?

Edit txtsetup.sif and replace the ‘osloadoptions /nodebug’ with the
standard debug flags from boot.ini. There may be more than one instance of
txtsetup.sif, depending on which version of nt you are installing. If you
do an unattended install you can fully automate this process, otherwise you
have to intervene manually after winnt32 runs and before the system reboots
(the /noreboot option to winnt32 helps here,) or make sure that your boot
drive is FAT, boot to dos and edit the setup files on the harddrive. Of
course you have to have a way to get at your disk from DOS - but you need
this anyhow.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS
on it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

— You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t know if this will help Christine, but the current rev of SoftICE can
be made to load immediately after ntoskrnl and the hal, and before
everything else. That will allow either local or remote debugging, over
serial or tcp/ip on a supported Ethernet card.

Alberto.

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 3:31 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How to debug windows startup?

I guess I assumed she meant initial boot of a non-standard boot driver, as
otherwise indeed the answer is simply use a debugger. She could also have
meant how to debug the osloader and/or the bios boot process, but generally
there is no reason to do that. There are low level x86 debuggers if one
really has to grovel down in that mudpile.

-----Original Message-----
From: Phil Barila [mailto:xxxxx@seagate.com]
Sent: Tuesday, December 18, 2001 3:08 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How to debug windows startup?

Since Christine didn’t specify whether her driver is replacing one of the MS
drivers that ships with the OS, it’s possible that she would not need to do
this. If she’s replacing a stock driver, such as ATAPI, none of that is
necessary, even if the entire disk is one big NTFS partition. Just install
the driver over the stock one, reboot, and fix the bugs. If she’s adding a
driver to the installation, then this is all correct.

Phil

Please respond to “NT Developers Interest List”

Sent by: xxxxx@lists.osr.com

To: “NT Developers Interest List”
cc:

Subject: [ntdev] RE: How to debug windows startup?

Edit txtsetup.sif and replace the ‘osloadoptions /nodebug’ with the
standard debug flags from boot.ini. There may be more than one instance of
txtsetup.sif, depending on which version of nt you are installing. If you
do an unattended install you can fully automate this process, otherwise you
have to intervene manually after winnt32 runs and before the system reboots
(the /noreboot option to winnt32 helps here,) or make sure that your boot
drive is FAT, boot to dos and edit the setup files on the harddrive. Of
course you have to have a way to get at your disk from DOS - but you need
this anyhow.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS
on it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

— You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thank you for all the replies.

We’re *replacing* the standard MS ATA/ATAPI drivers.

We are particularly interested in debugging Windows (NT/2K) during the
installation process (the installation of *Windows*, that is). It looks
like the below process is our best bet (?) Does this information change any
of the advice we’re received?

–Christine

-----Original Message-----
From: Phil Barila [mailto:xxxxx@seagate.com]
Sent: Tuesday, December 18, 2001 12:08 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How to debug windows startup?

Since Christine didn’t specify whether her driver is replacing one of the MS
drivers that ships with the OS, it’s possible that she would not need to do
this. If she’s replacing a stock driver, such as ATAPI, none of that is
necessary, even if the entire disk is one big NTFS partition. Just install
the driver over the stock one, reboot, and fix the bugs. If she’s adding a
driver to the installation, then this is all correct.

Phil

Please respond to “NT Developers Interest List”

Sent by: xxxxx@lists.osr.com

To: “NT Developers Interest List”
cc:

Subject: [ntdev] RE: How to debug windows startup?

Edit txtsetup.sif and replace the ‘osloadoptions /nodebug’ with the
standard debug flags from boot.ini. There may be more than one instance of
txtsetup.sif, depending on which version of nt you are installing. If you
do an unattended install you can fully automate this process, otherwise you
have to intervene manually after winnt32 runs and before the system reboots
(the /noreboot option to winnt32 helps here,) or make sure that your boot
drive is FAT, boot to dos and edit the setup files on the harddrive. Of
course you have to have a way to get at your disk from DOS - but you need
this anyhow.

-----Original Message-----
From: Christine Ames [mailto:xxxxx@PacificDigital.com]
Sent: Tuesday, December 18, 2001 2:09 PM
To: NT Developers Interest List
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS
on it). How does one debug Windows (NT/2K) while its booting? (If it’s
possible, that is. One assumes that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above
purchasing more sophisticated tools, if necessary.

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

— You are currently subscribed to ntdev as: xxxxx@PacificDigital.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

How to debug windows startup?WinDbg is fine for it.
I have debugged several filesystem filters using it. They are Boot start.

Max

----- Original Message -----
From: Christine Ames
To: NT Developers Interest List
Sent: Tuesday, December 18, 2001 10:08 PM
Subject: [ntdev] How to debug windows startup?

Our driver controls the boot device (boot device = hard drive with the OS on it). How does one debug Windows (NT/2K) while its booting? (If it’s possible, that is. One *assumes* that it’s possible…:wink:

TIA,

–Christine

P.S. We’re using SoftICE & windbg for debugging, but are not above purchasing more sophisticated tools, if necessary.


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com