Tag Archives: windows2008

Fixed – “The filename, directory name, or volume label syntax is incorrect" when you add a hard drive to Windows 2008 R2 backup

Apparently, according to Microsoft KB Article 2009365 this issue occurs when a previously hard drive (or the only previously defined) hard drive has been removed from the server and a new drive is being attached. This is typically the case when setting up a new server and preconfiguring the backups to go to the second identical usb drive. Most people are just going to unplug the drive leaving the old power supply and usb cable attached to the server and power and plug in the new drive and then attempt to add it to the backup schedule. At this point the backup program will give the error “The filename, directory name, or volume label syntax is incorrect” as the old drive is no longer attached. Microsoft have a couple of solutions, including adding the first drive back to the server, or removing the first drive. Neither of which are very helpful if you are just swapping the external drive itself. The final solution is to add the drives from an elevated command line using the following.

  1. Run the following command from an elevated command prompt to determine the Disk Identifier of the new disk:
    wbadmin get disks
  2. Based on the output, locate the disk that will be added to the scheduled backup. Make a note of the Disk Identifier. The output will resemble the following:
    Disk name: xxxxxxxxxxx
    Disk number: x
    Disk identifier: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
    Total space: xxx.xx GB
    Used space : xxx.xx GB
  3. Run the following command to add the new disk to the Scheduled backup. Use the Disk Identifier from the previous step as the "AddTarget" parameter.
    WBADMIN ENABLE BACKUP -addtarget:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
  4. When you receive the following prompt, type Y for Yes.

"Do you want to enable scheduled backups with the above settings?"

5. You may be prompted to format the drive if it was previously used in another server or for another purpose.

The screenshot below shows the addition of a USB drive to my virtualised SBS server.

image

Fixed – Windows 2008 Server continually boots into safe mode.

We had a weird issue this morning after applying windows updates to a server and found that the server had rebooted into safe mode. We tried various methods of forcing the server back to normal mode through the F8 prompt, even attempting a Windows Repair from cd but nothing seemed to work.
In the end we ran “bcdedit /deletevalue safeboot” from the command prompt, rebooted the server and it came back up in normal mode. There was a long, very dramatic pause, whilst the server reverted changes to the windows updates but we were eventually able to log back into the server. We then took a snapshot and installed the windows updates 50% at a time – and of course, this time every patch installed successfully.
I suspected that the server was reading the bcd and booting into safe mode, but I’d have thought that pressing F8 and selecting normal mode would have overwritten this selection – obviously I was wrong.
I really long for the good old boot.ini days.
The Technet article “Restart the domain controller in Directory Services Restore Mode Remotely” gave us the bcdedit commands to run. It was amazing how many google hits there are for failing to restart a server in safe mode (oops – here’s another one), but not many on how to stop a Windows 2008 Server from starting in safe mode.

Howto enable Group Policy event logging in Windows2008

There are many websites on the internet that talk about the previous method of enabling group policy logging by adding the UserEnvDebugLevel registry entry as per Microsoft kb article 221833. Unfortunately this does not work in Windows2008 and the kb article does not link to another article that does work.

However I found out that this was changed (in Vista I think) to a different registry entry and a new log file is created. Create a new Dword value called GpSvcDebugLevel under HKLM\Software\Microsoft\Windows NT\Current Version\Diagnostics and set the value to 100002 (in hex). This will then create a file called gpsvclog.log in the %windir%\debug directory.

It looks like the preferred method of debugging the logs is to read the events that are stored in Eventvwr under Applications and Services Logs\ Microsoft\ Windows\ GroupPolicy\ Operational

Blat crashes when an email is sent – fixed.

I had an issue with blat yesterday with a new script I was working on. Every time I sent an email, it would crash and I would get “A Win32 command line eMail tool has stopped working.” As this was also running on a Windows2008 server this was also affecting the reliability index on the server – one of the things we check as part of our checkups.
I spent a good while trying to work out what was wrong, typed out the command to send mail and it worked – so I knew the issue was not blat itself. After calling over a colleague to help, demonstrating the (reproducible) problem of pasting the script line and crashing blat I asked what was wrong. The two of us still took a couple of minutes before he realised I had mistyped the server name used to send the mail. Instead of domain.com.s6a1.psmtp.com I had entered domain.com.s6a1.pmstp.com
Sure enough – if the mail server hostname can not be resolved by blat – it will crash. I was also able to reproduce this on my Windows7 machine at home too.

A simple fix but difficult to find after looking at code for a long time – getting someone else to look at your code often does wonders.

Mounting cd images in Windows 2008

I downloaded an evaluation copy of Windows2003 for my MCSE training tonight from Microsoft. The cd image is in an img file that of course can not be read by Hyper-V! Now I could burn the file to a cd and then capture the image within Hyper-V but that was too much work and I’d have to hunt for a blank cd. I knew that VirtualCloneDrive wouldn’t work in Windows2008 as I had already tried this for something else earlier on, but I did find MagicISO – a package I had also used on XP – it said it would work on 64Vista and as Windows2008 seems to have a lot of similarities with Vista I thought I’d give it a go….I ran the install of MagicISO and then mounted the img file with it and explorer recognised the drive. I closed down the Hyper-V console, re-opened it and was able to capture my new drive for my new Windows 2003 installation. It’s working very well – highly recommended.
Hopefully this will come in handy for others as I couldn’t find any useful information on mounting a virtual iso img or cd image in Windows 2008