SSD / HDD : Optimize for Windows Reinstallation

How to Optimize an SSD / HDD When You're Ready to Reinstall the Operating System

This will show how to remove / over-write all existing data from a Solid State Drive (SSD) or a Hard Disk Drive (HDD), it'll work for both, then how to create a partition and then format that partition before install begins so you have a clean drive to start the installation with.

   Note

Before you start this, in the Windows start menu search box type diskmgmt.msc right click the entry and click "Run as Administrator" if you get a User Account Control (UAC) prompt enter your user credentials and click Yes; make very sure you know the correct drive number of the drive you want to do this to if you have more than one SSD / HDD in the machine, you don't want to do the wrong one.
   Warning

Do not do this to any SSD or HDD that has data on it you don't want to lose, the first thing this does is to mark the drive as "Unallocated Space" and then writes zeroes ( 0's ) to the entire drive, it's known as a "Secure Erase" and it will make data un-recoverable, it cannot be done to just a single partition on a drive, it will do the whole drive.
You have been warned!
   Information

It may be a help to over-write the HDD Master Boot Record (MBR) before you start any other procedure using the diskpart clean command, rather than the clean all; it takes just seconds to complete so you will have "unallocated" space to use either the Windows installer to create and format the partition(s) or use diskpart for that, however you choose.

Let's get started!



Step One

Boot To DISKPART


If need be, view this tutorial at the link below for an out-line of the process.
How to Boot to DISKPART at PC Startup

1) In the command window that opens type diskpart then hit the <enter> key then type list disk <enter> if you have more than one SSD / HDD in the machine it'll list them all.

Have a look here to view additional important information on this entire process.
click any image to enlarge
One_1.jpg
2) Now in the command window type select disk # (# = target disk number) then <enter>, you will get "Disk # is now the selected disk".
One_2.jpg
3) Now type clean <enter> you will get a blinking cursor telling you that clean all is working like in the second snip down, just relax and let it work.
One_3.1.jpg
One_3.2.jpg
4) When it finishes you'll get "DiskPart succeeded in cleaning the disk" in the command window.
One_4.1.jpg
To leave diskpart at any time and return to the Windows 7 installer type exit two (2) separate times and hit <enter> after each and you will be returned to the installer to continue the installation process.
One_4.2.jpg



Step Two

Create a Partition


1) Create a single partition of the entire HDD / SSD

Still in the same command window, to create a partition of the entire HDD / SSD, it is suggested if you are using one of the larger, 1 - 2TB HDDs that you use the outline in #2 below to create a single 100GB partition to do the installation to or #3 below if you would like to include the new Windows 7 System Reserved partition, as we're now seeing serious issues with some trying to install to such large partitions.

Do not format the created partition(s) with the installer if you create them using this process as the installer will delete all this info, the second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.

Now skip down to #5 below to start the installation.
click any image to enlarge
Two_1.1.jpg
Two_1.2.jpg
2) Create a specific size partition

If you wanted to create a specific size partition, say 100GB you would add the size you want to create in MBs like in the command below.
create partition primary size=102400 <enter>
1024MB = 1GB - 1024x100 = 102400, you can use/create any size you like.

You can always extend the Windows partition to include the remaining unallocated space on the HDD / SSD or create additional Primary partitions or an Extended partition after the installation completes if you choose.

Do not format the created partition(s) with the installer if you create them using this process as the installer will delete all this info, the second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.

Now skip down to #5 below to start the installation.
Two_2.1.jpg
Two_2.2.jpg
3) Create the System Reserved partition

If you should want to add the "System Reserved" partition back after the clean all, see this snip; of course you would have to select to install Windows 7 to the partition labeled as "Windows 7" during the install and do not format either partition with the installer.

The reason for suggesting to create the System Reserved at 200MB instead of the new default of 100MB is an attempt to curb some of the issues we're now seeing with the partition being too small when dual/multi booting and it also being needed for use with the Windows 7 Backup and Restore and BitLocker programs.

You can always extend the Windows partition to include the remaining unallocated space on the HDD / SSD or create additional Primary partitions or an Extended partition after the installation completes if you choose.

The second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.
Two_3.1.jpg
Two_3.2.jpg
4) See this tutorial for the "align" argument

Align a Solid State Drive for Windows Installation
Two_4.1.jpg
5) That's it, you're now done with the command window, type exit <enter> to leave diskpart and exit <enter> again to close the command window; if you're using a Windows 7 full installer it will go to the "Select Language" screen to continue the installation process as usual.

For those using a created repair CD or a Vista installer type exit <enter> to leave diskpart and exit <enter> again to close the command window; at the System Recovery Options dialog box that's still open click Restart to finish the process.
Restart.jpg
Enjoy! :)



 
Last edited by a moderator:
I got a problem:



81084332390788082128.png

:cry:
 

My Computer My Computer

OS
Windows 7
CPU
Intel pentium 4 cpu 3.00 GHz
Motherboard
Gigabyte technology, model 945PL-S3
Graphics Card(s)
NVIDIA Geforce 8400 GS
Sound Card
Realtek High Dfinition Audio
Keyboard
Farasoo
Mouse
Farasoo optical
Internet Speed
DSL 128 kb
diskpart has to be accessed while booting up, if you access it while the OS is running you'll get that message as it does not want to erase the OS.

James
 

My Computer My Computer

Computer type
PC/Desktop
OS
Win pro 64bit
CPU
i7-980X
Motherboard
X58A-UD3R
Memory
Corsair Dominator CMP12GX3M3A1600C9 9-9-9-24 X2
Graphics Card(s)
Asus Geforce GTX 560 Ti
Sound Card
none
Monitor(s) Displays
Eizo x 2
Screen Resolution
1200x1600
Hard Drives
Revo 240gb,
Samsung 840 pro OS
Samsung 840 Scratch
WD 1TB x 3.
PSU
Siverstone
Case
Corsair 700d
Cooling
Noctua 140
diskpart has to be accessed while booting up, if you access it while the OS is running you'll get that message as it does not want to erase the OS.

James

What does that mean?:confused:
 

My Computer My Computer

OS
Windows 7
CPU
Intel pentium 4 cpu 3.00 GHz
Motherboard
Gigabyte technology, model 945PL-S3
Graphics Card(s)
NVIDIA Geforce 8400 GS
Sound Card
Realtek High Dfinition Audio
Keyboard
Farasoo
Mouse
Farasoo optical
Internet Speed
DSL 128 kb

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
I know you are not suppose to defrag an SSD...is it ok to do a disk clean?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Home Premium
CPU
AMD Phenom II 955 Black Edition Quad Core
Motherboard
MSI 870-G45
Memory
Corsair XMS3 8GB
Graphics Card(s)
ATI Eyefinity HD 5770 5 mini display ports
Sound Card
Realtek High Definition 6.1
Monitor(s) Displays
2 DELL E207WFP 21.5" - 1 Acer 21.5"
Screen Resolution
2 Dells 1680x1050 - Acer 1920x1080
Hard Drives
Intel 40GB SSD
WD 500GB internal
WD 500Gb external
PSU
Cooler Master 500w
Case
Cooler Master 430 Black Elite
Keyboard
HP
Mouse
MIBRU
Internet Speed
10 mbs
Antivirus
Trend Micro
Browser
Chrome
I know you are not suppose to defrag an SSD...is it ok to do a disk clean?



Hello again mate.


If you're referring to the clean all outlined in this same tutorial, I couldn't count the times I've done my Intel, it was the test-bed for this tutorial, I've probably done very close to a hundred wipes to it so far and will do more in the very near future.
 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
I know you are not suppose to defrag an SSD...is it ok to do a disk clean?



Hello again mate.


If you're referring to the clean all outlined in this same tutorial, I couldn't count the times I've done my Intel, it was the test-bed for this tutorial, I've probably done very close to a hundred wipes to it so far and will do more in the very near future.

Hello my friend!

Actually just the disk clean up that's in the system tools under accessories was what I was referring to. I need to read about the clean all in the tutorial, cause if you use it I know it is good!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Home Premium
CPU
AMD Phenom II 955 Black Edition Quad Core
Motherboard
MSI 870-G45
Memory
Corsair XMS3 8GB
Graphics Card(s)
ATI Eyefinity HD 5770 5 mini display ports
Sound Card
Realtek High Definition 6.1
Monitor(s) Displays
2 DELL E207WFP 21.5" - 1 Acer 21.5"
Screen Resolution
2 Dells 1680x1050 - Acer 1920x1080
Hard Drives
Intel 40GB SSD
WD 500GB internal
WD 500Gb external
PSU
Cooler Master 500w
Case
Cooler Master 430 Black Elite
Keyboard
HP
Mouse
MIBRU
Internet Speed
10 mbs
Antivirus
Trend Micro
Browser
Chrome

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Your a blessing!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Home Premium
CPU
AMD Phenom II 955 Black Edition Quad Core
Motherboard
MSI 870-G45
Memory
Corsair XMS3 8GB
Graphics Card(s)
ATI Eyefinity HD 5770 5 mini display ports
Sound Card
Realtek High Definition 6.1
Monitor(s) Displays
2 DELL E207WFP 21.5" - 1 Acer 21.5"
Screen Resolution
2 Dells 1680x1050 - Acer 1920x1080
Hard Drives
Intel 40GB SSD
WD 500GB internal
WD 500Gb external
PSU
Cooler Master 500w
Case
Cooler Master 430 Black Elite
Keyboard
HP
Mouse
MIBRU
Internet Speed
10 mbs
Antivirus
Trend Micro
Browser
Chrome
Glad I could help Casey!
 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
You always do Ted! It worked like a charm and is more detailed than the regular ol' disk clean.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Home Premium
CPU
AMD Phenom II 955 Black Edition Quad Core
Motherboard
MSI 870-G45
Memory
Corsair XMS3 8GB
Graphics Card(s)
ATI Eyefinity HD 5770 5 mini display ports
Sound Card
Realtek High Definition 6.1
Monitor(s) Displays
2 DELL E207WFP 21.5" - 1 Acer 21.5"
Screen Resolution
2 Dells 1680x1050 - Acer 1920x1080
Hard Drives
Intel 40GB SSD
WD 500GB internal
WD 500Gb external
PSU
Cooler Master 500w
Case
Cooler Master 430 Black Elite
Keyboard
HP
Mouse
MIBRU
Internet Speed
10 mbs
Antivirus
Trend Micro
Browser
Chrome
Hello.

I would appreciate some guidance on how to setup my HDD for a clean reinstall of the OS. I have a 250 GB HDD and want to partition it for the OS and a 2nd seperate partition for my data. What size partition is needed for the OS to function optimally? I want to image these for backup and for the OS, to be able to restore it to keep it working well.

I also plan to add a SSD for the OS and would like to just install the OS image onto it when i get it (thinking a couple weeks from now). Looking @ whs tutorials here and elsewhere it seems he has his OS in a 30 GB partition on a SSD. Would that size work on the HDD?

I have Windows 7 Professional 64-bit with a 2.8 GHz Xeon 3550 processor and 6GB RAM. i just got the machine Friday and i installed the OS then. This is a Dell workstation from a univ. cstore that someone ordered 8 months ago but didn't take it and it had been setting in its box. There was no OS on first powerup, but i wasn't prepared to set it up how i wanted it and just let the install go default. When i worked at resizing the partition with Partition Wizard and then trying to work the new space it failed to boot. Start up repair has failed (i've been through the tutorials) so i am left to this measure. Not too big a deal at this point because i got it installed rather quickly Friday. I am also going to get another HDD for an image target.


Lots of great info here. I am learning a lot.

Neal
 

My Computer My Computer

Computer Manufacturer/Model Number
Dell Precision T3500
OS
Windows 7 Pro x64, Windows Home Prem x32
CPU
Intel Xeon 3530 2.8 GHz
Memory
6 GB
Monitor(s) Displays
HP w2207h
Hard Drives
250 GB
Hello nealich, welcome to Seven Forums!


The easiest way I can think of is to create a partition for the OS just a bit smaller than the SSD you intend to get, this way you won't have to use any special software to resize Windows from a larger partition to the size of the SSD when the time comes, you can just move the image to the SSD.

That being said, I wouldn't install Windows 7 to a partition smaller than 40GB to give Windows and installed programs/apps the needed room to 'expand' as needed and I wouldn't get an SSD smaller than about 60GB.

After you get the image moved to the SSD, you can always extend the Windows partition to include the remaining unallocated space on the SSD or create additional partitions if you choose.


You could use the clean all of Step One in this same tutorial to do the wipe and then use Step Two #2 to create the 40GB partition (size=40960) that should also sort the boot issues.

Be sure to post back with any further questions you may have and to keep us informed.
 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Thank you BFK! Your help and this forum are much appreciated. I wish i had found this long ago.

Clean all is running now...
could you enlighten me as to the reasons why one would or would not create the system reserved partition?

Neal
 

My Computer My Computer

Computer Manufacturer/Model Number
Dell Precision T3500
OS
Windows 7 Pro x64, Windows Home Prem x32
CPU
Intel Xeon 3530 2.8 GHz
Memory
6 GB
Monitor(s) Displays
HP w2207h
Hard Drives
250 GB
Hello Neal, it's my pleasure to be a help to others.


I personally create the System Reserved in the same manner outlined in Step Two #3 of this tutorial for every install I do; 1 useful thing it's use adds is the ability to run a startup repair without the use of a Windows installation/repair disk by adding a link in the advanced boot options menu like in the snip below and also the uses listed at #3.
click to enlarge
Repair.jpg

 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
22 Pages?!!! OMG! Never thought my thread would make so much! Proud:party::p
 

My Computer My Computer

OS
Windows 7
CPU
Intel pentium 4 cpu 3.00 GHz
Motherboard
Gigabyte technology, model 945PL-S3
Graphics Card(s)
NVIDIA Geforce 8400 GS
Sound Card
Realtek High Dfinition Audio
Keyboard
Farasoo
Mouse
Farasoo optical
Internet Speed
DSL 128 kb
I completed a clean all to wipe the HDD and the used diskpart to setup a a 200 MB system reserved option and 40 GB partition for Windows 7 and my applications. i like the idea of have the option of creating a system recovery partition. I have used to Macrium to image my partions and will see how it goes for tranferring the OS to the SSD when i get it.

Thank you again BFK for the guidance. Thank you to all the contibutors in this forum for the wealth of info on Windows. It is good to know where you can find great info and helpful people willing to share their experiences when the need arises.

Neal
 

My Computer My Computer

Computer Manufacturer/Model Number
Dell Precision T3500
OS
Windows 7 Pro x64, Windows Home Prem x32
CPU
Intel Xeon 3530 2.8 GHz
Memory
6 GB
Monitor(s) Displays
HP w2207h
Hard Drives
250 GB
Hello again Neal.



I'm very happy to be a help and am pleased the tutorial was useful, thank you for posting back with an update; come back anytime, we'll be here. :)
 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
I just finished a lot of "update" work to this tutorial to make it easier to use and better understood, especially Step Two #1.
 

My Computer My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Thumbs up for the tut :) thanks
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self Built
OS
Windows 10 Pro
CPU
Core i5 9600K
Motherboard
ASUS ROG Strix Z390-F Gaming
Memory
Corsair Vengeance Pro 2x 8GB (16GB) 3200MHz DDR4
Graphics Card(s)
MSI GTX 1070 Gaming X 8GB
Sound Card
ASRock A-Style Purity Sound
Monitor(s) Displays
ASUS VX239H IPS
Screen Resolution
1920x1080
Hard Drives
XPG SPECTRIX S40G 2566GB M.2 NVMe | Patriot P210 512GB SSD | Seagate BarraCuda 4TB 5400RPM
PSU
Thermaltake Smart 600w RGB 80Plus
Case
NZXT H500 with 3x Corsair HD120 RGB w/Node Pro
Cooling
Cryorig H7
Keyboard
Corsair K70 RapidFire RGB (Cherry MX Speed)
Mouse
Logitech G402 Hyperion Fury
Internet Speed
20MB Cable Broadband
Browser
Chrome
Other Info
Corsair MM300 Extended Anti-Fray Mouse Pad | Edifier C2 2.1ch Sound System | XBOX One S Controller | XBOX 360 Wireless Controller for Windows | APC SUA1000i Smart-UPS | PS4 Slim 500GB [Region 1 - USA]
Back
Top