Home > Articles > Home & Office Computing > Microsoft Windows Vista & Home Server

  • Print
  • + Share This
  • 💬 Discuss

Configuring the Windows Home Server Startup

One day, not long after I installed a prerelease version of Windows Home Server, I also installed a screen capture program so that I could capture some screen shots for this book. Unfortunately, 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 any serious (or even minor) startup problems with your Windows Home Server machine. However, just in case you do, there are a few startup tips and techniques you should know about.

The next few sections take you through the most important of these startup tricks, and they involve two components used in the Windows Home Server startup:

  • BOOT.INI—This is a text file that contains some Windows Home Server startup options. You can edit this file to modify the way Windows Home Server starts up.
  • Advanced Options menu—This is a menu of startup commands that you can invoke to load Windows Home Server with different configurations.

Editing BOOT.INI Directly

BOOT.INI is a hidden text file that resides in the root folder of your system's bootable partition. (On Windows Home Server systems, this is always drive C.) Before you work with this file, you need to tell Windows Home Server to display hidden files:

  1. Log on to the server and then select Start, Windows Explorer.
  2. Select Tools, Folder Options to display the Folder Options dialog box.
  3. Display the View tab.
  4. Click to deactivate the Hide Protected Operating System files check box. Windows Home Server asks you to confirm the change.
  5. Click Yes.
  6. Make sure the Show Hidden Files and Folders option is activated (as it is by default in Windows Home Server).
  7. Click OK.

You can now run Windows Explorer and display the C:\ folder. Double-click the BOOT.INI icon to open the file. (Alternatively, select Start, Run, type c:\boot.ini, and click OK.)

Windows Home Server loads the file into Notepad, and you see text similar to the following:

[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="Windows Server 2003 For Small Business Server" /noexecute=optout /fastdetect

There are two sections in BOOT.INI: [boot loader] and [operating systems]. The [boot loader] section always has two values:

  • timeoutThis value determines the number of seconds after which NTLDR boots the operating system that's highlighted in the menu by default.
  • defaultThis value determines which item listed in the [operating systems] section is loaded by default at startup.

The [operating systems] section lists the operating systems to which the system can boot. (In Windows Home Server setups, there is always just one operating system listed.) The Windows Home Server line has a strange configuration, to say the least. The part up to the equal sign (=) is called an Advanced RISC Computer (ARC) pathname, and its purpose is to let a startup program called NT Loader know how to find the Windows Home Server kernel.

Let's run through the various parts so you understand what you're seeing:

multi(n)

This is a reference to the drive controller that's used to access the Windows Home Server installation. The value n is 0 for the first controller, 1 for the second, and so on. On systems that use a SCSI controller, you might see scsi(n) instead of multi(n). (The exception is on systems that have the SCSI BIOS disabled.)

disk(n)

This is a reference to the SCSI ID of the device on which Windows Home Server is installed. For multi devices, the value of n is always 0.

rdisk(n)

This is a reference to the hard disk on which Windows Home Server is installed. This disk is attached to the controller specified by multi(n). The value of n is 0 for the first hard disk, 1 for the second hard disk, and so on.

partition(n)

This is a reference to the partition on which Windows Home Server is installed. This partition is part of the disk specified by rdisk(n).

WINDOWS

This is the name of the folder into which Windows Home Server was installed.

You also see a couple of switches—/noexecute and /fastdetect—that set a couple of startup parameters. The ARC pathname syntax supports more than 30 different switches that enable you to control various aspects of the Windows Home Server startup. Here's a summary of the switches that are most useful:

/basevideo

Boots Windows Home Server using the standard VGA mode: 640x480 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.

/bootlog

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 rein-stall 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.

/debug

Enables remote debugging of the Windows Home Server kernel. This sends debugging information to a remote computer via one of your computer's serial ports. If you use this switch, you can specify the serial port by also using the \debugport=port switch, where port is one of com1, com2, com3, com4, or 1394. If you use a COM port, you can specify the transmission speed of the debugging information by also using the \baudrate= speed switch, where speed is one of the following: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, or 115200. If you use an IEEE 1394 (FireWire) connection, you can also add the /channel=number switch, where number is a channel value between 1 and 62.

/fastdetect

Tells Windows Home Server not to enumerate the system's serial and parallel ports during startup. These ports aren't needed during the boot process, so this reduces the system startup time.

/maxmem=MB

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.

/noexecute=level

Sets the Data Execution Prevention (DEP) policy level. DEP prevents malicious code from executing in protected memory locations. There are four levels, as follows:

OptIn—Windows system programs are protected by DEP, as well as any applications that have been programmed to take advantage of (opt into) DEP protection.

OptOut—Provides DEP protection for the entire system, except for programs that have been specified not to use (opt out of) DEP.

AlwaysOn—Provides DEP protection for the entire system.

AlwaysOff—Provides no DEP protection for the system.

/noguiboot

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.

/numproc=n

In a multiprocessor (or multicore) system, specifies the maximum number of processors that Windows Home Server can use. Use this switch if you suspect that using multiple processors is causing a program to hang.

/pcilock

Tells 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.

/safeboot: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.

/safeboot:minimal

Boots Windows Home Server in safe mode but also bypasses the (alternateshell) 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.

/safeboot: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, if you need access to email or other network-based communications for technical support, or if your computer is running a shared Windows Home Server installation.

/safeboot:dsrepair

This option 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.

/sos

Displays the path and location of each device driver (using the ARC pathname syntax) as it is loaded, as well as the operating system version and build number and the number of processors.

Using the System Configuration Editor to Modify BOOT.INI

Rather than edit the BOOT.INI file directly, you can modify the file indirectly by using the System Configuration Editor. To start this program, log on to the server, select Start, Run, type msconfig in the Run dialog box, and then click OK. When the System Configuration Window appears, select the BOOT.INI tab, shown in Figure 4.12.

Figure 4.12

Figure 4.12 In the System Configuration Utility, use the BOOT.INI tab to modify the BOOT.INI startup file.

The large box near the top of the tab displays the current BOOT.INI text. You can't edit this text directly, however. All you can do is use the check boxes in the Boot Options. You can add other switches (such as /maxmem and /debug) by clicking the Advanced Options button, which takes you to the BOOT.INI Advanced Options dialog box shown in Figure 4.13.

Figure 4.13

Figure 4.13 In the BOOT.INI tab, click Advanced Options to display the dialog box shown here.

Configuring Startup with the Advanced Options Menu

After you start your computer, wait until the Power On Self Test (POST) is complete (this is usually signaled by a beep), and then press F8 to display the Advanced 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 Options menu.) Here's the menu you see:

Windows Advanced Options Menu
Please select an option:

    Safe Mode
    Safe Mode with Networking
    Safe Mode with Command Prompt

    Enable Boot Logging
    Enable VGA Mode
    Last Known Good Configuration (your most recent settings that worked)
    Directory Services Restore Mode (Windows domain controllers only)
    Debugging Mode
    Disable automatic restart on system failure

    Start Windows Normally
    Reboot

Use the up and down arrow keys to move the highlight to your choice.

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. Choosing the Safe Mode option is the same as using the following BOOT.INI switches:
    /safeboot:minimal /bootlog /noguiboot /sos
  • 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. Choosing this option is the same as using the following BOOT.INI switches:
    /safeboot:network /bootlog /noguiboot /sos
  • Safe Mode with Command Prompt—This option is the same as plain Safe mode, except that it doesn't load the Windows Home Server GUI. Instead, it runs CMD.EXE to load a command prompt session. Choosing this option is the same as using the following BOOT.INI switches:
    /safeboot:minimal(alternateshell) /bootlog /noguiboot /sos
  • Enable Boot Logging—This option is the same as the Boot Normally option, except that Windows Home Server logs the boot process in a text file named NTBTLOG.TXT that resides in the system root. Choosing this option is the same as using the following BOOT.INI switch:
    /bootlog
  • Enable VGA Mode—This option loads Windows Home Server with the video display set to 640x480 and 256 colors. Choosing this option is the same as using the following BOOT.INI switch:
    /basevideo
  • 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 is the same as using the following BOOT.INI switch:
    /safeboot:dsrepair
  • Debugging Mode—This option is the same as using the following BOOT.INI switch:
    /debug
  • 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.
  • Boot Normally—This options loads Windows Home Server normally.
  • Reboot—This option reboots the computer.

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 also 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, the Group Policy snap-in, and the Scheduled Tasks folder.

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. (Adding shortcuts to the Startup folder is part of the Start menu customizations that I discuss in more detail in Chapter 16, "Customizing the Windows Home Server Interface.")

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 in %SystemDrive%:\Documents and Settings. Actually, there are three different subfolders you can work with, as follows:
    • \user\Start Menu\Programs\StartupHere, user is the name of a user defined on the system, which in Windows Home Server will almost always be Administrator. A shortcut placed in this folder runs automatically when this user logs on to the system.
    • \All Users\Start Menu\Programs\StartupA shortcut placed in this folder runs automatically when any user logs on to the system.
    • \Default User\Start Menu\Programs\StartupA shortcut placed in this folder (which is normally hidden) is automatically copied to a user's Startup folder when you create a new user account.

Note that only users who have Administrator-level rights can access all three of these subfolders. Users with lesser privileges can work only with their own Startup folder. They can see the All Users version of the Startup folder, but Windows Home Server prevents them from adding files to it.

Launching Items Using the Registry

The Startup folder method has two drawbacks: Users can easily delete shortcuts from their own Startup folders, and users 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 because you'll probably only ever log on with the Administrator account. However, should the need arise, you can work around both problems by using the Registry Editor to define your startup items.

Assuming that you're logged in as the user you want to work with, the Registry offers two keys:

  • HKCU\Software\Microsoft\Windows\CurrentVersion\RunThe values in this key run automatically each time the user logs on.
  • HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceThe 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.)

If you want an item to run at startup no matter who logs on, use the following keys:

  • HKLM\Software\Microsoft\Windows\CurrentVersion\RunThe values in this key run automatically each time any user logs on.
  • HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceThe values in this key run only the next time any user logs on; then they are deleted from the key. Don't confuse this key with the RunOnceEx key. RunOnceEx is an extended version of RunOnce that developers use to create more robust startup items that include features such as error handling and improved performance.

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.

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 Group Policy snap-in can help. Note, however, that Group Policy doesn't work directly with the Run keys in the HKLM and HKCU hives. Instead, these are considered to be legacy keys, meaning they're mostly used by older programs. The new keys (new as of Windows 2000, that is) are the following:

HKLM\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run

These keys do not appear in Windows Home Server by default. You see them only after you specify startup programs in the Group Policy editor, as discussed in the next section. Alternatively, you can add these keys yourself using the Registry Editor.

Adding Programs to the Run Keys

As mentioned, you can either add values to these keys via the Registry Editor, or you can use the Group Policy snap-in. To open the Group Policy window in Windows Home Server, select Start, Run, type gpedit.msc, and then click OK. In the Group Policy window, you have two choices:

  • To work with startup programs for all users, select Computer Configuration, Administrative Templates, System, Logon. The items here affect the Registry keys in the HKLM (all users) Registry hive.
  • To work with startup programs for the current user, select User Configuration, Administrative Templates, System, Logon. The items here affect the Registry keys in the HKCU (current user) hive.

Either way, you see at least the following three items:

  • Run These Programs at User Logon—Use this item to add or remove startup programs using the \Policies\Explorer\Run keys in the Registry. To add a program, double-click the item, select the Enabled option, and then click Show. In the Show Contents dialog box, click Add, 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 item to toggle whether Windows Home Server processes the RunOnce Registry keys (which I discussed in the previous section). Double-click this item 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 item to toggle whether Windows Home Server processes the legacy Run keys. Double-click this item 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 Group Policy snap-in to specify script files to run at startup. You can specify script files at two places, as follows:

  • Computer Configuration, Windows Settings, Scripts (Startup/Shutdown)—Use the Startup item to specify one or more script files to run each time the computer starts (and before the user logs on). Note that if you specify two or more scripts, Windows Home Server runs them synchronously. That is, Windows Home Server runs the first script, waits for it to finish, runs the second script, waits for it to finish, and so on.
  • User Configuration, Windows Settings, Scripts (Logon/Logoff)—Use the Logon item to specify one or more script files to run each time any user logs on. Logon scripts are run asynchronously.

Finally, note that Windows Home Server has policies dictating how these scripts run. For example, you can see the startup script policies by selecting Computer 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.

Using the Scheduled Tasks Folder

Yet another way to set up a program or script to run at startup is to use the Scheduled Tasks folder. (Select Start, All Programs, Accessories, System Tools, Scheduled Tasks, or use Windows Explorer to display the %SystemRoot%\Tasks folder.) When you create a new task, two of the startup options you'll see are the following:

  • When My Computer Starts—Choose this option to run the program when your computer boots, no matter which user logs in. Note that only someone logged in under the Administrator account can use this option. The tasks run otherwise, but they don't display.
  • When I Log On—Choose this option to run the program only when you log on to Windows Home Server. This is the option to use for accounts other than Administrator.
  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus