Monday 18 October 2010

Backing up laptops on a network

As a recent post noted, Offline Files is still a temperamental technology that I have decided is not worth the effort on Windows 7. So what other systems can you use? Take note of the following:

  • By default, Windows 7 will create a restore point on the laptop’s hard drive every day. This can be used to retrieve a previous version of a file
  • Windows Backup can be used to make a backup of files onto an external HDD. However, it has very limited options, and I recommend considering the use of either an external disk with its own software, such as the Seagate Replica, or a third party program such as Karen’s Replicator from karenware.com
  • Commercial backup software such as MS DPM or Seagate BackupExec can have agents installed to automatically back up a laptop to a server, in conjunction with a server based installation of the software.
  • Robocopy can be run from a server to automatically back up using a script. In the rest of this article I will describe this option further.

Robocopy is a command line tool that has been available since the days of Windows NT and has been progressively refined since then. It is a powerful tool that we have used to do some of our backups up until now. There are many parameters and settings that can be used. The following is a list of these and how they are being used in the evaluation so far:

Source directory: typically \\%1\%2\%3\documents and \\%1\%2\%3\desktop are used (Robocopy is being invoked twice, once for each path). %1 is the Netbios name of the laptop. %2 is the sharename, %3 is the foldername within that share. Typically you will need to share the Users folder in Windows 7 or Documents and Settings in Windows XP, in which case %3 is also the Windows username of the user. To avoid visiting each laptop user, if you are the domain admin, use Computer Management to connect to each laptop in turn and then create this share. I use random strings of 20 characters followed by the $ sign to name each laptop share individually and keep it hidden. Grant Read permissions to Everyone on the new share. Windows file permissions will still prevent anyone other than the user and Administrators from accessing these files.

Target directory: Typically this might look like \\server\share\%3\backup\documents or \desktop depending on the source directory as above. This makes use of a target folder based on the username of the user, which is the same parameter as was used on the source directory.

Filespec: I recommend you create a settings.rcj file and use it with the /JOB:settings parameter. In the RCJ file you place the option /IF on a line by itself and then one filespec per line thereafter. At the moment this will look like:

/IF

*.do*

*.xl*

*.md*

*.acc*

*.pp*

*.pub*

which will pick up most Office files. Add, delete or change to suit.

Other options: /R:45000 /w:1 /B /FP /V /S /MIR /MT /TEE /LOG+:%3.log. Put the rest of these except the last (log) option into the RCJ file (one per line). Specify the log on the command line.

/R: /W: specify a retry option and wait between retries (in seconds). The settings shown wait for up to 12 hours. The recommendation would be to run this with Task Scheduler and get it to force termination at a lesser interval than the frequency you are running this on (e.g. 20 hours if you are running daily) and adjust the retry count as appropriate.

/B will try to use Backup mode if you don’t have the full file permissions set up for backup. /FP, /V and /TEE are logging settings. /S is for copying files in subdirectories. /MIR ensures that the backup mirrors the source. This option deletes files on the target if they are deleted from the source, so it isn’t the setting to use if you want to guard against file deletions. /MT makes Robocopy use multiple threads. /LOG is used to create a log file, the + option appends to an existing log file of the same name.

The actual calls to Robocopy are contained in our case in a Robobackup.cmd command script. I write an individual CMD file for each laptop and set up Task scheduler to start this, in the cmd script it makes the call to Robobackup.cmd passing in the parameters specified. The idea is one backup per day in a 12 hour window. But you could be more versatile and try for three backups each in a 4 hour window. I am still tweaking our test environment to see what we can do, and I expect a few different options will be tried out, and these might also include turning on Shadow Copies on the server where the backups are being stored to see if it will keep previous copies.

In the end I changed R and W to 0 and taskscheduled my task to run 12 times a day, every hour. This sounds like a lot and might well prove to be, but given that laptops will not be connected a lot of times, and that it will quit immediately if it is not, the amount of traffic probably won’t be as much as one would think. Another option is to trigger if the laptop is connected, but this requires a custom script or other means to detect connection (pinging would achieve this).

UPDATE:  Task Scheduler seems to have problems when it starts a command script that starts another command script that finally runs Robocopy. There also seem to be problems with a command script that has more than one command line in it.

After a lot of trial and error, therefore, my scheduled task is calling a cmd script that runs Robocopy directly using parameters that are passed into it. The task action passes four parameters into the command script that specify the laptop name, share name, username and folder for the source path. One of these also specifies part of the destination path, and another specifies another part of the destination path and the name of the log file. There are two task actions for each user, which arrange to back up the Desktop and Documents folders respectively. The common settings are passed in a .rcj file. There may be a fifth parameter to specify the rest of the destination path once I get my head around where these backups are going to be stored.

Saturday 16 October 2010

Solving Group Policy deployment headaches in Windows 7

One of the most distasteful features of using Windows Vista and Windows 7 computers in a domain environment is their tendency to freeze during the Group Policy application phase of user logon. Although it is known that there were some instances of this occurring with Windows XP as well, we never saw these happen in our experience and first saw the problem in Windows Vista and Windows 7. The most common scenario for these problems is during the deployment of Group Policy Preferences for Printers. Extremely long timeouts going up to overnight in duration have been observed on some occasions, most commonly when a new computer is logged into for the first time. Although today I saw a laptop take a very long time to apply Folder Redirection policy, this is unusual whereas GPPP is the most common scenario by far. Even though event logging is greatly improved in Windows 7, there is still insufficient information recorded in the event logs for these instances. My latest effort is to get all the logging options turned on, both those specifically for GPPP logging and user environment processing, and hopefully with the logs now being produced routinely on all our computers we might get some progress towards resolving this matter. The fact that MS has failed to address this to date is a serious concern from my POV, even to the extent their logon processing should force the logon to continue after a reasonable period of time without these very excessive delays.

Windows Live Essentials gets a makeover

Well, Windows Live Essentials has been updated to the 2011 edition and they have, at last, gone back to proper toolbars with icons, replacing text labelled buttons in the last few editions. In fact, the WLE applications (I’m using Writer to post this) are now using the Ribbon like Office does, this is the first time I’ve seen another app from MS that uses the Ribbon. I would guess there are more buttons and options on the toolbars as well, which is partly necessary because the menu bar has disappeared. There is a Quick Access toolbar as well, just like in Office, except that you can only turn on or off the preset options; you can’t add to these just like you can’t customise the ribbon. Another feature copied from Outlook 2010 is the conversation view for email.

A new functionality in WLE is Mesh, which lets you sync a folder on your computer with another computer running Mesh, or with a 5 GB space in Windows Skydrive. The functionality provided is pretty restricted, it is just one folder and everything in that folder. An interesting additional Mesh functionality is that it provides for remote access to your computers from another computer, presumably they all have to have the same Windows Live ID and password configured on them.

One annoying WLM feature was the modal dialog it would put up to say it was changing message flags. It would do this every time you clicked on a new message, doing this was very slow as was changing the message status from unread to read. This seems to be a lot faster in WLM2011 and doesn’t need that dialog box displayed.

Friday 15 October 2010

Offline Files is still a crock under Windows 7

Offline Files is a technology that was introduced in Windows XP. We used it for a time then but found it troublesome.

I have often wondered why Microsoft needed to use a special folder in the local computer instead of doing something like a straightforward automated sync between a visible local copy of the data and a server based one. Instead they use the special folder called CSC in Windows with the filenames specially changed etc. Then they use a complex system built into Windows that has to be configured through Group Policy setting and lacks functionality as well as the difficulty of getting this complex system to work properly.

The result is that Offline Files is difficult to configure and problems are difficult to solve. Currently I am getting a laptop that stops syncing after about a minute with “The specified network name is no longer available”. There is not any documentation on this problem that I can find out about.

There have been many times when I have thought there must be a simpler way to synchronise staff laptops when all you need is to have a script running on the server using one of the freebie programs like rsync or whatever that just syncs every so often. Another option with say Backup Exec is to look at automating backup of a share on each laptop using VSS. Best to avoid having to purchase and install the expensive BE agents as the cost soon stacks up and I am hearing that they have to be upgraded regularly. At the moment I am having a play with rsync guis on our backup server, customised only to back up specific file extensions (truly documents only *.doc *.xls etc etc) and seeing how it might be able to cope with the remote laptop going offline partway through and other considerations. Robocopy can cope with this (it can be told to retry or wait forever) but I don’t know how it would manage if the remote file had changed in the meantime.

I have now discovered Windows Mesh which can sync to Skydrive (5 GB free space) so I’m playing with that as well.

Monday 4 October 2010

New computer 2 days on

Still can’t get over how quiet this thing is. From the next room you can’t hear it at all. Although the old one turned out to have quite a bit of dust blocking things up. I got a serial backplane connector from an Asus motherboard and am pleased to report it worked the first time with the GPS. Am getting a 500 GB external HDD for backup and will also move two USBs from the front panel to the back and put an eSata port there as well, then we will be more or less finished customising.

Sunday 3 October 2010

New computer 1 day on

Well, such a big project and now it’s over. Very pleased with the new box, just a few niggles of things maybe I should have checked over before I started. Mainly that this board has only got provision for 8 USB sockets, one of those is taken by the card reader and I wanted more of them on the back. So there are only 4 USB sockets on the back. However, the suppliers don’t bring every board model into NZ and there is quite a step up in price ($50 or more) to get more sockets (12). Given that there are several models of board in between, Intel is being silly not to put more sockets onto the lower priced boards – that board with 12 socket connections is a high performance model with DDR3 memory. But Intel is funny like that. All the Series 4 and 5 boards have PS/2 sockets for keyboard and mouse, but most of the Series 3 boards left these out altogether. My PC at work is such a creature and everything has to be USB, not that that is such a bad thing. Either I could swap two front USB sockets to the back (using a backplane adapter) or I could put in an accessory card with 4 more on it, which I may do. Also likely to be appearing in the backplane slots are an eSata socket and the 9 pin serial socket.

The next thing to look at is backup. Many years ago I bought a 400 MB Iomega tape drive to back up a previous computer. Those were the days. After that died, it was occasional CD and DVD based backups. Then I bought an external HDD enclosure and put a 40 GB laptop HDD in it. A great move, the only problem is that it is now too small. So I have to get a bigger external disk, maybe 250 GB or more. I trialled running Windows Backup on the new system and it said it needed 70 GB to back up my documents and pictures. And the backup could also include a system image if I wanted it to, although I don’t know that I will do that. 250 GB is a lot but it will probably need to store more than one generation of backups. However, online backup services are starting to become affordable, except for our ridiculously high broadband charges in NZ. Maybe in the future it will be possible to use these more than I have looked at so far.

One thing I have finally worked out how to do is to change the location of My Documents and My Pictures. I couldn’t work out from the time I installed Windows 7 at home why IrfanView wouldn’t recognise the “new” location of My Pictures which is on a different drive so it is not in the normal userprofile location. Well, it turns out that even though you can change the folder locations in the Libraries, this doesn’t actually change the stored locations in the system. You still have to find the folders in your profile and tell Windows that they are supposed to be in a different location. Now I can use My Pictures in IrfanView to find all my photos like under XP.

Rebuilding My PC [4]

As we saw in the last post, I started it on the old PC and finished it on the new one. About halfway through writing, I saved the draft on the old PC and shut it down. I then booted from a Windows PE CD and started up ImageX to capture the boot disk to a WIM file. Once that was completed I did the same on the new PC with its new 250 GB HDD, first running Diskpart to partition the new disk and then again running ImageX to apply the boot disk image to it. After this I tried booting and got an error screen telling me to run the Windows Recovery Wizard. This is because the BCD command line tool needs to be run to fix the boot configuration. I had an MDT boot CD handy so I booted that and chose the Recovery Wizard option which fixed the boot configuration for me, then I rebooted and Windows 7 came up looking almost the same as it did on the old PC. While the old PC was imaging I tidied up all the power supply cabling on the new box.

A2000_20101002_003

You can see the power cabling has all been tied back to keep it out of the way of things. Particularly that CPU fan. This has become more necessary in the era where such large CPU fans are fitted that do not have enclosed blades like they did in the Socket370 era. But of course tidying up the cabling makes things easier all round for a nice and tidy PC inside.

Around this time I decided it would be safe to leave the new box on overnight so I went to bed leaving it running. Starting again in the morning I have lifted out the old box. Here is a picture of it:

A2000_20101002_004

I took the modem, 250 GB HDD and the old DVD writer across to the new box which will now have two 250 GB HDDs and two DVD writers and of course the modem for when the broadband falls over. At the moment I am copying some files off one of the 80 GB disks across. Then it will be all finished and ready to go. Here is the comparison of the WinSAT data for old and new PCs, both running Windows 7:

Component Old spec Old SAT New spec New SAT
CPU Celeron D325 2.66 Ghz 3.4 Celeron E3300 2.5 GHz 5.9
Memory 2.00 GB 4.4 2.00 GB 5.5
Graphics Intel D915 1.9 Intel G41 Express WDDM 1.1 3.3
Gaming Graphics Not detected 1.0 780 MB total available memory 3.4
Primary HDD   5.3 207 GB free 5.9
Overall Score   1.0   3.3

Note that in spite of similar GHz the CPU score is quite different, obviously the new CPU is a bit faster. The memory is DDR2-800 instead of DDR 400. Not much difference in the HDD even though it has gone from SATA1 to SATA2. The low graphics scores of the old PC being in large part due to Intel’s controversial decision not to produce WDDM drivers for the 915 chipset. The branding of these chipsets as “Vista Capable” led to a class action lawsuit against MS and Intel in the US.

The one other issue with the old PC in particular was noise. The new one is almost silent. I checked up with the old PC and found the case and CPU fans are particularly noisy. The CPU is the “Prescott” series with the infamous “Netburst” microarchitecture, which was notorious for the high thermal envelope and resultant heat output. It was this class of CPU that first made it necessary for cases to have an extra ventilation duct put into the side to allow the CPU fan to exhaust directly from the side of the case. Even with 2 GB of RAM the CPU fan runs nearly at full speed almost all of the time even at idle with Windows 7 installed. When I stopped those two fans, the power supply fan was fairly quiet. I rebooted into the BIOS hardware monitor and read off temp of 72 degrees C for the CPU and its fan was turning at 2600 rpm which is flat out. This in a room temp of 20 degrees and with the case completely open so plenty of airflow. In flat out burn in tests with the new box it never got above 55 degrees (frequently a lot less) and the fans only turned around 1100 rpm. Another dumb thing is the old box will not boot off a 160GB HDD, only an 80 will do for those old 915s. I am planning to take the old box to school, purely as a stopgap until we upgrade, because it is so limited that it won’t even run 64 bit editions of Windows.

Rebuilding My PC [3]

Now that we have the board completed, the next task is to install it into the chassis. Your existing chassis should already have spacers installed, the board sits on these spacers to hold it up clear of the chassis. Check that the spacers are in the same number and positions as the board needs, if not you will need to remove or install spacers to suit. Carefully slide the board into position getting the rear panel connectors in place, you may have to bend tabs on the I/O shield to make it easy. Just slide the board around carefully to get the spacers to line up with the mounting holes. Then use a magnetic screwdriver and take it really easy and get the screws into the holes and carefully tightened. Don’t use a power screwdriver and don’t overtighten the screws. If your screwdriver slips and hits the board the chances are very high that the board will be fatally damaged. So take it real slow and careful here. Once you have the board fastened down, connect the power supply connectors. The usual requirement is the 2x10 or 2x12 for the main power connector and a separate 4 pin connector for extra CPU power (this is NOT optional, even though the connector looks the same as the extra 2x2 that gets tacked onto the end of the old 2x10 power connector). Modern PSUs typically have a 2x10 and 2x2 connectors that clip together for the main connector, as well as a separate 2x2 for the CPU connector. As sometimes modern supplies have replaced the 2x2 with a pair of 2x2s that clip together, you may find as I did with the Enermax that the pair of 2x2s will need to be separated so that one of them can be plugged into the CPU power connector on the board. Getting the main power connector in can be a little tricky, especially with this board where there isn’t adequate support under the connector, so you want to take it carefully to avoid bending the board too much.

The next bit of fun is to connect the front panel cables to the board. Typically there will be front panel USB and audio connectors, perhaps these days firewire or eSata could be installed, and there are also power and HDD lights, power switch and perhaps a reset button. The switches and lights will usually be on one set of combined headers, while USB and audio each have their own set. In this case the Foxconn TS001 shines out with the clear labelling of the various connectors. As it happened most of them seem to work so far although I haven’t tested out the audio jacks. I also put in an old DVD drive from my old PC and it had to be plugged into the IDE port.

A2000_20100930_006

Now for the moment of truth. Connect VGA, Keyboard, Mouse, turn the thing on and see if it comes up to the Bios screen. Then select the Bios settings and go into Hardware Monitor to read out the temps and fan speeds. I started off reading around 60 degrees C for the CPU which is probably in an acceptable range. If this all works out then install an OS and some kind of test and monitoring software (for example burn in software such as Burn In Test, temperature monitor software such as SpeedFan). Run the software for a reasonable time frame to give an acceptable burnin test period. This is an optional step, just one you might want to try to see that everything is working OK, especially that the heatsink and fan are doing their job properly and keeping that CPU nice and cool.

Finally, before you get the thing into use, tidy up inside the case. Typically you will need to reroute cables so that they have no chance of getting caught up in fans or other moving parts, and make everything look really neat and tidy inside. 

This is my first blog post from the newly rebuilt PC, I’ll explain that further in the next post.

Rebuilding My PC [2]

After the power supply, the next thing to do is to assemble and install the main system board. The board comes with an I/O shield which fits into a space on the back of the chassis and this has the cutouts in it for the onboard connectors. Which in this case are PS/2 mouse and keyboard, VGA, four USB ports, RJ45, and three sound minijacks. Uggh, I just noticed there is no serial connector, which means the GPS won’t be able to connect to it. The board has a serial header, but you need to get a slot bracket with the connector and cable mounted on it, or a USB to serial adapter. I have to think about this one; I don’t use the GPS much, but I will have to make arrangements for it one way or the other. I hadn’t thought much about it because hardly anything these days is dependent on the old parallel or serial interface connectors, but Garmin has a backward attitude and even a 2 year old GPS still only comes with a bog standard DE-9 serial port interface. I think I can find an old slot serial connector at work somewhere (we have a small number of very old towers lying around), or I could look at getting an external adapter as they are very cheap nowadays. Four USBs isn’t much these days. The board has headers for another four, of which the two built into the front of the chassis and the card reader’s one will give me three at the front for seven total, one more than the old PC. Intel does make some boards that have more USBs on the rear; this board is a budget model.

Putting the board together is pretty straightforward but you just need to take it slowly and carefully as there are plenty of bits on it that can get broken and can’t be repaired. The key task you need to do before you put it into the chassis is to install the CPU and fan. On older style boards (here I’m thinking really old, like Socket 370) it was possible to install the fan with the board in the chassis, though risky; the fan was held on with a metal spring clip that took a lot of physical force to hook/unhook, and I have vague memories that I may have killed a board once trying to get the clip hooked on, because I missed hooking it over the retaining lug on the socket and gouged the board instead. The LGA775 boards use a heatsink/fan assembly that has four posts that lock into holes in the board, and believe me, it is nearly impossible to lock these into place with the board in the chassis. So put the CPU and fan in before you put the board in. And buy the model of CPU that comes with a heatsink and fan in the package (unless you are an overclocker of course). Have a good look at the locking posts on the fan to see how they go down and lock in position, because I found the arrows on them were anything but helpful. Basically you need to start by turning the posts in the direction of the arrows, put the post in, push the top part firmly down and then turn it in the opposite direction to the arrow. When you push it down, it’s best to put your finger under the board so you don’t bend the board too much. Check all the posts are properly locked so the heatsink-fan isn’t going to fall off. Then run the power cable around the posts to the onboard connector so the wires don’t get caught in the fan. Of course you should orient the fan in the first place so there isn’t any excess wire to float around and get caught in the fan.

A2000_20100930_005

The not-so-flat board with the heatsink-fan assembly locked into place on top of the CPU. This appears to be absolutely normal with these boards, although you’d think they could have extra support under that part.

A2000_20100930_004

The assembled board with, in this case, the RAM in place as well. Although, that is easy to install later. The heatsink in the middle is the northbridge which needs it because of the onboard GPU. Fortunately the board comes with this heatsink already installed. This is a microATX board so it is quite compact.

A2000_20100901_002

Earlier picture showing the board without the CPU installed, this was when I thought I could put the fan on in the chassis, I was sorely mistaken and had to take the board out again to get the fan in.

A2000_20100913_002

This picture shows the CPU being installed, the load plate still has to be lowered.

Rebuilding My PC [1]

Well, of course, we all know that PCs don’t last forever, and I am not interested in the extremist brigade that say you should try to get 8-10 years of life out of a PC. The way I see it is, a PC is obsolete after about five years and while it will still do some things, it is getting pretty slow and the parts are wearing out.

However, depending on how much PC standards have changed in that timeframe, it is possible to rebuild a PC into virtually as-new specification. There are some important considerations of course:

  1. Whether the PC supports standard design components. Forget this idea if your PC was made by Dell, HP or IBM, etc. These manufacturers prefer to use proprietary case and board designs that usually can’t be upgraded. No, this series of articles is strictly for those who have purchased a locally manufactured PC using generic off-the-shelf components. My host system was built by Cyclone Computers. The chassis is a Foxconn TS001, the motherboard was also made by Foxconn (Intel brand) and the power supply was made by Enermax. All of these items are ATX standard and can easily be replaced or reused.
  2. Whether the chassis and power supply in particular meet modern specs. These days the power supply requirement is ATX12V version 1.x as a minimum for the average type of board, although new PSUs are v2.x. The chassis of course should be ATX spec. Baby AT just isn’t going to cut it. If you are reusing a power supply check that the board you are planning to use matches the connectors available from the power supply. It’s also important to have SATA HDDs / DVD drives, although most new boards still have one PATA connector able to connect up to 2 drives, and even new PSUs still have Molex 4 pin power connectors.
  3. If you use Windows, MS says you need to buy a new license sticker when you change the motherboard, because effectively this is a new PC. Of course this won’t be an issue with a free operating system.

In my case, this PC is 5 years old and the power supply spec happened to be ATX12V 1.x with the right connectors available. However I chose to replace the power supply with a new Enermax Tomahawk 400W supply, a bit of an overkill but pretty good value with the deal I got.

Assuming you need to install a new motherboard, the minimum number of parts you are likely to need is the new board, new CPU and new RAM, because the two latter components are often matched tightly to the board and as specs change so often, it is unlikely you could reuse an older CPU and RAM. However, I was pleasantly surprised to find that the 5 year old board (Intel D915GAVL) is still LGA775, the same as the new board (Intel DG41RQ) meaning the CPUs might fit each other’s board though whether they would work is another question. The new CPU is a Celeron E3300, a dual core with Intel VT hardware virtualisation and some other features supported.  I bought 2 GB of DDR2-800 memory as well.

The first job was to remove all the bits from the old chassis, after which I put in the new power supply, just a simple job of doing up the screws.

A2000_20100323_002

Here is the new power supply in the chassis. Well, you can see in the picture that this photo was taken on the 23rd of March, which is just over 6 months ago. That was when I first started on this project, and there have been a few glitches and holdups since then. But now as I am writing this the task is nearly finished; the new PC is sitting next to me as I type this on the old PC at home, and as soon as I have finished testing and assembling the new PC and migrating the Windows 7 installation to it then it will be ready to go and to replace the old one (which incidentally uses the same chassis type as seen above, but it is a year older with a D915GAGL board inside).