Reboot into Safe Mode automatically after Blue Screen

S

Salim

Hi,

Is there a way to cause windows to automatically boot into Safe Mode
after a Blue Screen? That is, the default selected after a blue screen
is not 'Start Windows Normally' but 'Safe Mode'.

I'm trying to test drivers on a remote system. If the remote system
blue screens on boot-up because of a faulty driver, it will
automatically reboot. If it boots into safe mode, I can check for safe
mode and install a clean driver, and reboot the machine.

Or is there a more elegant method to solve the blue screen infinite
loop scenario on an automated system?

Thanks in Advance.
 
M

Malke

Salim said:
Hi,

Is there a way to cause windows to automatically boot into Safe Mode
after a Blue Screen? That is, the default selected after a blue screen
is not 'Start Windows Normally' but 'Safe Mode'.

I'm trying to test drivers on a remote system. If the remote system
blue screens on boot-up because of a faulty driver, it will
automatically reboot. If it boots into safe mode, I can check for safe
mode and install a clean driver, and reboot the machine.

Or is there a more elegant method to solve the blue screen infinite
loop scenario on an automated system?

I can't help you with "a more elegant method" because I'm not a programmer,
but you could set the remote machine to always boot into Safe Mode by
specifying "Safe Boot" from the System Configuration Utility (msconfig).
However, since no network drivers are loaded in Safe Mode, how do you
expect to reconnect to the remote machine once that happens?

There is a Safe Mode with Networking (which doesn't always work - it depends
on the network drivers), but I'm not sure how you would get that
programmatically.

Malke
 
S

Salim

Thanks for the reply.

I can't always boot into safe mode, since the drivers I will be testing
will not be loaded.

Basically, the approach is:

1. Install a driver on a remote machine.
2. Reboot machine for drivers to take effect (there is a kernel space
component)
3. Handle crash scenarios caused by faulty driver.
a. Blue screen on reboot.
This causes an infinite loop. That is, install driver, reboot,
blue screen on startup, the registry setting for blue screens is
reboot, reboot, blue screen on startup, and so on.
I'm trying to prevent this by booting into safemode after a
blue screen, where I can detect safemode (there's an environment
variable that is set), and install a new clean driver, and reboot
windows normally (I do not need network support), theoretically, this
should completely be automated, and not require user interactivity.

If the driver boots fine, I can then run tests remotely on the driver.

There is the approach, where I boot into another partition, and check
to see if a crash occured (using file semaphores), and install a new
driver, and boot into the windows partition. But, I'm also doing this
on Vista, and haven't played with partitioning yet.

Salim
 
M

Malke

Salim said:
Thanks for the reply.

I can't always boot into safe mode, since the drivers I will be testing
will not be loaded.

Basically, the approach is:

1. Install a driver on a remote machine.
2. Reboot machine for drivers to take effect (there is a kernel space
component)
3. Handle crash scenarios caused by faulty driver.
a. Blue screen on reboot.
This causes an infinite loop. That is, install driver, reboot,
blue screen on startup, the registry setting for blue screens is
reboot, reboot, blue screen on startup, and so on.
I'm trying to prevent this by booting into safemode after a
blue screen, where I can detect safemode (there's an environment
variable that is set), and install a new clean driver, and reboot
windows normally (I do not need network support), theoretically, this
should completely be automated, and not require user interactivity.

If the driver boots fine, I can then run tests remotely on the driver.

There is the approach, where I boot into another partition, and check
to see if a crash occured (using file semaphores), and install a new
driver, and boot into the windows partition. But, I'm also doing this
on Vista, and haven't played with partitioning yet.

Yes, I understand what you are doing, but again - how do you expect to
connect to a remote machine in Safe Mode? In any case, this newsgroup isn't
the right venue for your question. You should be posting in 1) a
developers' newsgroup; 2) a developers' newsgroup for Vista. Since you are
working on drivers, you should also see what MSDN has to say about this.

Good luck,

Malke
 
S

Salim

Thanks for your reply.

I'll post my question in the developer forums and MSDN as well.

To answer your question, ideally, when the machine blue screens it
reboots into safe mode, I have a startup script that detects the
machine is in safe mode, installs a driver, and reboots the machine
into "Start Windows Normally" - where I can connect to the machine
again. Basically, the blue screen fix becomes automated and the machine
its on its own, if something bad happens where, well, the machine is in
dead water.

I'm probably going to end up creating 2 partitions and imaging one
partition, and just do clean up that way (which is the way I've heard
nvidia, amd, and ati do their machine cleanup).

Salim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top