Tuesday, November 21, 2006

Life CAN be Simple!

Well, how do you like that?

Sometimes, things are easier than they seem. That's usually not the case; but for once in my life, something was easier than I expected. It's a rare occasion, when something is easier for me than I think it will be. It's happened before -- just not often. Most of the time, nothing's as easy as it sounds/looks/seems. It usually ends up requiring so much time, money or resources I don't have, I end up having to abandon the endeavor ... whatever it may be.

So, let me provide some background.

For the last several days, I've been asked to see if I can develop a method for using an external USB hard drive to store what are commonly referred to as "images" -- files created by disk-cloning software, which are exact duplicates of the source drive. For instance, you can create an image of your computer onto say a DVD or two, or a few CDs, and create a boot disk for your computer. Then, you can completely and totally erase your computer, and use the boot disk, the imaging software's recovery disk, and the image file(s) of your computer to put the image back on your drive, so that it's like nothing EVER happened. It's more complicated than that (see what I mean?), but that's the essence. So anyway, one of the groups at this company I work with wants to be able to have image files of the computers of their developers so that they can run tests, debug, install and uninstall, etc. -- and then be able to restore the computer to it's nice, pristine condition without ramifications. They want to do that by using this 300GB Seagate brand USB hard drive, and they want to do it by bypassing the local computer's Windows environment. This way, they can carry the USB drive to their desk and plug it in, boot to the USB drive, and image their local PCs with their computer's image file. Simple, clean, effective.

But, how do you make the USB drive bootable? Under normal circumstance, the computer looks to its own guts for devices to start up with; it won't look outside unless you force it to. That's the rub; how can I get this computer (whichever one it may be) to look outside of its internal systems to see something to boot to? Add to the challenge that I've never even HEARD of anyone booting to a USB device, or trying to, before, and you've got me walking out of a meeting knowing that there are a few things that need to happen, and not having a clue as to how to make them happen.

I'm given a "few days" to test this; I have to do the research, try it out, document the process as best I can, and then do it again. I was provided a laptop computer to work with, and then I was to use my own computer (the one here at work, not my personal computer at home) for desktop platform testing.

With wide-eyes and a lot of hope. I set out to accomplish my task. Everyone in the meeting was so impressed with me; I remembered what was involved with making a device bootable from the last time I'd done it -- nearly two years ago. Back then, it was as simple as making a boot CD, and creating an AUTOEXEC.BAT file (a batch file that executes automatically when the system starts up; it then calls other files and gets things rolling to automate processes) to do the things you need done. For us then, we created a Windows 98 boot disk, which loaded the generic CD-ROM drivers we needed; also on the disk was the image file we'd created and the executable (DOS version) of the imaging software we were using. We also, at that time, wanted the machine to load some software from a network address, so it was about making the bootable CD network-capable. It has to load the drivers for the network card being used, and then it has to log in to map the drive to the correct location. All relatively simple. We found "Bart's Modular Boot Disk" and used that as our basic network boot disk, making any additions and modifications as necessary, and then we scripted the batch file(s) that needed to execute. As I recall, there were either one or two that were called from the AUTOEXEC batch file. And, in addition, there were three of us working on it. That was back in 2004.

Today, I'm on my own. Would you like to guess how many times I've had to create network, or even NON-network, boot CDs since 2004?

None. Exactly none. I haven't touched that technology since 2004. Now reference my post from November 20, 2006. See where I'm going with this?

I have no CLUE how to make a bootable CD anymore. I have no CLUE how to edit a CONFIG.SYS file to call the correct drivers, or to edit the AUTOEXEC.BAT so it references the correct paths for commands, the correct drives for files, etc. I couldn't remember jack SPRAT about that, and after a few hours of digging into this, that became painfully evident.

The disks created for that company back in 2004 belong to that company; I don't have copies at home. No problem; I'll download the modular one again. Oops, the site's changed. Darn, if I'm not booting to a network, this is going to crash and have issues. Hmm. Okay, I'll create a Windows 98 boot disk and then just copy it to a CD. Oh wait -- I don't have a copy of Windows 98 anymore. Even if I did, how do I edit the CONFIG.SYS file so that the correct USB DOS drivers are loaded? What ARE the correct USB DOS drivers? Oh crap -- there aren't any. You can try one of these GENERIC ones and SEE if it works, but no promises. Just edit your CONFIG.SYS so that the ... crap. How do I do that again?? Damn!

Okay, time for more research.

No luck. All the documents I can find on the 'net say the same things: Make the drive bootable first, load the correct drivers from a CD or diskette, then use the drive that way. Most of them were talking about a pen or key drive anyway; you know, one of those cool little sticks you can carry around in your pocket-protector and whip out to impress your friends. Normal people use them for storing things like digital photos or for porting presentations back and forth to client sites, etc. Geeks use them to boot their buddies' computers and do things like load Windows XP on a 256MB storage device. How cool are THEY, eh?

Okay, this is WAY more about hardware than I EVER wanted to know, never mind have time to LEARN. Now what?

Day two: still no luck. Still lost at sea. Still stuck on this. Hope is on the horizon, though; I've located a utility that will allow me to format the drive as a boot disk! Ha-ZAH!! YEEEEEE-haww! Now we're gettin' somewhere. Okay, I downloaded the utility and installed it. I launched it, and there it was: HP USB Flash Storage Formatting Utility. It looked just like the format utility in Windows; the only difference was that the devices it detected were the USB drives attached. It saw the Seagate no problem. Wow, this is cooking along now! Woo HOO!

I selected the FAT32 file system for my drive. Selecting the NTFS file format disabled the option to make the drive bootable. Now, it prompts you for the DOS files you need. Ummm ... where did I put those DOS files again?

Back to the Internet. Search, search, search; come up with a couple of options. Try them one at a time, I suppose.

Okay, first, I make a Windows XP boot disk from some files I downloaded. I apply them to the (working) boot disk my wife made for me the night before (she's helpful like that). I test it. Seems okay. All right, now I can tell the utility to get the files from the floppy. Selecting that option, I proceed.

At first, I thought the utility was hung. It didn't seem to move. I checked on it about 15 minutes later, and it had FINALLY click one little progress bar farther along. Ugh. This is going to take some time.

So I blog, I do some more research, I check my email, and I check on my utility once in a while. Progress is happening faster now; more bars appear more frequently. Nice -- maybe it won't take that long after all.

Blog some more, post the blog, check my email again, text my wife. Smoke. Come back. Check the utility.

"Drive is too large. Format failed." The error message stares at me as coldly as a reptile, unfeeling, uncaring about the sinking heart in my chest. Windows won't do it -- because the drive is large, it wants to use NTFS to do the formatting, and that won't enable me to make the drive bootable. This utility, by which EVERYONE on the Internet SWORE (well ... for key/pen drives, at least), didn't work. WHAT AM I GOING TO DO?? Failure is imminent!

Go back to the Internet, and this time, I'm searching specifically for the HP Flash Drive Formatting utility. I get hits ... lots of hits.

It turns out there are two versions. Great. Just my luck. One version (the one I have) is version 2.00.006. The other version is 2.1.8 Rev. A, which I DON'T have. Okay, how do I get it? A few more pages -- stay awake now, dammit, this is important, even if it IS boring as all hell and loaded with technogeek speak! -- and I find that there are a few references on the web for this particular utility. On HP's website, the newer version is bundled along with a 45MB (!!) software package designed just for making their USB storage devices bootable and flashable (I don't even want to know). But some clever duck had found it on another page somewhere, and provided it sans all the fluff and stuff. That's the one I downloaded. Bingo bango bongo, I'm ready to try again.

I load it up. It's version 2.1.8 Rev. A. Beautiful. I launch the utility, make my selections, insert my Windows ME boot disk (don't ask), and I go off to deliberately not think about it. I check back after blogging, checking my email, and texting my wife. I go smoke, too. I need to quit, I remember thinking. I really don't like it anymore.

I come back and I chicken out; I found out that Iomega put out a utility a while back that not only loaded their drivers for making a flash drive bootable, it comes with all the files to make it a boot disk, too. I extract and run the program, and copy the files to the floppy. No errors; I guess the HP utility is finished with the floppy disk. Cool, now I can check my boot disk once the formatting is finished.

I check my progress.

IT'S DONE!! IT WORKED!! (Insert "Hallelujah!" from Handel's Messiah here.)

Okay, now ... I have to get the files off of the boot floppy onto the USB drive. Easy enough; now to test. I erase all the boot files from the Seagate, and load on the Iomega-provided files and utilities. I restart my computer, and I wait.

My computer boots right to the internal hard disk.

Whiskey tango foxtrot ... ?

Okay, try again. Go into the BIOS; enable every possible USB device. Change the boot order priority so that the HDD is last. Reboot the PC.



Son of a ...

Okay, now, I unplug the USB drive from my computer and plug it into the laptop I was given; I reboot THAT machine.

Errors. Errors out the ass. So many errors I can't even read them all -- they roll right off the screen.

ARRGGHH!! Okay ... now what? I run the system step-by-step. The problem is that the CONFIG.SYS file references static drive letters, and I have no idea how to change that. Son of a ...

All right. Go back to the floppy. Reformat; load on Windows ME boot files again. Plug the USB drive back into my desktop unit and reformat the USB drive as FAT32, use the WinME files from the floppy, and wait. When it finishes, I reboot. Nothing. FRICKIN' FRACK!! Remove the drive from my desktop, plug it into the laptop, and try yet again.

And it worked.

HUH?? WHA--??

More research.

Hours and hours of research, reading every line of every page even remotely relevant. I found HP's own discussion forum, wherein I discover that many people are trying to fix this problem with this Compaq product line, and there are a LOT of chimed in opinions. The original poster was saying that they couldn't get a model in the same product line as my desktop wasn't able to get the machine to boot to USB no matter what they tried. Did anyone have any suggestions? Several users all offer helpful tips; no dice. Pages upon pages of "no dice," in fact. Conspicuously absent from the discussion where both HP and Compaq reps. At the latest, as of October of 2006, no one had fixed this issue.

Well, isn't that just peachy?

I copy the GHOST.EXE file (which is the DOS executable of the imaging software I'm using) onto the Seagate drive, and reboot the laptop. It comes up perfectly, and I run the imaging program. It creates an image perfectly.

At about 4:00 p.m., my manager comes to me and asks how it's going. I tell him I've gotten the laptop done, but would need another desktop to finish testing. He says I have until noon today to do so before I have to return to what I was working on before. For the life of me, I can't remember what that was, so I agree and go home feeling pretty good.

Day three.

I come in this morning, and the manager greets me at about 9:00 a.m. He tells me he got approval to test on another desktop and we go and grab one from the storage area where the developers hide all their stuff. I set it all up, and the 19" flat panel that is going to be used with it. I know academically it makes no difference, but I don't want to take any chances here. It takes me maybe half an hour to set everything up. I make sure the USB drive's power is off, plug it in, and then power on the small form-factor HP desktop. When it comes up, I see it has the company's image on it from the IT department, so I go ahead and log in, then power on the USB drive.

It comes up successfully, and I check to see that all the files are still there. So far, so good.

Now, I restart the PC, and as it's coming back up, I go into the BIOS and set it up for USB booting. The BIOS looks a lot like the one in my PC, and I'm instantly concerned, but there are some differences. Hopefully functionality is one of them.

I reboot the computer after accepting all my changes and wait.

And guess what?

You know what. The title of this post says it all.

Sometimes you're good, sometimes you're lucky, and sometimes you just can't tell.


No comments: