failing to partition with DISKPART


  1. Posts : 1
    win10
       #1

    failing to partition with DISKPART


    Hi,
    I have 1TB drive (931 GB looking form diskpart) and I need to install Win10 (and 11) on the disk. I'm using .WIM file.
    For partitioning I'm using text file, with all the commands for the DISKPAT,
    for some reason, I have an error, see below:

    No usable free extent could be found. It may be that there is insufficient
    free space to create a partition at the specified size and offset. Specify
    different size and offset values or don't specify either to create the
    maximum sized partition. It may be that the disk is partitioned using the MBR disk
    partitioning format and the disk contains either 4 primary partitions, (no
    more partitions may be created), or 3 primary partitions and one extended
    partition, (only logical drives may be created).


    Here is the lines from the text file:

    select disk 0
    clean
    convert gpt

    create partition primary size=768
    format quick fs=ntfs label="Windows RE tools"
    assign letter="T"

    create partition efi size=100
    rem == Note: for Advanced Format Generation One drives, change to size=260.
    format quick fs=fat32 label="System"
    assign letter="S"

    create partition msr size=206806
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter="W"

    create partition msr size=59800
    create partition primary
    format quick fs=ntfs label="Logical drive"
    assign letter="D"

    I tried making the size of the "D" drive smaller and even tried making just "100MB" partition but still having the same error.
    I also tried removing the "size=59800" from the file.

    I thought it (diskpart) would format remaining part of the drive:

    create partition primary
    format quick fs=ntfs label="logical drive"
    assign letter="D"


    This time I had an error :

    There is not enough usable space. Diskpart Virtual disk Service error...



    Could you guys help me with this?
      My Computer


  2. Posts : 2,526
    Windows 11 Pro (latest update ... forever anal)
       #2

    Any reason why you want to persevere with Diskpart (other than to beat the b4st4rd!!)

    GUI 3rd party options are much more usable
    - Minitool Partition Wizard (this forum's favouruite)
    - AOMEI Partition Assistant
    (both freeware)
      My Computers


  3. Posts : 8,693
    windows 10
       #3

    Simplest let windows create what it needs then resize after
      My Computer


  4. Posts : 1,088
    Windows 7
       #4

    A more typical diskpart:
    Code:
    select disk 0
    clean
    convert gpt
    
    create partition efi size=100
    rem == Note: for Advanced Format Generation One drives, change to size=260.
    format quick fs=fat32 label="System"
    assign letter="S"
    
    create partition msr size=16
    
    create partition primary size=206790
    format quick fs=ntfs label="Windows"
    assign letter="W"
    
    create partition primary size=768
    format quick fs=ntfs label="Windows RE tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes=0x8000000000000001
    assign letter="T"
    
    create partition primary size=59800
    format quick fs=ntfs label="Logical drive"
    assign letter="D"

    Run diskpart, and confirm the actual disk size matches the sum of all the partition sizes you've specified. In your original diskpart file, you created two MSR partitions (when only a small one is needed). I've subtracted 16 from the Windows volume to account for the single MSR partition.
      My Computer


  5. Posts : 7,331
    Windows 11 Pro - Windows 7 HP - Lubuntu
       #5

    @labinir the MSR partition is a RAW partition and for a 1T drive should be 16M, not 59G
    The correct GPT partition order would be
    failing to partition with DISKPART-uefi-partitions.png
    And a data partition should be the last with the remaining space
    I suppose you will extract the correct Windows index to the Windows (W:) partition and then manually load the boot manager to the EFI partition etc.

    @garlin, correct if I'm wrong.
    When you convert to gpt it will create a MSR 16M partition.
    So I would do:

    Code:
    diskpart
    list disk (it will list all drives. Identify the new drive number)
    select disk n (replace n with drive number obtained with list disk)
    clean
    convert gpt
    sel part 1 (to select the MSR partition created)
    del part override (to delete the MSR partition created)
    create part EFI size=100
    format quick FS=fat32 label=EFI
    assign letter=S
    create part MSR size=16
    create partition primary size=206790
    format quick fs=ntfs label="Windows"
    assign letter="W"
    create partition primary size=1024
    format quick fs=ntfs label="Windows RE tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes=0x8000000000000001
    assign letter="R"
    create partition primary (no size to be the remaining drive size)
    format quick fs=ntfs label="Logical drive"
    assign letter="D"
    exit (to exit diskpart)
    I would do another way
    Code:
    diskpart
    list disk (it will list all drives. Identify the new drive number)
    select disk n (replace n with drive number obtained with list disk)
    clean
    convert gpt
    sel part 1 (to select the MSR partition created)
    del part override (to delete the MSR partition created)
    create partition primary size=80000 
    format quick fs=ntfs
    assign letter=W
    create partition primary (no size to be the remaining drive size)
    format quick fs=ntfs label="Data"
    assign letter="D"
    Select vol w
    del part override (to delete the W: partition created)
    exit (to exit diskpart)
    Detach ALL other boot able drives (so you don't have Windows on the target drive and the boot manager on the EFI partition on the other drive)
    Boot the Win 11 USB installation drive as UEFI and point to install to the unallocated space created when you deleted W:
    It will install Windows and create the EFI, MSR, C: and recovery partitions (total = 80G) and a D: partition labeled Data on the remaining size.
    Last edited by Megahertz; 1 Week Ago at 18:35.
      My Computers


  6. Posts : 1,088
    Windows 7
       #6

    "convert gpt" doesn't automatically create a MSR partition. It only changes the disk type, you still have to create a single MSR partition which can stay the minimum size of 16 MB.

    Windows doesn't care about the exact order of the partitions, as long as each one is correctly created. But the normal practice is to put the most static partitions (which rarely change in size) in the front. So the typical order is 1. EFI, 2. MSR.

    After that, it's normal to put the Recovery partition immediately after Windows. This is to allow you to grow the Recovery partition by deleting it, shrinking Windows volume by some amount, and then recreating a larger Recovery partition in the enlarged gap.

    If you have a data partition, it's up to you if you want it at the end, or before the Windows/Recovery pair.

    For example:
    EFI | MSR | Windows | Recovery | Data
    or
    EFI | MSR | Data | Windows | Recovery

    One thing you can do for disk layout on a disk where you're not sure about the exact size is to specify all but one of the partitions as a fixed size, and allow diskpart to figure it out the math.

    Example: EFI | MSR |Windows (206790 MB) | Recovery (768 MB) | Data (remaining disk space)
    Code:
    ...
    create partition primary size=206790
    format quick fs=ntfs label="Windows"
    
    create partition primary size=768
    format quick fs=ntfs label="Windows RE tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes=0x8000000000000001
    
    create partition primary
    format quick fs=ntfs label="Logical drive"

    Example: EFI | MSR | Windows (remaining disk space) | Recovery (768 MB) | Data (59800 MB)
    Code:
    ...
    create partition primary
    shrink minimum=60568  <-- subtract 768 (Recovery) + 59800 (Data)
    format quick fs=ntfs label="Windows"
    
    create partition primary size=768
    format quick fs=ntfs label="Windows RE tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes=0x8000000000000001
    
    create partition primary size=59800
    format quick fs=ntfs label="Logical drive"
      My Computer


  7. Posts : 306
    Windows 10 Pro
       #7

    garlin said:
    "convert gpt" doesn't automatically create a MSR partition.
    Depends. It does if diskpart is executed from a running Windows installation.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:48.
Find Us




Windows 10 Forums