Is there a program to reboot to safe mode

2

I'm looking for something like Bootsafe but with option to be run silently. Anyone aware of such utility or any special command to be run?

james

Posted 2010-08-19T20:40:46.763

Reputation: 21

Question was closed 2018-01-19T15:23:17.630

Answers

0

One way to trigger the machine to boot into safe mode on Windows XP and below is via the boot.ini file. You can write a simple script or program that can swap out your current boot.ini file with one that contains the /safeboot switch.

example of a regular boot.ini:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

example of a safe mode enabled boot.ini:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /SAFEBOOT:MINIMAL

note the addition of /SAFEBOOT:MINIMAL to the end of the file. In order to edit the boot.ini however, you need to remove the read only attribute and run your script as an administrator.

NOTE: I'd strongly advise you to make a backup of your boot.ini file before attempting this.

John T

Posted 2010-08-19T20:40:46.763

Reputation: 149 037

this will work, but only for 2000/xp/2003 and if the windows installation is not on C drive but another it will fail – james – 2010-08-20T07:23:52.203

1@James Pretty sure boot.ini has been around since ~98. And Yes, this is assuming you have a standard windows install on the C: drive. If you have a different configuration, you should put it into your question so we know your operating system and how your disk is set up. We don't read minds here. – John T – 2010-08-20T12:31:24.127

Your example of a regular boot.ini also includes /SAFEBOOT:MINIMAL. – Velociraptors – 2010-09-25T21:59:49.713

Note that, in general, this is a horrendously bad idea. If safeboot is screwed up, you're left with a doorstop. You'd probably be better to create a new boot line completely, with the new line being the default and safebooted. Then you can "escape" back to normal booting using F8 if something goes wrong. – Billy ONeal – 2010-09-26T03:21:34.217

@John I spent several minutes trying to find the difference between them before I read "note the addition of" and realized that they were actually the same. – Velociraptors – 2010-09-26T03:26:43.017

@Billy "If safeboot is screwed up, you're left with a doorstop." - hardly? You can simply use a boot disk to move the backup copy into place, or even the Windows recovery console. – John T – 2010-09-26T06:16:16.027

@John T: Perhaps, but only if A you have another computer with which you can make the boot disk, or B you already have one. Why take the chance when leaving in the escape hatch is so simple? – Billy ONeal – 2010-09-26T14:51:03.983

We're on superuser... who doesn't have access to a second computer or winxp cd? I mean come on. Yes, you can insert another line, but if your syntax in that line is messed up then you won't be booting at all either. – John T – 2010-09-26T16:42:08.970

0

Use EasyBCD with Vista/7 it allows a lot of different ways to modify your bootrecord, it's easy to use.

http://neosmart.net/dl.php?id=1

Sandeep Bansal

Posted 2010-08-19T20:40:46.763

Reputation: 6 168

easybcd does not work on my xp intall. is there anything that will reboot to safe just by running it and no need to install custom bootloaders – james – 2010-08-20T07:30:28.810

@James: You should have probably specified the platform as a part of the question. @Sandeep: As I mentioned in the comment for @John's answer, you're probably better off creating a completely new boot record with the safe option set rather than modifying the old one, so that you can escape to normal boot using F8 if things go wrong. – Billy ONeal – 2010-09-26T03:23:11.117