Monday 28 January 2008

Trying... (grrrrr!) to have a USB Key to boot Windows PE

I have two Sandisk Micro Cruzer 512MB USB keys that I bought cheaply as they were end of line. These devices have a unique and excellent feature of a retractable plug built in, thus there is no cap to lose. The size is quite useful for many things. I got one of them formatted as a Windows 98 boot device using an HP utility that I got off the net. It is formatted as FAT16 and the whole capacity is available for use. I use this one mainly to boot to DOS to flash BIOS updates on PCs.

The second one is formatted as FAT32 and I set it up fairly recently as a boot device for Windows PE. The problem is, it keeps getting corrupted somehow. Then PCs can't boot off it, and they say there is a "disk error". Then I have to use a CD to boot Windows PE (but I can still run applications off the key, just not boot off it).

This has happened twice now and I am getting grumpy. I have swapped the keys over but still the Windows PE key gets some sort of corruption and stops being able to be booted from. What is going on here?

Using Sysprep on Windows PCs running Media Player 11

In a word, don't. When the master PC comes back up after sysprepping, it will crash in MSOOBE and refuse to complete setup. It then reboots, and repeats the whole schmozzle. There is no way out of this except to follow the steps set out below. This is caused by an incompatibility between MSOOBE and Windows Media Player 11.

The MSKB lists a number of steps that can undo the effects of running SysPrep. In my case, just the first step, copying a temporary System registry hive into the Config folder, let me restart Windows enough to get to the Control Panel's Add/Remove Programs option and uninstall WMP11. While you're at it, uninstall WMP11 Media Runtime as well. Then go back to Recovery Console, rename the temporary System file to something else, and rename the original hive file back to System. Restart your PC, and Windows should start up properly and run the msoobe wizard as it normally does after a sysprep.

The next step is to install WMP10. If it refuses to install, make sure WMP11 Media Runtime is uninstalled. Then try installing WMP10 again. Once you have got it installed, Sysprep again and this time, everything should be just fine.

UPDATE: I’ve now discovered how to stop this from happening. To work around this problem, use Mini Setup instead of MSOOBE when Sysprepping your reference PC. There is a box you can check when you run SysPrep that sets this option. Running Mini Setup should be done in conjunction with a Sysprep.inf file to minimise the number of options you have to enter in the wizard when it runs.

Tuesday 22 January 2008

NT 4.0 Server System Policy Registry Tatooing

Registry tatooing refers to the old style workstation policies that Windows NT4 Server used. You also see these on a network if you are connecting to a Samba server, because it uses the old System Policy model. Policy changes in this system are permanently applied to the Registry as values that are never undone unless you explicitly remove them or change them to a different value. On a client, you edit these policies using the System Policy Editor and then the Config.pol file gets downloaded to the client at logon and is applied to the registry as keys and values.

Windows 2000/2003 Group Policy works in a different and much better way. The policy settings that are applied from GPOs do not make permanent changes to the registry. If you remove a setting from the policy, it will automatically revert to the default value for that setting. This makes policy operation more efficient since you don't need to set a value for every policy. It also ensures that default values that are defined in the GPOs will work when they say they will.

Tatooing is the effect of the old style policies onto a workstation running Windows 2000 or later. The System Policy model was used by older desktop versions of Windows, including all Win9x systems (95, 98, ME) and Windows NT4 Workstation. However it can also be applied to Windows 2000/XP workstations when the PDC is Windows NT4 or Samba (may vary with version of the latter). The GPO model that we have today was introduced on Windows 2000 Server and Windows 2000 Professional. There are two parts to it, the server component and the desktop client component, and you have to have both of them to use it. Hence, an older desktop OS connecting to a Windows 2000 or later server still uses the old System Policy model, and a modern desktop OS (Windows 2000 or later) connecting to an older server (NT4/Samba) still uses System Policy.

We came originally from a Samba server to Windows 2003 domain controllers, and we saw these effects on our XP workstations. One of the first ones that I remember was connected with the policy setting that reads "Connect home drive to the root of the share". When you set up a user account you specify a home drive letter and path. This policy setting overrides the path so that only the share is used and the drive letter connects to the root of that share. The default for this setting is to be disabled, but we found that we had to specifically disable it because, I presume, the default had been overridden by tatooing.

Another possible example I have just noticed is remote shutdown. We reinstalled a pile of machines, and they all started to give "Access denied" errors when we tried to run a script on the server to shut them down remotely. There must have been a setting tatooed into the registry that allowed the remote shutdown to occur with the right user permissions (the script is running as the domain administrator). There are a few options I have to try to see which is the best way of resolving this.

Saturday 19 January 2008

Imaging Vista part 2A

The next PC to try imaging was an old Compaq Pentium III/800. I had previously installed Vista on it and had bumped up the memory to 512MB and the HDD to 40GB. This PC is one I kept around for just this sort of testing. The biggest issue is its lack of USB ports especially as one was needed for the mouse and the HDD at startup needed both its plugs connected for power. I decided to do without the mouse and boot WinPE from a CD. Getting the image reload going is no problem off the external HDD. The main delay in this case is due to this old computer having only USB1.1 and therefore transferring data off the external HDD slower. About 90 minutes being the estimated load time in this case. Actually it took about 60 minutes, and it worked just the same as the other PCs.

Imaging Vista part 2

Getting this started turned out somewhat difficult due to the way the PC recognises USB boot devices. I had both a USB key and a USB external HDD plugged into the master PC for the imaging. The key drive is used to boot Windows PE and the HDD is used to store the image. The problem seemed to be, at first, in getting the key drive recognised - the first one had some sort of corruption or other problem making it unrecognisable for booting. Trying another one, the problem seems to be that with the USB HDD connected as well, it tries to boot that, fails and doesn't get any further like trying other USB devices or other devices.

I'm not really sure what the problem was, but after a lot of work I got it booting PE off the USB key, and then plugged in the HDD partway through boot. I still don't know if WinPE supports hotswapping and automatic detection of USB devices. However it evidently does include the drivers for most of them as both devices were able to be accessed in the command prompt.

The first step of making my image is to Sysprep the master PC (step 3 of the guide). This is easier on Vista because Sysprep is now included in a subdirectory of \Windows\System32. Once this was done, I proceeded to the imaging (step 4). Note that you can use alternative forms of boot media; the Windows PE help included with the WAIK describes how to do this. Now run ImageX with the appropriate switches. I tried two images: one on the external HDD and one to a second partition of the internal HDD. The first took about 30 minutes to create a 5.5 GB file; the second about 20 minutes. The original files on the HDD are 13 GB so this is slightly better than a 2:1 compression ratio.

When the original PC was restarted, there was a period of disk activity for about 10 minutes and then the PC restarted and came up with various screens asking for information - as is usual when starting a Sysprepped image. The PC then started normally. I went to Step 5 of my instructions to apply the image to the other machine, after first following the steps to partition and format the HDD. This PC had Linux installed, but there were no problems in removing the partition information and Grub, and applying the image from the external HDD. On rebooting the PC followed the same process as the master.

The issues which I want to fix for future deployments are

  1. Drivers not installed (even though the master had them). In this case the display adapter was the only device not installed, even though originally I had to provide Vista with network and sound drivers as well. Vista provides a Package Manager to inject drivers to an image
  2. No automatic domain join. Riprep knows how to do this automatically if the answer file specifies it. Sysprep on XP if an answer file is not provided still knows that the PC was previously joined to one and asks the user if they want to join a domain and carries that out.
  3. Product key not asked for. Sysprep does do this on XP. At this stage I would still have to reenter the product key and then activate this PC.

Most of the questions/issues can be addressed using the tools which Microsoft provides. The Package Manager for driver injection, the System Image Manager for creating the answer file, and some technique that I haven't yet discovered to put the answer file into this image. At this time we want to automate the whole process even more.

The next trial step is to apply my existing image to another completely different PC. This is an old Pentium III with just enough memory and HDD, the first real challenge being whether it will even boot WinPE or be able to read the USB HDD. WDS also looks more promising, but there is still a lot of work to get it there, and the server's disk is filling up with all the different RIS and Ghost images.

Thursday 17 January 2008

Imaging Vista

In Windows XP the only kind of built in imaging technology we have is through RIS, when we run riprep and send the machine image back to the RIS server for deployment. Hence, we would use Ghost or another product to make images for deployment by some other means than RIS. Ghost commonly is used to multicast or unicast over the network, but we can also load an image from a DVD or external HDD.

Windows Vista for the first time provides us with the general purpose imaging tools that can be used with the network, hard disk, DVD or whatever. One of my goals this year is to learn how to use these technologies. We don't have very many Vista machines just yet and probably won't so WDS might be off the agenda since it will have a new learning curve to follow. For the majority of deployments expected in the coming year I will be happy just to use an external HDD to load the image to a PC.

To begin with, this is the basic guide for learning how to image a Vista PC and load that image on another PC. I'll see how it goes and get back with progress reports:

http://technet2.microsoft.com/WindowsVista/en/library/88f80cb7-d44f-47f7-a10d-e23dd53bc3fa1033.mspx?mfr=true

Sunday 6 January 2008

A Tale of Two Cameras [2]

After writing the previous article I decided I had been a little hard on the S1 - after all, it has all these manual settings that you can use to speed up the time it takes to trip the shutter. So again I took my two cameras along on another train ride. The S1 was set up for manual exposure and manual focus. The result was that I found that much of the time the camera would take the photo very quickly once the shutter release was pressed. On this, shorter, trip, I took even more photos (about 50% more) and 75% of them with the S1. A few little design glitches and issues showed up with the way the camera worked on manual focus; I hope Canon has fixed them in the S5. The biggest problem is still the zoom. It just takes a lot longer to position the lens to the right place than it does to press the zoom rocker and step through seven zones on the A450.

The biggest issue overall on both trips has not been the camera's fault; it came down to that perennial problem of batteries. Basically, NiMH batteries are sold under various brands, many of the bigger names made by Sanyo of Japan, and others not. They claim several hundred charge/discharge cycles. I started off with Energizers and found that they were good for perhaps a year and then they started to lose their capacity quite seriously. After trying a few things I bought a lot of replacement batteries. After about a year they are also failing. Most of these batteries in the S1 have had just a handful of charge/discharge cycles, well under a hundred. The ones in the A450 get charged probably alternate weeks on average. Still not more than a hundred times in total. What I have been able to read from other users' experience is similar. There is a great deal of doubt that NiMH batteries last very long, or certainly for any number of cycles.

In future I expect I will replace all my NiMH batteries annually. Having tried all the recommended brands, Sanyo Eneloop will be the next one. These claim a very low self discharge rate which I will be trying out. After going very quickly through three sets of NiMH batteries on the S1 (two of which lasted for 10 shots each) I bit the bullet and put in the backup set of Energizer Lithiums that I always carry. These produced such a good result that I believe I could have taken all 405 S1 photos just using them. However of course, the Lithiums are very expensive; currently $25 for a set of four. On Thursday the A450 finished up the day on a set of ordinary alkalines due to exhausting all of its batteries. Today I managed to get through only 100 pictures on just the four rechargeables I always use with it. Still, if I had used it more then it would have been better to have a pair of lithiums at hand to use it with.

Friday 4 January 2008

A Tale of Two Cameras

Once upon a time there was a computer technician, who decided to go on a train ride to Picton and back, which is a round trip of 700 km. He enjoyed a photographic hobby and he knew that this train had an observation carriage which would be great for taking photos from the train as it passed by different places. So he decided to take two digital compact cameras along:

  1. A Canon Powershot S1 with lots of super duper features and a 10 times zoom lens, originally costing $700 new.
  2. A Canon Powershot A450, a basic model costing less than $200 in 1997.

Which camera did he expect to use the most? Well, he figured that with its superior capabilities, the long lens, all the options and tricks that it could do, the Powershot S1 would be taking most of the photos.

Guess what? He was wrong. He took over 300 pictures on the little cheap handheld A450 and less than 100 on the expensive S1. Why was this?

Well, the A450 is a compact lightweight camera that can be held and operated with one hand. It has a big 5 cm LCD screen that gives a very good view of the subject. It has a 4x zoom lens that zooms in only about seven steps. It has some most-used settings directly accessible on the back panel, and it has a manual mode that remembers more useful settings such as EV compensation and flash on or off. One of the other useful settings that can be enabled on the A450 is the displaying the picture just taken for a brief period before taking the next one.

While the S1 and later models of that series are more powerful, this adds up to more challenges. Firstly the greater size and weight of this camera make it more difficult to use one-handed. The zoom controller has to be turned very precisely to zoom quickly or slowly and it has a long zoom range. Useful functions like macro and flash cancel are not on the back panel. The 3.75 cm LCD screen is more difficult to see the picture on. Using viewfinder instead has the difficulty of trying to keep up with the scenery flashing by while setting the camera at the same time.

It may be that the later models of the S series overcome some of these limitations. But I was surprised that the little cheap second camera has proved so much better. The main reason why is that on a moving train you have to hang on with one hand. Then you need a camera that can be operated with one hand, that has a good screen, and that doesn't take long to zoom in. In fact, most of the pictures I took were on the minimum zoom setting. The A450 can get through its zoom range faster, I think. It's horses for courses, I suppose. The more expensive camera with the bigger lens is superior in some situations, like long distances or special exposure settings. For a lot of situations like rapidly moving subjects or close-range stuff, you might yet find as I did that the basic cheap model is easier.