A Digital Age Deserves A Digital Leader

Using DiskPart on the Windows 7 DVD

Using DiskPart on the Windows 7 DVD

Postby Grav!ty » Fri Aug 14, 2009 12:56 am

Using DiskPart on the Windows 7 DVD

Image




From the Windows 7 Install UI, there is no way to prevent the creation of a small hidden "System Reserved" partition if there is no other operating system installed. It can be done using DiskPart from the Windows 7 install DVD.

Boot to the Windows 7 install DVD, select "Repair your computer" at the Install now setup screen, then select Command Prompt from the bottom of the menu that appears.


Basic partitioning and formatting.


At the command prompt type the following commands in the order they appear below:

diskpart and press Enter on your keyboard

create partition primary and press Enter on your keyboard (This uses the entire HDD to create one partition provided there is no existing partition structure)

format quick and press Enter on your keyboard

exit and press Enter on your keyboard

again

exit and press Enter on your keyboard

Click on Restart on the menu you are returned to and continue with installation of Windows 7. Select Custom and when presented with hard drive to install to, select the hard drive and click next.


If it's necessary for you to delete existing partitions on the hard drive you're going to use as the sole hard drive on your system, follow the directions below BEFORE the steps above.


Delete existing partitions.


At the command prompt type the following commands in the order they appear below:

diskpart and press Enter on your keyboard

select disk 0 and press Enter on your keyboard

list partition and press Enter on your keyboard (displays list of partitions and the partition numbers)

select partition 1 and press Enter on your keyboard

delete partition and press Enter on your keyboard

select partition 2 and press Enter on your keyboard

delete partition and press Enter on your keyboard

Continue selecting partitions by number and deleting them until all partitions are deleted if that's what you want to do.


Create partitions of a specific size.


At the command prompt type the following commands in the order they appear below:

diskpart and press Enter on your keyboard


select disk 0 and press Enter on your keyboard

list partition and press Enter on your keyboard (make sure you have no existing partitions)

create partition primary size=51200 and press Enter on your keyboard (This will create a partition of 50 GB. DiskPart uses a simple 1024 MB = 1 GB ratio, so multiply the number of GB you want by 24 and add that to the number of GB to get round numbers)

create partition primary and press Enter on your keyboard (This used after the command to create a partition of a specific size will use the remainder of the available disk space for a partition.


Shrink a partition to create a new partition.


At the command prompt type diskpart and press Enter

Once you're in DiskPart type select disk 0 and press Enter

type list partition and press Enter (this will give you your partition structure and the partition number you want to shrink)

type select partition 1 (make sure that partition number is the number of the partition you want to shrink)

type shrink desired=20480 (if you want a 20 GB partition - multiply the number of GB you want by 24 and add that to for example 20,000 MB to get round numbers in GB)

type create partition primary (this will use all the available free space you created to create a primary partition)

type list partition (to get the newly created partition number)

type select partition 2 ( where the number used is the number of the newly created partition)

type format quick
Image

"The great majority of mankind are satisfied with appearances, as though they were realities, and are often more influenced by the things that seem than by those that are." - Niccolo Machiavelli
PROfessional Member
User avatar
Posts: 15790
Joined: Tue Sep 14, 2004 5:22 am
Real Name: Graham

Return to Guides

Who is online

Users browsing this forum: No registered users and 1 guest

cron
cron