Welcome to the QA Tech-Tips blog!

Some see things as they are, and ask "Why?"   I dream things that never were, and ask "Why Not".  
Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.  
Old Chinese Proverb

Monday, June 4, 2012

How to Change the Windows XP Distribution Channel type on Installable Media

Recently I ran into a quandary with a customer's computer - and after a couple of weeks of head-banging, I finally figured out a solution to the problem.

Issue
A customer gave me a Dell Dimension 2850 computer he wanted resurrected, and after thoroughly sanitizing the machine I discovered that it's Windows XP Home installation had been seriously damaged.

I tried - for two mortal weeks! - to resurrect the installation.  No good.

I tried cloning an installation from a sister machine.  No good.

I tried to create a set of "Dell System Recovery Disks" to reinstall from scratch - No good, as the System Recovery CD's I created Blue-Screened right at the beginning of the install.  (And yes, I tried creating the CD's more than once, with different media, using a different burner. . . .)

Since Dell doesn't support XP, (of any flavor), anymore, it would be impossible, if not hideously expensive, to get a set of real, working, recovery disks for that box.

I tried using my TechNet copy of Windows XP Home to do a repair install - No good, it wanted a product key, and it would not accept the OEM key from the Certificate Of Authenticity stuck to the side of the box.

What I needed was a Windows XP Home install CD - OEM version, and this kind of CD is nowhere to be found - unless you happen to be an OEM installer or just happen to have a copy laying around from an old XP System Builder's package.  Which, by the way, I did not have.

What I DID have was a Windows XP Home install disk - and activation key - downloaded from my trusty TechNet account's download repository.  And that's good.  However, the TechNet version - and key - is a "Retail Box" version with a "retail" key to match it.  Which is bad, at least for this problem.

After two weeks of banging my head against that ever present, and oh so familiar, brick wall - I had come to a standstill.



There were several options readily apparent to me at this point:
  • Punt.
    Just tell the client that he was SOL - Stinkin'-out-of-luck.
    Unfortunately my reputation as a miracle worker and computer wizard was on the line, so that option was not acceptable.
  • Get, and install, a legitimate copy of Windows XP Home.
    I tried.  I really tried, but Windows XP, (of any flavor), is "out of print" no matter where one looks.  That being the case, a legit new install is out of the question.
  • Get a legit version of Windows 7 and install that.
    Since this was a blazingly fast Pentium 4 box with a whopping 512 megs of memory, a Windows 7 install would have been as slow as molasses in February.  It should be "intuitively obvious" that this solution was just a tiny bit less than optimal as well.
  • Find a skumware site on the Web and download a (ahem!) "official" version of the Windows XP Home install CD.
    Because it is a lead-pipe-cinch that a whole plethora of skumware, vileware, root-kits and other such nasties would come pre-installed as well - not to mention a whole host of ethical reasons - this was not a viable option either.
  • Install my TechNet copy and key, and convert the installation so that it would accept the OEM key after the fact.
    There are some really interesting instructions on the Internet that explain precisely how to do this by editing Registry keys, removing/modifying installation files, etc.  When I tried that, I discovered that I had magically turned my "Retail" XP install into a quivering lump that would neither activate, (It even went so far as to refuse to launch the activation utility!), nor allow me to browse the Web.
  • Install my TechNet copy, use my TechNet supplied key, deliver it to the customer like that, and keep my big mouth shut.
    Since I value my TechNet membership, and would like to continue as a member in good standing, this choice was not particularly high on my list of available options.
  • Somehow or other, take what I have and magically transform it into what I need.
    This is also fraught with all kinds of prickly and technical licensing issues, so I really hesitated to try it.  Unfortunately, all else had failed so - rather than give out my TechNet key - I figured this was worth a try.

NOTE:  If you read the fine-print in Microsoft's rather voluminous license, particularly as it applies to OEM installs, the only legitimate OEM reinstall is to:
  • Reinstall to the exact same hardware, (i.e. on the exact same physical box that it was shipped on),
  • Using the exact same OS type and kind,
  • With the exact same programs, features, add-ins, bloatware, "free trial offers", etc., as was originally installed in the "fresh-from-the-factory" condition.  Including all the "Preparing your computer for first use" horse-hooey.
Of course, this assumes you actually have the True And Authorized re-installation media - which is the whole problem!

Having said all that, here's how to change a sow's ear into a cow's ear.



The big difference between the various distribution channel versions of XP lies in one tiny file, setup.inf, which is located in the i386 directory of the disk.  So, if we can somehow change that one little file, we can convert a disk of one channel type into another.  (i.e. "Retail" into "OEM")

You will need:
  • A legitimate copy of the Windows version you want to convert. (i.e. From TechNet, et. al.)  You do NOT want to use disks obtained from dubious sources for more reasons than three.
  • A system with a legitimate COA of the same version as your install media, except that it is likely to be an OEM COA instead of a retail COA.
    Note:  These instructions are not intended to allow you to install whatever you darn well please, wherever you darn well please.  These instructions are to allow you to reinstall the same version of Windows XP on a box that has a blown install, the recovery media being unavailable for one reason or another.
  • Software that will allow you to extract the contents of a CD or ISO, including the boot information.
  • Software that will allow you to re-create a bootable CD/ISO from a bunch of files and the boot files.
  • A text editor.
  • Luck.

Here's how I did it:

The installation media I used for the conversion was a plain-vanilla, English version, Windows XP Home with SP-3 preinstalled, ISO that I had downloaded from TechNet.
  1. Using your CD/ISO expansion software, rip the entire contents of the Win XP (retail) CD to a newly created folder somewhere.
  2. Using the same software, rip the boot files to a folder somewhere else.
  3. Within the rip folder, go to the i386 directory and find the file "setup.inf" and open it with a text editor like Notepad.
  4. Find the part labeled "Pid", followed by an eight digit (?) number.
  5. Replace the last three digits with the letters "OEM" - obviously without the quotation marks, but you already knew that, right? - and save the file.
  6. Using the disk burning tool, recreate the CD by dragging all the ripped files and folders to the root of the new compilation.
  7. Replace the burner software's default media label with the label from the original CD.
    In my case, using ISO Buster to rip the CD, the rip's folder name is the same as the CD's disk label.
    Copy that and replace the default disk label with the one you copied.
  8. Mark the disk as "bootable" and provide the boot image file you copied from the original disk.
  9. Burn and verify.
Voila!  You now have an installable Windows XP OEM edition CD.



One further note:
In order to use this CD, you have to do a "bare metal" install, completely overwriting any previous retail installs you may have tried to do.  Trying to overwrite a retail install with an OEM install by performing a "repair install" won't work.  Ask me.  Go ahead, I dare you.  Ask me how I figured out THAT little gem.

Hopefully this will help drag your butt out of the same bind I was in, but without the weeks of head-banging.

What say ye?

Jim (JR)

Tuesday, May 15, 2012

Punish My PC!


Have you cobbled together a system that you are going to use for something critical / important?
Have you just built The World's Most Beastly System?
Do you have a system that MUST run, 24/7, come Hell or High Water?

Or, maybe, you just want to see if your system has The Right Stuff.

What you need is a PC Benchmark Program.

There are a lot of benchmarks out there - and if you don't believe me just go to any well stocked magazine rack somewhere and snoop three or four PC magazines.  You will find as many benchmarks as there are editors - each claiming that THEIR benchmark is the sine-qua-non of benchmarks.

Each of these benchmarks exists to target a particular aspect of your computer - be it raw processing power, graphics rendering and speed, the motherboard, or whatever.

But, just maybe, all you need to know is if Your Machine Can Hack It.

Here are two interesting little beasties - and I mean little as these utilities have a very small footprint.  And I also mean BEASTIES, as these will torture your system to the point where it will confess to setting the Reichstag fire, if not plotting the downfall of Rome itself.



The first is PRIME95 - specifically designed to try and find Mersenne prime numbers.  Specifically it seeks to find Very Large Mersenne prime numbers.  As in 12 million decimal-places - or more.

So, why should you care, and how is this going to help?

First - should you decide to join the fine folks at GIMPS, and should you be so extremely lucky as to actually FIND one of the beasties, (since the dawn of mathematics, only 47 have been found so far), there is not only glory to be had, there are also CA$H PRIZE$.  As in moola, Benjamins, coin, or just plain cash money.  (This is also a great way to flesh out a Mathematics dissertation.)

NB:  It should be noted that there is also a poster for sale there at the GIMPS site, about the size of a 4x8 piece of plywood, that contains every last digit of this immense number in Living Color.  Likewise it should be noted that they sell - as a companion product to the poster - a high-power Jeweler's Loupe so that you can actually SEE the digits!  (They are indeed that tiny.)

Secondly - even TRYING to find one of those "little" twelve-bazillion decimal-place beasties requires all the computing power your poor little PC has to muster.

Not only does your CPU take a beating - every single core of it - but each and every FPU, (Floating Point Math Unit - built into each CPU core), gets the workout of it's life.  The result is usually a CPU chip that gets hot enough to smell.  Not to mention you will get to hear your processor's heat-sink fan wind up to its maximum speed for the first time in history.

While making your CPU cry "Uncle!" by beating it senseless, working with twelve-bazillion-digit numbers requires a LOT of data-shuffling back and forth into RAM.  Ergo, your main memory gets the beating of it's life too.  Not to mention your motherboard's Memory Management Unit, northbridge chip, southbridge chip, sandybridge, windy-bridge, suspension-bridge, and any other kind of bridge chip you may have.

The result of putting your machine on the Rack is this:  If there is anything in your system that's not up to snuff - or is even considering the vaguely distant possibility of departing from the Straight And Narrow Path - this will flush the partridges out of the bush in short order.



The next fine fellow in the Spanish Inquisition isn't even a torture test.  It's just a cute little utility that stands around, thermometer in one hand and digital voltmeter in the other, telling you how loudly your PC is cursing you.

It's called HW Monitor, and the fine folks at CPUID, (who also make the excellent CPU-Z program), provide it free of charge.

It provides a nice window showing all your system voltages, fan speeds, MoBo and CPU temperatures, etc.  Running this with Prime95 is a good idea.  This way you will know if the smell coming from your PC is just hot aluminum, or the smell of melting silicon as your $700 CPU breathes it's last.



The bottom line is this - if you have a PC, Mac, Linux box, or whatever you need to test - these are a couple of free tools you can download to do it.

What say ye?

Jim (JR)

Sunday, April 29, 2012

You Can't Get There From Here! (Part 2)
Issues with the new AHCI interface


In a previous article, I talked about the advantages of the new AHCI interface.  It's fast and it supports a whole host of useful features.  Things like the ability to dismount and remove/swap a drive, as well as a lot of the newer features that have been built into modern hard drives.

Especially the "dismount and remove" feature - which makes swapping a SATA/eSATA drive as simple as swapping a USB thumb-drive.  If you are like me and you have multiple external SATA drive docks that you use to plug in a hard drive, use it for something as if it were a GIGANTIC USB thumb drive, and then remove it; AHCI is an absolute necessity.

Given your choice, AHCI is indeed the way to go.

However, there is a "dark side" to The Force:  A lot of software that needs to talk directly to the drives won't work with the new AHCI interface protocol.  The classic symptom of this incompatibility is that the software cannot find the hard drives or optical media devices on your system.

For example, my long-time-favorite CD/DVD/etc. burner software - CDBurner XP - has significant issues with the AHCI interface.  Likewise other CD burning software, True Burner is a good example, won't work with AHCI.

If you have hard-drive imaging software that is more than a couple of years old, it's pretty much a lead-pipe-cinch that it won't work with AHCI either.

If you have some older rescue disks laying around, such as BartPE disks, or even older versions of Linux - like the earlier versions of Knoppix - they have trouble with the AHCI interface protocol as well.



"Why is this so?" you may ask.  And yes, that is a very good question.

The answer is this:

As hard drive interfaces have evolved in the past; from the custom and non-standard embedded interfaces used in ancient computers, to the Western Digital interface for MFM and RLL drives used in computers only slightly less ancient, to the venerable IDE / EIDE / Ultra ATA interface used for so long, to the new SATA/eSATA interface - each major advance in the drive controller interface has obsoleted - and orphaned - the previous protocols and standards.

The AHCI interface - developed by Intel during the Itanium days - was designed to provide a whole host of useful, and needed, features to the hard drive community.  When SATA came around, the SATA standards leveraged the capabilities of the AHCI interface protocol - and the hard drive manufacturers jumped on the bandwagon and made sure that their drives would support these new standards.

The rock in the road here is that the design for the IDE/ATA interface never imagined any of these capabilities - drive swapping for example - because these features were just not possible with the older ATA. (PATA), drives.

However!  (# 1)

Most of the software available at that time - including operating systems - did not support the AHCI interface protocol.  So, the computer motherboard and BIOS manufacturers worked around this issue by providing a choice:  You can set the computer's motherboard to use the older - and more "compatible" IDE protocol, or the newer AHCI protocol.  As a result, the IDE protocol has stayed around, a relic of days-gone-by.

However!  (# 2)

Newer motherboards - and especially newer laptops - have decided to do away with the, (relatively), old and crufty IDE interface choice - leaving room in the BIOS for more interesting features.

As you have probably already noticed, the intersection of "However #1" and "However #2" results in things just not working - or working in bizarre ways.

To make matters even more interesting - you cannot just switch from one interface protocol to the other willy-nilly.  Doing so on a Windows based machine is the fast track to a machine that won't boot. (See this Microsoft site for an explanation why, and the registry hack needed to fix it.)



There are two big take-aways from all of this:
  • Software that relies on direct, low-level access to a drive may not work in the AHCI mode.
    So, if a software title you've used for years and years suddenly decides to stop working, or stop working on a new machine, check the AHCI mode setting in your BIOS.

  • When you find something like this, do not hesitate to ask the author(s) of this software product to update their software's drivers to support AHCI.

What say ye?

Jim (JR)

Monday, April 2, 2012

QA Engineer Downtime
 FlightGear 2.6


Just in case you were wondering what Software QA people do when they're not testing code. . . .  They go home and test code!

Today's topic is about yet another program you may want to "test" - FlightGear.  FlightGear is an Open Source flight simulation package that has been under active development since the mid to late '90's.  You can download it for free, and it has terrain and detail maps for (as far as I can tell) the entire globe.

One of the things I've been passionate about since - well - I can't remember back that far, has been airplanes and flying.  A Pilot's license, (and an airplane to go with it), has been a dream of mine for ages.

Of course, with 20/400 vision (uncorrected), corrected vision that requires lenses whose thickness is measured in centimeters - even with "High-E" plastic - and is good enough to let me drive, but not much else. . . .  the chances of passing the medical to get said Pilot's license is slim to zero, to say the least!

So, I have to assuage my frustrated dreams with flight simulation programs - the de facto standard being Microsoft's Flight Simulator in all it's versions.

Microsoft's Flight Simulator - all the way up to the latest version which is Flight Simulator "X" - is a truly worthy program for those who enjoy the exhilaration of flight.  It's fairly simple, you install the software, plug in your joystick/yoke and rudder pedals, (if you are lucky enough to have a set), hop in the virtual plane, and start flying!

Using the default "as installed" settings, your plane is refueled, your trusty valet-cum-ground engineer has already done the pre-flight checks, the engine is started and all warmed up, so all you have to do is release the brakes, advance the throttle a bit, and you're soon in the air.  And, unless you tell it to be extra picky, you always start on a day that has wonderful weather, a few scattered clouds, no wind to speak of, and inexhaustible fuel.

Microsoft's slogan for most of their Flight Simulator packages is something like it being "As Real As It Gets!"  Needless to say, flying in MS Flight Sim is - almost - trivially easy.  With a little practice and patience you can even get back on the ground in one piece!

Which left me wondering. . . .  Is flying an airplane REALLY that easy?

Answer:  No.

Microsoft Flight Simulator is - above all - a "game".  A very sophisticated game nonetheless, but still a game.  You can advance the "reality" settings from the default of "fantasy" to "somewhat realistic" - but it's still a game. Microsoft goes to great lengths not to frustrate those people who planked down $60+ for this beast, and they do so at the expense of realism.

On the other hand, FlightGear is most definitely NOT a "game" by any stretch of the imagination.  The stated design goal, (make that read "long-term design goal"), is to make a sim that is accurate enough to be FAA certified.  And they mean it.

Once you load and start the sim - and if you are at all smart about your selection of which plane to fly - you are somewhere outside of San Francisco in a seldom used municipal airport dedicated to small planes, sitting in a Cessna 172.  Said Cessna being one of the "easier" planes to fly.

And unlike Microsoft's Flight Simulator, there is no trusty valet to set things up for you.  YOU have to do the work.  You have to do the pre-flight.  You have to file the flight-plan, and yes YOU are expected to actually fly the airplane.

The program launches, you're sitting in "the Left-Hand Seat", (Pilot In Command), and there is no noise whatsoever.  Not even crickets.

Thinking that the sound support is still a little squiffy, I proceed to release the parking brake and advance the throttle.  Nothing.  I can see the controls move but nothing happens.  I try several other things, and still nothing is happening.  Is the game frozen?  Is it "paused"?  I decide to take another look at the "quick start" guide to see what I am doing wrong.

Guess what!  The absence of sound is deliberate - the engine is not running yet.

So, you look up the "engine start" check-list, (yes, there are check-lists for everything, just like in a real airplane), and proceed to do the drill:  Check and set the magnetos, set throttle and mixture controls, verify proper control action by looking at the wings, elevators, and tail.  And!  Especially if you have "random stuff happening" set, you do actually have to make sure that there isn't some clod near the airplane when you start the prop spinning.

So you flip the magneto switch to "start" and you hear the engine crank.  And crank.  And crank.  And crank.

Seriously, the first time I tried to start that beast I did not simulate starting the engine, but I did simulate running the battery down.

Reset simulation.

OK, lets look at that checklist again.  Hmm.  Looks OK to me.  So back to the manual!  It turns out that in order to get a REAL Cessna 172 started, you have to put both the mixture and throttle controls in certain very specific positions.  And it takes a few tries to get the hang of it.  Eventually. . . . you learn how to start the plane without killing the battery.

Ready for takeoff!  Release the brakes, advance the throttle and down the runway you go!  You pull back on the stick and. . . .  nothing.  You're about three feet in the air, wheels bouncing around as you swish this way and that way all over the grassy countryside surrounding the airport.  And yes, those odd looking structures up ahead, (that you are about fifteen seconds from crashing into), are high tension electric wire towers.

Eventually you come to a stop, assuming you avoid the high-tension towers, and wonder what went wrong.

Reset simulation, (for the upteenth time), and it's back to the manual!

In real life, (and in FlightGear), you have to be much more careful about trying to take off.  You need to have the correct amount of flaps set.  You have to have enough engine speed, (check the throttle and mixture again!), and you have to manage to get to your airplane's realistically rated "rotation velocity" before you can get off the ground.  Again, as in real life, you have to get it right.  "Almost" right isn't going to cut it.

And so on.

Now, I don't want you to think they have just tossed you to the wolves.  There are a lot of excellent tutorials about all kinds of things, from actually getting the plane to start, to flying a REAL IFR (Instrument Flight Rules) departure and approach, all the way to learning how to do everything the right way from the beginning.

The key words here being "the right way".  As far as I can tell, (based on the short time I spent with it, as well as reading the documentation), this piece of software strives for absolute, uncompromising, realism.  Though they do make apologies for certain inaccuracies.  Things like "Helicopter blades do not shatter if you have the tips exceed the speed of sound", or "we don't have access to real ground or air-traffic-control simulations yet".

However most of it is right on the money - from the yucky weather outside all the way to the positioning of the moon and constellations.  All of this stuff is derived - whenever possible - from real NOAA or GeoSAT weather, Naval Observatory data - even the precession of your inertial gyro is modeled down to the hairs on a flea.  And yes, you have to reset the Inertial system periodically.  Just like in real life.  And when doing your approach in lousy weather, you have to do your "procedure turns" and listen for the nav-aid beacons, just like in real life.

So, what does this have to do with QA, besides seeming to cater to the masochistic streak that every software QA Engineer has to have?

Though very realistic - in the ways that it can be realistic - there is still much room for improvement.  Testing, of both the stable releases as well as the development builds is an important contribution.  Even helping to clean up the documentation is welcomed with open arms.

It's also interesting - especially if you want to see what a REAL simulation is like!

Go check it out!  http://www.flightgear.org

What say ye?

Jim (JR)