The Windows Home Server beta and that screen capture
program did not get along. The machine crashed, and I mean hard: It wouldn’t boot into Windows Home Server, nor would it boot to the Windows Home Server DVD or to any bootable medium I added to the machine. The server was simply dead in the water.
Fortunately, I know a
few startup tricks, and I was able to use one of those tricks to get the
machine back on its feet. (Hint: I ran a startup command called Last
Known Good Configuration, which I’ll tell you about shortly.) I hope you
never have serious (or even minor) startup problems with your Windows
Home Server machine. However, just in case you do, you should know about
a few startup tips and techniques.
Configuring Startup with the Advanced Boot Options Menu
After you start your Windows Home Server computer, wait until the Power On Self Test
is complete (this is usually signaled by a beep), and then press F8 to
display the Advanced Boot Options menu. (If your computer is set up to
“fast boot,” it might not be obvious when the POST ends. In that case,
just turn on your computer and press F8 repeatedly until you see the
Advanced Boot Options menu.) Here’s the menu you see:
Advanced Boot Options
Choose Advanced Options for: Windows Server 2008 R2
(Use the arrow keys to highlight your choice.)
Repair Your Computer
Safe Mode
Safe Mode with Networking
Safe Mode with Command Prompt
Enable Boot Logging
Enable low-resolution video (640x480)
Last Known Good Configuration (advanced)
Directory Services Restore Mode
Debugging Mode
Disable automatic restart on system failure
Disable Driver Signature Requirement
Start Windows Normally
The Start Windows
Normally option loads Windows Home Server in the usual fashion. You can
use the other options to control the rest of the startup procedure:
- Safe Mode—If
you’re having trouble with Windows Home Server—for example, if a
corrupt or incorrect video driver is mangling your display, or if
Windows Home Server won’t start—you can use the Safe Mode option to run a
stripped-down version of Windows Home Server that includes only the
minimal set of device drivers that Home Server requires to load. You
could reinstall or roll back the offending
device driver and then load Home Server normally. When Windows Home
Server finally loads, the desktop reminds you that you’re in Safe mode
by displaying Safe Mode in each corner.
Note
If you’re curious to know which drivers are loaded during a Safe mode boot, see the subkeys in the following Registry key:
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\
- Safe Mode with Networking—This
option is identical to plain Safe mode, except that Windows Home
Server’s networking drivers are also loaded at startup. This enables you
to log on to your network, which is handy if you need to access the
network to load a device driver, run a troubleshooting utility, or send a
tech support request.
- Safe Mode with Command Prompt—This
option is the same as plain Safe mode, except that it doesn’t load the
Windows Home Server graphical user interface (GUI). Instead, it runs CMD.EXE to load a command prompt session.
- Enable Boot Logging—This
option is the same as the Start Windows Normally option, except that
Windows Home Server logs the boot process in a text file named NTBTLOG.TXT that resides in the system root.
- Enable Low-Resolution Video (640x480)—This option loads Windows Home Server with the video display set to 640×480 and 256 colors.
- Last Known Good Configuration—This
option boots Windows Home Server using the last hardware configuration
that produced a successful boot. This is the option I used to get my
Windows Home Server machine back on its feet after it was cut off at the
knees by the screen capture program.
- Directory Services Restore Mode—This option applies only to Windows domain controllers, so it doesn’t apply to Windows Home Server machines.
- Debugging Mode—This option enables the Windows kernel debugger during startup.
- Disable Automatic Restart on System Failure—This
option prevents Windows Home Server from restarting automatically when
the system crashes. Choose this option if you want to prevent your
system from restarting so that you can troubleshoot the problem.
- Disable Driver Signature Enforcement—Prevents
Windows Home Server from checking whether device drivers have digital
signatures. Choose this option to ensure that Windows Home Server loads
an unsigned driver, if failing to load that driver is causing system
problems.
Configuring Startup with the System Configuration Editor
The
Advanced Boot Options menu is useful for one-time startup tweaks. If
you want to make a more permanent change to the Windows Home Server
startup, you’re better off using the System Configuration Editor. To
start this program, log on to the server, select Start, type msconfig, and press Enter. When the System Configuration window appears, select the Boot tab, shown in Figure 1.
The large box near the top of
the tab displays the Windows installations on the current computer. I’m
going to assume that you’re not dual-booting your Windows Home Server
machine with another OS, so I’ll skip the multiboot options.
To create the custom startup, you use the check boxes in the Boot Options section:
Safe Boot: Minimal—
Boots Windows Home Server in Safe mode, which uses only a minimal set
of device drivers. Use this switch if Windows Home Server won’t start,
if a device or program is causing Windows Home Server to crash, or if
you can’t uninstall a program while Windows Home Server is running
normally.
Safe Boot: Alternate Shell—
Boots Windows Home Server in Safe mode but also bypasses the Windows
Home Server GUI and boots to the command prompt instead. Use this switch
if the programs you need to repair a problem can be run from the
command prompt or if you can’t load the Windows Home Server GUI.
Note
The value in the following Registry key determines the shell that the /safeboot:minimal(alternateshell) switch loads:
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\AlternateShell
The default value is CMD.EXE (the command prompt).
Safe Boot: Active Directory Repair— Applies
only to domain controllers, so you won’t use it with Windows Home
Server. It boots the OS in Safe mode and restores a backup of the Active
Directory service.
Safe Boot: Network—
Boots Windows Home Server in Safe mode but also includes networking
drivers. Use this switch if the drivers or programs you need to repair a
problem exist on a shared network resource, or if you need access to
email or other network-based communications for technical support.
No GUI Boot—
Tells Windows Home Server not to load the VGA display driver that is
normally used to display the progress bar during startup. Use this
switch if Windows Home Server hangs while switching video modes for the
progress bar, or if the display of the progress bar is garbled.
Boot Log— Boots Windows Home Server and logs the boot process to a text file named NTBTLOG.TXT that resides in the %SystemRoot%
folder. Move to the end of the file, and you might see a message
telling you which device driver failed. You probably need to reinstall
or roll back the driver. Use this switch if the Windows Home Server
startup hangs, if you need a detailed record of the startup process, or
if you suspect (after using one of the other Startup menu options) that a
driver is causing Windows Home Server startup to fail.
Note
%SystemRoot% refers to the folder into which Windows was installed. Windows Home Server is always installed in C:\Windows, so on Windows Home Server systems, the %SystemRoot% environment variable always refers to that folder.
Base Video—
Boots Windows Home Server using the standard VGA mode: 640×480 with 256
colors. This is useful for troubleshooting video display driver
problems. Use this switch if Windows Home Server fails to start using
any of the Safe mode options, if you recently installed a new video card
device driver and the screen is garbled or the driver is balking at a resolution
or color depth setting that’s too high, or if you can’t load the
Windows Home Server GUI. After Windows Home Server has loaded, you can
reinstall or roll back the driver, or you can adjust the display
settings to values that the driver can handle.
OS Boot Information—
Displays the path and location of each device driver as it loads, as
well as the operating system version and build number, the number of
processors, the system memory, and the process type.
You can also click the Advanced Options button to display the BOOT Advanced Options dialog box shown in Figure 2. You can set the following options:
Number of Processors—
In a multiprocessor (or multicore) system, specifies the maximum
processors that Windows Home Server can use. Activate this check box if
you suspect that using multiple processors is causing a program to hang.
Maximum Memory— Specifies
the maximum amount of memory, in megabytes, that Windows Home Server
can use. Use this value when you suspect a faulty memory chip might be
causing problems.
PCI Lock—
Activate this check box to tell Windows Home Server not to dynamically
assign hardware resources for PCI devices during startup. The resources
assigned by the BIOS during the POST are locked in place. Use this
switch if installing a PCI device causes the system to hang during
startup.
Debug— Enables remote debugging of the Windows Home Server kernel.
This sends debugging information to a remote computer via one of your
computer’s ports. If you use this switch, you can use the Debug Port
list to specify a serial port, IEEE 1394 port, or USB port. If you use a
serial port, you can specify the transmission speed of the debugging
information using the Baud Rate list; if you use an IEEE 1394
connection, activate Channel and specify a channel value; if you use a
USB port, type the device name in the USB Target Name text box.
Launching Applications and Scripts at Startup
Two key features of Windows
Home Server are that it’s always on and that it’s always available to
computers and devices on the network. Many people take advantage of
these features to run programs and scripts on the server. For example,
one common Windows Home Server application is a home automation system.
Another is a program that sends random images to a digital photo frame.
Because you want these and
similar programs to be always running, you can save yourself the hassle
of launching these programs manually by getting Windows Home Server to
do it
for you automatically at startup. Similarly, you can get Windows Home
Server to automatically launch scripts or batch files at startup. As the
next few sections show, you can set up a program or script for
automatic startup launch using the Startup folder, the Registry, group policies, and the Task Scheduler.
Launching Items Using the Startup Folder
The Startup folder is a
regular file folder, but it has a special place in Windows Home Server.
You can get a program or script to run automatically at startup by
adding a shortcut for that item to the Startup folder.
Note that the Startup folder appears twice in the Windows Home Server interface:
Via the Start menu. (Click Start, All Programs, Startup.)
Via Windows Explorer as a subfolder:
%AppData%:\Microsoft\Windows\Start Menu\Programs\Startup
Note
%AppData% refers to the folder that contains the current users data, which in Windows Home Server is %SystemDrive%:\Users\Administrator\AppData\Roaming.
Tip
You can prevent the Startup
items from running by holding down the Shift key while Windows Home
Server loads. (Hold down Shift after logging on.)
Launching Items Using the Registry
The Startup folder
method has two drawbacks: Anyone who has access to the server can easily
delete shortcuts from the Startup and can bypass Startup items by
holding down the Shift key while Windows Home Server loads. These aren’t
likely to be major problems on Windows Home Server. However, should the
need arise, you can work around both problems by using the Registry
Editor to define your startup items.
The Registry offers two keys (note that these are in HKEY_CUURENT_USER, which is the key for the current user’s settings):
HKCU\Software\Microsoft\Windows\CurrentVersion\Run— The values in this key run automatically each time the user logs on.
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce—
The values in this key run only the next time the user logs on; then
they are deleted from the key. (This key might not be present in your
Registry. In that case, you need to add this key yourself.)
To
create a startup item, add a string value to the appropriate key, give
it whatever name you like, and then set its value to the full pathname
of the executable file or script file that you want to launch at
startup.
Tip
If the program is in the %SystemRoot%
folder, you can get away with entering only the name of the executable
file. Also, if the program you want to run at startup is capable of
running in the background, you can load it in this mode by appending /background after the pathname.
Launching Items Using Group Policies
If you prefer not to edit the
Registry directly, or if you want to place a GUI between you and the
Registry, Windows Home Server’s Local Group Policy Editor can help.
Note, however, that the Local Group Policy Editor doesn’t work directly
with the Run keys in the HKCU
hive because these are considered to be legacy keys, meaning they’re
mostly used by older programs. The new key (new as of Windows 2000, that
is) is the following:
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
This key doesn’t appear in
Windows Home Server by default. You see it only after you specify
startup programs in the Local Group Policy Editor, as discussed in the
next section. Alternatively, you can add these keys yourself using the
Registry Editor.
Note
The startup items run in the following order:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
Startup folder (all users)
Startup folder (current user).
Adding Programs to the Run Key
To open the Local Group Policy Editor in Windows Home Server, select Start, type gpedit.msc, and press Enter. In the Local Group Policy Editor window, select User Configuration, Administrative Templates, System, Logon.
You see at least the following three policies:
Run These Programs at User Logon— Use this policy to add or remove startup programs using the \Policies\Explorer\Run
key in the Registry. To add a program, double-click the policy, select
the Enabled option, and then click Show. In the Show Contents dialog
box, enter the full pathname of the program or script you want to run at
startup, and then click OK.
Do Not Process the Run Once List— Use this policy to toggle whether Windows Home Server processes the RunOnce
Registry key (which I discussed in the previous section). Double-click
this policy, and then activate the Enabled option to put this policy
into effect; that is, programs listed in the RunOnce key are not launched at startup.
Do Not Process the Legacy Run List— Use this policy to toggle whether Windows Home Server processes the legacy Run
key. Double-click this policy and then activate the Enabled option to
put this policy into effect; that is, programs listed in the legacy Run key are not launched at startup.
Specifying Startup and Logon Scripts
You also can use the Local
Group Policy Editor to specify script files to run at startup. Select
User Configuration, Windows Settings, Scripts (Logon/Logoff),
double-click the Logon policy, click Add, and then specify the location
of the script. You can also use the Logoff policy to specify a script to
run when you log off Windows Home Server.
Finally, note that Windows
Home Server has policies dictating how these scripts run. For example,
you can see the startup script policies by selecting User Configuration,
Administrative Templates, System, Scripts. Three items affect startup
scripts:
Run Logon Scripts Synchronously— If you enable this item, Windows Home Server runs the logon scripts one at a time.
Run Startup Scripts Asynchronously— If you enable this item, Windows Home Server runs the startup scripts at the same time.
Run Startup Scripts Visible— If you enable this item, Windows Home Server makes the startup script commands visible to the user in a command window.
For logon scripts, a
similar set of policies appears in the User Configuration,
Administrative Templates, System, Scripts section.
Caution
Logon scripts are supposed
to execute before the Windows Home Server interface is displayed to the
user. However, Windows Home Server’s Fast Logon Optimization can
interfere with that by displaying the interface before all the scripts
are done. The Fast Logon Optimization feature runs the user logon
scripts asynchronously, which greatly speeds up the logon time because
no script has to wait for another to finish.
To prevent this, select
Computer Configuration, Administrative Templates, System, Logon and
enable the Always Wait for the Network at Computer Startup and Logon
setting.
Using the Task Scheduler
Yet another way to set up a program or script to run at startup is to use the Task Scheduler. (Select Start, type task,
and then click Task Scheduler.) When you create a new task (by clicking
Create Basic Task), two of the “trigger” options you’ll see are the
following: