Diskpart
Commands
- DiskPart Command-Line Options (Windows Embedded Standard 7 Service Pack 1) - http://msdn.microsoft.com/en-us/library/ff794606%28v=winembedded.60%29.aspx
- DISKPART - http://www.tekweb.dk/manuals/command/commands/D/DISKPART.HTM
list:
DISK - Display a list of disks. For example, LIST DISK. PARTITION - Display a list of partitions on the selected disk. For example, LIST PARTITION. VOLUME - Display a list of volumes. For example, LIST VOLUME. VDISK - Displays a list of virtual disks.
help:
ACTIVE - Mark the selected partition as active. ADD - Add a mirror to a simple volume. ASSIGN - Assign a drive letter or mount point to the selected volume. ATTRIBUTES - Manipulate volume or disk attributes. ATTACH - Attaches a virtual disk file. AUTOMOUNT - Enable and disable automatic mounting of basic volumes. BREAK - Break a mirror set. CLEAN - Clear the configuration information, or all information, off the disk. COMPACT - Attempts to reduce the physical size of the file. CONVERT - Convert between different disk formats. CREATE - Create a volume, partition or virtual disk. DELETE - Delete an object. DETAIL - Provide details about an object. DETACH - Detaches a virtual disk file. EXIT - Exit DiskPart. EXTEND - Extend a volume. EXPAND - Expands the maximum size available on a virtual disk. FILESYSTEMS - Display current and supported file systems on the volume. FORMAT - Format the volume or partition. GPT - Assign attributes to the selected GPT partition. HELP - Display a list of commands. IMPORT - Import a disk group. INACTIVE - Mark the selected partition as inactive. LIST - Display a list of objects. MERGE - Merges a child disk with its parents. ONLINE - Online an object that is currently marked as offline. OFFLINE - Offline an object that is currently marked as online. RECOVER - Refreshes the state of all disks in the selected pack. Attempts recovery on disks in the invalid pack, and resynchronizes mirrored volumes and RAID5 volumes that have stale plex or parity data. REM - Does nothing. This is used to comment scripts. REMOVE - Remove a drive letter or mount point assignment. REPAIR - Repair a RAID-5 volume with a failed member. RESCAN - Rescan the computer looking for disks and volumes. RETAIN - Place a retained partition under a simple volume. SAN - Display or set the SAN policy for the currently booted OS. SELECT - Shift the focus to an object. SETID - Change the partition type. SHRINK - Reduce the size of the selected volume. UNIQUEID - Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature of a disk.
Create standard partition
diskpart list disk rem # DO NOT SELECT DISK 0 select disk 1 clean create partition primary list part format fs=fat32 label="Data" quick rem # for full disk - format fs fat32 quick exit
DISKPART LIST DISK SELECT DISK 1 CLEAN CREATE PARTITION PRIMARY SELECT PARTITION 1 ACTIVE FORMAT /Q FS=NTFS ASSIGN EXIT
Create a GUID Partition Table Partition on a Raw Disk
To create a GPT partition on a raw disk by using the Diskpart utility:
- At a command prompt, type: diskpart to start the Diskpart utility: "Diskpart version 0.0" is displayed as well as a Diskpart prompt.
- At the prompt, type: list to list the mounted hard drive volumes.
- At the prompt, type: select x (where x is the number of the hard disk drive that you want to convert to GPT). The following information is displayed: "Selected Disk = x".
- At the prompt, type: new gpt to add the GPT information into the non-volatile RAM (NVRAM).
- NOTE: This step does not create the GPT partition information.
- At the prompt, type: create name="efi system partition" type=efisys Size=102 to create the Extensible Firmware Interface (EFI) partition.
- NOTE: The name can be anything you want, but if the name has spaces in it, the name must have quotes around it. The type must equal either Efisys, Msres, or Msdata. If a size is not specified, the partition uses the remaining unpartitioned space. To install Windows XP, the Msdata partition must contain at least 2 gigabytes (GB) of free space.
- At the prompt, type: create name="microsoft reserved" type=msres Size=31 to create the MSR partition.
- At the prompt, type: create name="basic data" type=msdata to create a partition for the remaining unpartitioned space.
- At the prompt, type: inspect to display the partition information.
- At the prompt, type: exit to quit the Diskpart utility.
diskpart list disk REM # DO NOT SELECT DISK 0: select disk 1 clean convert gpt create partition primary list part select partition 1 format fs=fat32 label="EFI_1" quick REM # note: not required, but you can specify drive letter: "assign letter=s" assign exit
You can create an official EFI partition, but this does not work on a USB drive:
create partition efi size=100
References:
- Diskpart Create EFI Partition - TechCenter Media Gallery - TechCenter Extras - Dell Community - http://en.community.dell.com/techcenter/extras/m/mediagallery/19972600.aspx
- HOW TO: Use the Diskpart.efi Utility to Create a GUID Partition Table Partition on a Raw Disk in Windows - http://support.microsoft.com/kb/297800
- Creating Primary Partitions - http://windowscommand.uw.hu/wincmd0048.html