Friday, March 16, 2007

Vista on a stick: How to flash your OS

This little trick can cut your work in half

Bill O'Brien
March 16, 2007 (Computerworld) -- In a world where there's too much to do -- and too little time to do it in -- we're always looking for shortcuts. So when we stumbled upon a blog entry by Kurt Shintaku over on Windows Live Spaces that promised to let us install Vista from a flash drive instead of an optical disc, there was certainly interest.

Why? Well, if we needed to install Vista on only one computer, it would be a case of "Who cares?" However, running down an aisle of 20 or 50 or 100 PCs with a flash drive in hand, pouring out data at 20MB/sec. – 25MB/sec. sure beats doing the same thing with a disc in hand and an optical drive pumping away at 16MB/sec. – 21MB/sec. Sure, it doesn't sound like much of a speed boost on paper, but when you start multiplying those small transfer rates by the length of each operation and then the number of repetitions, time can fly or it can crawl. The claim for the flash drive was that it soars, as much as 50% faster in some instances (assuming your PC's BIOS will let you boot from a USB device in the first place).

If that wasn't bait enough, fast 4GB flash drives aren't expensive, they can be recycled as Vista ReadyDrives when you're done, and best of all, the instructions for transferring our Vista disc to flash looked so easy a caveman could …, well you get the picture. There were only 10 steps:
diskpart
select disk 1
clean
create partition primary
select partition 1
active
format fs=fat32
assign
exit
xcopy d:\*.* /s/e/f e:\

All right, you've just had a panic attack. What the heck are those? They're command-line instructions. You need to start things off by clicking your way through Start/All Programs/Accessories/Command Prompt. It sets up a DOS (remember that?) command screen. "Diskpart" starts a scripting subroutine that lets you enter line commands (which are the next eight things in the list), after which you exit the subroutine and use xcopy to transfer the contents of the disc to flash. See? Simple.

All right, it would be if it worked, but try as we might -- and we did for hours and hours and hours of iterations -- it didn't. We could manually start the install from the flash drive from a computer that was already up and running, but it wouldn't boot -- and that's important when you're beginning with a blank PC.

The situation was very surprising because Ken Shintaku "works for Microsoft as a Principal Technology Specialist in Southern California." Then we noticed that Ken had stripped some of the front-end stuff from a colleague's blog and, in that way that technicians can often be careless with simple things, he forgot to mention something his colleague did: You need to do this from a Vista PC.

Again there's a why? Under XP, diskpart doesn't seem to recognize the flash device as a drive. It will display the device as a volume, but the remaining diskpart commands couldn't care less about that. Vista, on the other hand, recognizes the flash device as a drive. That's why we could transfer the contents of the Vista disc under XP, but we couldn't use the diskpart commands to make it a boot device. Needless to say, our first Vista install was from disc.
And it still didn't work! You know how it is when you pull a key out of your pocket and it won't unlock the lock even though you're positive it's the correct key. It might be the right key, but if so, it must be the wrong lock. Throwing caution to the wind, we reformatted the flash drive, this time under Vista, and tried again. Still nothing. The diskpart commands weren't working.

One more time into the breach. Formatted again, we took a look at the screen and saw that Vista recognized the drive as H: when there was no G: drive. It had skipped a letter. That shouldn't be a big thing. Diskpart commands work with disk numbers, not letters, and they're assigned consecutively irrespective of the letter assignment. Still, just in case, we took a quick trip into the Control Panel's Disk Administrative Tools application and changed the drive letter to G:.

Suddenly the skies cleared, the waters parted, and the commands worked flawlessly (almost -- Vista automatically reassigned the drive to H: after the "assign" command, and we needed to used that designation when we executed xcopy). The flash drive booted, Vista was installed, and, yes, it was faster than disc. Oh happy day!

But you're not quite done yet. Although the diskpart commands are very straightforward, they're also quite generic as shown. Let's take a last look at the list:

diskpart starts the "diskpart" scripting subroutine
select disk 1 focus all subsequent commands on a particular disk
clean clean all configuration information from the disk
create partition primary create a partition (of type)
select partition 1 move the focus to the partition just created
active mark the partition as an active boot partition
format fs=fat32 format the partition with a fat32 file system
assign assign a drive letter to the disk
exit exit diskpart
xcopy d:\*.* /s/e/f e:\ copy all files and directories from one device to another

After you've run the DOS command prompt screen and entered the diskpart command, you need to focus the rest of the subroutine commands on the disk you're about to work with by selecting it. It will probably not be "1" as shown. In fact, if you use the command as is, you'll destroy the contents of drive 1, whatever it might be.

To find out where your flash drive resides in the hierarchy, use the "list disk" command. (If you type "help" at the diskpart prompt you'll see a list of all available commands.) It will display each disk on your computer with its corresponding number. In our case, our Corsair Readout flash drive was shown as "3" so our select command was actually "select disk 3." From that point on, any command we issued within diskpart was used on disk 3 without needing to mention it specifically again.

The xcopy command is also device-specific. Our optical drive was actually F: and, as mentioned, the flash drive was H:. (After you exit diskpart and before you use xcopy, you can check with Vista to see what your drive assignments are. The DOS command prompt window will just cycle out of sight as you do, but you can select it again to bring it to the top). Our xcopy command, therefore, looked like this:

xcopy f:\*.* /s/e/f h:\

(If you're DOS savvy, you've probably realized that the /s and /e switches are contradictory. /s copies directories and subdirectories, but not empty ones, while /e copies directories and subdirectories, including empty ones. It didn't seem to cause a problem, so we let it be. The /f switch displays the full source and destination file names while copying is going on, and a file called install.wim, the actual installation image itself, will seem to take forever to get from disc to flash. Don't get anxious. Just sweat it out).

When xcopy has completed transferring files, close the command prompt window. That's it. You're done. You can boot from the flash drive and do all your installations from there. Now you just have to figure out what you'll be doing with your free time… (And should you want to use your flash drive as a ReadyDrive when all your installs are completed, you'll have to reformat it so it's blank and, once connected to your Vista computer, right-click its icon and set it to work as one from its Properties box).

Bill O’Brien has written a half-dozen books on computers and technology. He has also written articles on topics ranging from Apple computers to PCs to Linux to commentary on IT hardware decisions.

12 comments:

Anonymous said...

Hurrah, that's what I was looking for, what a stuff! present here at this weblog, thanks admin of this web page.
My weblog www.daily-wet-tshirt.com

Anonymous said...

I am really enjoying the theme/design of your weblog. Do you ever run into
any internet browser compatibility issues? A small
number of my blog visitors have complained about my site not
operating correctly in Explorer but looks great in Chrome.
Do you have any advice to help fix this problem?
My page - naked teens

Anonymous said...

I'm extremely inspired together with your writing talents as smartly as with the format for your weblog. Is this a paid subject or did you modify it your self? Either way stay up the excellent quality writing, it is rare to see a great blog like this one today..
Visit my blog post : Teen Hottie Playing A Little

Anonymous said...

continuously i used to read smaller content which as well clear their motive,
and that is also happening with this paragraph
which I am reading at this time.
Here is my weblog ; http://www.partygalleries.com/

Anonymous said...

Hello to all, the contents present at this web page are really remarkable for people experience, well, keep up the nice work fellows.
My web page - High Desert

Anonymous said...

If you desire to get a good deal from this post then you have
to apply these techniques to your won website.
My blog : click here

Anonymous said...

Howdy! I know this is kinda off topic however I'd figured I'd
ask. Would you be interested in exchanging links or maybe
guest authoring a blog article or vice-versa?
My blog goes over a lot of the same subjects as yours and I
feel we could greatly benefit from each other.
If you are interested feel free to send me an email.
I look forward to hearing from you! Awesome blog by the way!


Review my homepage; jobs in uk

Anonymous said...

I think that everything typed made a lot of sense.
But, what about this? suppose you were to write a awesome post title?
I mean, I don't want to tell you how to run your blog, but suppose you added a post title that makes people want more? I mean "Vista on a stick: How to flash your OS" is kinda plain. You ought to peek at Yahoo's home
page and note how they write post titles to grab viewers to click.
You might try adding a video or a picture or two to get people excited about everything've got to say. Just my opinion, it could make your posts a little bit more interesting.

Feel free to visit my web site :: Resort Management Association

Anonymous said...

An outstanding share! I have just forwarded this onto a friend who has been conducting a little
research on this. And he in fact bought me lunch due to the fact that I stumbled upon it for him.
.. lol. So allow me to reword this.... Thanks for the meal!
! But yeah, thanx for spending some time to talk about this topic here on your site.


Feel free to visit my site: chiang mai top ten to do

Anonymous said...

Today, I went to the beach with my kids. I found a sea shell and gave it to
my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed
the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell someone!


Feel free to surf to my blog post: http://www.Babesflick.com/video/24576/pornstar-sextape-homemade-interracial.html

Anonymous said...

It's an remarkable post in support of all the internet viewers; they will get benefit from it I am sure.

Have a look at my webpage; ebony sex

Anonymous said...

Hi there! I know this is kinda off topic however , I'd figured I'd ask.

Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa?
My site covers a lot of the same topics as yours
and I feel we could greatly benefit from each
other. If you happen to be interested feel free to shoot me an e-mail.
I look forward to hearing from you! Wonderful blog by the way!


Here is my weblog - free porn moives daily (http://www.freshwaterslsc.com)