Partitioning and Formatting Blank Drives in Vista


October 23rd, 2008

Recently, I feared that one of my USB drives might be failing, so, after moving the data off of it, I ran it through the gamut of diagnostics, including writing zeros to the drive, which, of course, blew away the data and partition table.

When I went to the Computer Management -> Storage -> Disk Management console in Vista, the drive was there, sure enough, showing as “Unallocated”. I right-clicked and went to create a New Simple Volume.

Normally, this works. I followed the prompts which asked me for the partition’s size, drive letter, and filesystem format, but to no avail. “The operation cannot be completed because the disk is not initialized.”

On closer inspection of the Disk Management screen, sure enough, the drive says Not Initialized, instead of the typical “Online”.

I could find no way to initialize this disk via the GUI. Since I have a genetic aversion to GUIs anyway (especially the useless ones), I bailed out to an Administrator command prompt.

Update

[2008-Nov-18]: As Brian wisely pointed out in the comments, it is actually possible to initialize a disk from the GUI, by right-clicking the Disk Name (i.e., the column heading to the left, in the above picture). This will actually spare you from DiskPart (below). Thanks Brian!

DiskPart to the rescue

DiskPart allows free editing of partitions. Standard disclaimer, here: if you’re not 100% sure of what you’re doing, don’t do it. It is quite possible to mess up your system and/or lose data using this tool.

So, here’s how to rebuild a disk that has been overwritten with zeros, random bits, or worse.

Step 1: Load DiskPart, and find the desired disk

C:\>diskpart

Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: VISTA-PC

DISKPART> LIST DISK

Disk ###  Status      Size     Free     Dyn  Gpt
--------  ----------  -------  -------  ---  ---
Disk 0    Online       233 GB      0 B
Disk 1    Online       932 GB      0 B
Disk 2    Online       466 GB   466 GB
Disk 3    No Media        0 B      0 B
Disk 4    No Media        0 B      0 B

Here, we see that Disk 2 is the one we want (it is also the only one with free space, which is reassuring).

Step 2: Select the disk

This tells diskpart that any operations we want to run will affect Disk 2.

DISKPART> SELECT DISK 2

Disk 2 is now the selected disk.

Step 3: Create a primary partition

DISKPART> CREATE PARTITION PRIMARY

DiskPart succeeded in creating the specified partition.

DISKPART> ASSIGN LETTER=I

DiskPart successfully assigned the drive letter or mount point.

DISKPART>

And, seconds later, a format prompt window popped up.

Success! After a full format, the drive is back in business.

Microsoft TechNet has a good article on DiskPart here: http://technet2.microsoft.com/WindowsServer/f/?en/Library/19a9ac4d-d151-4fde-b187-9f8dfa09cb351033.mspx

DiskPart itself has some decent online help, by typing “HELP” at the prompt.

Happy formatting!

5 Responses to “Partitioning and Formatting Blank Drives in Vista”

  1. Brian Says:

    The reason it didn’t work, was because you had to initialize it.
    On this image:
    http://farm4.static.flickr.com/3253/2967769300_ed50995f64.jpg?v=0
    Do you see the column where it says “Not initialized”? Simply right click that COLUMN (not the other side) and hit initialize. It will install an MBR.

    Then you can format via the GUI as you choose.

    I however applaud your tutorial, it’s good to know how to end run the GUI!

  2. Ryan Thompson Says:

    Hi Brian,

    Thanks for the info! You are absolutely right–that method works like a charm. I will update the article accordingly.

    But, hey, hats off to Microsoft for hiding this somewhat important feature in a 2nd context menu in the column heading! I bet the UI experts I know would slap me silly if I tried to slide that one through a usability study.

    - R

  3. Shehzad Says:

    wow, phew.
    was trying to install a new 1TB WD drive via external. had the same issue, googled and landed here.

    got it sorted, although the format took longer than usual.

    my query – is the drive compromised? why does this happen?

    thanks!

  4. Steven Says:

    Thaneks! It wouldn’t let me format but when I went back to the gui section, the drive was initialized and I was able to format then!

  5. random guy Says:

    Nice info. FYI: For anyone who doesn’t know how to find “computer management” console, you can type “computer management” into the search box and it will pop up. The link in the start menu to the MMC/management is missing on some computers.