Need a startup/boot delay for your Windows Server?

Try and do a search on this and what you’ll get is a huge list of people bitching about how long it takes for their server to start, load group policy, login, zzzzzz.  Whatever, these SAs are losers; they have no idea why their network sucks and they’re too lazy to get under the hood and troubleshoot.

What I’m talking about are those situations where you want to intentionally delay the start of one or more servers.  A good reason for this would be if you use a SAN and said servers are expecting their LUNs to be online before they are.  In my particular case, if the SAN is not available by the time the server wants to bring them online, then they are joined in an offline state.  This just creates additional a**pain for me, which I always like to avoid.  Another situation to avoid is starting more than one node of a cluster at the same time, which can result in a deadlock situation (the bubbas at M$ say that this is no longer an issue beginning in Server 2008… let me know if anyone has first hand experience).

So in Windows Server 2003, this is pretty easy.  Just go into your System Properties | Advanced | Startup and Recovery and modify your boot.ini to give yourself an identical option (just with a different name).  This turns on the boot selection screen with the delay selected.

In Server 2008, the concept is the same, just a little trickier.  This time, you have to run it through the command line, using a tool called BCDEdit.  The advantage to this is that it works in both full install AND server core!

So here’s how you do it:

  1. Open an elevated command prompt (you forgot about UAC again, didn’t you)
  2. Enter: bcdedit /copy {current} /d “Boot Delay Placeholder” (you can call it whatever you like… and that {current} is literal.  This gives you a second option in the boot configuration.
  3. Enter: bcdedit /timeout xx where xx is the number of seconds to leave the selection menu displayed.  Personally, I use a number like 300, but feel free to use 167 instead.

Now, when the system reboots (say, after a power failure), the machine will sit there fat, dumb, and happy for the time you indicated.

Don’t say I never helped you out…

Advertisements

9 Comments

  1. Posted July 7, 2010 at 11:16 pm | Permalink | Reply

    Hey, I think I’m one of the loser SAs! Guess that’s why you’re doing now 🙂 Good info; this is why we have blogs.

  2. Mister
    Posted May 24, 2011 at 5:42 pm | Permalink | Reply

    Um… You left out /copy before the {current}… Server 2008 R2…

    • Posted May 24, 2011 at 5:54 pm | Permalink | Reply

      Yep, I sure did… thanks for the catch Mister! Post is fixed.

      • Mister
        Posted May 24, 2011 at 6:13 pm | Permalink

        No problem, thanks for updating the post so quickly. 😀 Very helpful.

  3. Jon Gold
    Posted June 9, 2011 at 7:44 pm | Permalink | Reply

    This is great! I’ve been searching for a way to delay my exchange server to wait for Active Directory to be reachable. Unfortunately XenServer doesn’t do this for me, but now, thanks to you, I have realized that Windows does. 🙂

  4. Saint
    Posted October 17, 2011 at 5:20 pm | Permalink | Reply

    Hello,
    this didn’t work for me.. what am i doing wrong???

    C:\Windows\system32>bcdedit /copy {current} /d “Boot Delay Placeholder”
    A description for the new entry must be specified.
    Run “bcdedit /?” for command line assistance.

    • Posted November 9, 2011 at 3:38 pm | Permalink | Reply

      Saint,

      Your entry looks like mine, so it should work. Keep in mind though, that I may have done it on a different server version than yours. You’ll need to look at “bcdedit /?” on your system to see if your entry needs to be modified. If you tell me what server version you’re running, I may be able to provide a suggested command for you.

  5. GZA0099
    Posted January 22, 2013 at 2:26 pm | Permalink | Reply

    Thanks … saved me some time…

  6. Ryan S.
    Posted June 14, 2013 at 8:10 am | Permalink | Reply

    A headless Fedora server using systemd boots in about 2-3 seconds. I pity Windows users. Although boot times are the least of your worries.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: