Diskpart is a command line tool that’ll let you manage disks in Windows. Diskpart comes in more than handy when installing Longhorn since numerous Longhorn WinPEs have trouble formatting disks themselves. On this page you will find a brief description on how to use this tool to partition a disk for installing Longhorn and a little extra.


In any WinPE press Shift + F10. This will bring up a command prompt window. In this window type: diskpart, now diskpart will initialize. To partition a disk execute the following commands line by line.

select disk 0
create partition primary
select partition 1

You now have created a partition on disk 0 which is assigned a drive letter and is active. If there are multiple drives in the system be sure to select the correct disk. For a list of disks you can type list disk.

Lazy diskpart session Diskpart session



Sometimes it’s not enough to just partition the drive. A couple of Longhorn installers also have trouble formatting the drive. You can manually format a drive by executing:

format fs=ntfs quick

In the example above the drive you selected before (drive 0) gets quick formatted with the NTFS file-system.


Executing setup from WinPE

If the Longhorn image doesn’t boot at all, it’s also possible to complete above steps and start the Longhorn setup from a WinPE that’s on another image. To do this in a VM, just add an additional CD/DVD drive and mount any Windows installation disc that uses WinPE (I mostly use a Windows 7 disc for this). Mount the Longhorn image to the other disc and make sure the VM boots from the alternative disc (so, Windows 7 in my case). When the WinPE is loaded, simply press Shift + F10 and diskpart away! To start the Longhorn setup navigate to the correct drive in command prompt (X:, probably it’s drive E) and execute setup. The Longhorn setup will commence!


Longhorn setup started from Windows 7 WinPE

Longhorn setup started from Windows 7 WinPE

  3 comments for “Diskpart

  1. RoyFoy
    25th September 2016 at 5:53 pm

    I tried starting 4011 with 4008 wine but I get a “Another copy of this application is already running” error.
    Is there a build that doesn’t give the error?

    • AeroWiz
      26th September 2016 at 8:59 pm

      That’s because the setup process is indeed already running. You’ll have to kill 4008’s setup before starting 4011’s setup.

  2. RoyFoy
    21st October 2016 at 3:21 am

    When I execute 4011’s setup after killing 4008’s setup it throws another error cause it is going to restart soon

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.