Using DISKPART & DISM to Clean Install.

Page 2 of 6 FirstFirst 1234 ... LastLast

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #11

    Hello @SIW2,

    SIW2 said:
    How can you sel par 1 when there aren't any partitions on the disk?
    I read somewhere that SOMETIMES, the MSR [Microsoft Reserved] Partition gets automatically created at the first stage. I just included that as a precautionary measure.

    This is why I am seeking advice as this is NEW to me.
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #12

    SIW2 said:
    diskpart
    select disk 0
    clean
    convert gpt

    select part 1


    How can you sel par 1 when there arent any partitions on the disk?
    @SIW2
    @Paul Black

    After gpt

    you need : select disk nnn
    then depending on what you want to do
    either ------- create partition efi size=100
    format fs=fat32 quick label="System" <===== current EFI partitions should be fat32 although possible newer systems allow ntfs
    assign letter=S --- if you want to do bcdboot to it
    or ---- create partition msr size=128 (std ms reserved partition) don't format it if you want an MSR partition -- if you are creating a complete Native disk for VHDX booting with no existing "classic" windows installs on the HDD.

    or create partition primary
    format ntfs quick label="Main" (label is optional)
    assign letter=G

    Now you've got proper access

    Cheers
    jimbo
      My Computer


  3. Posts : 4,588
    several
       #13

    diskpart
    select disk 0
    clean
    convert gpt

    Disk 0 is already selected Jimbo
      My Computer


  4. Posts : 17,661
    Windows 10 Pro
       #14

    Paul Black said:
    Now I thought that I would have a go at performing a Clean Install using a combination of DISKPART and DISM for a change.
    Tutorial: Apply Windows Image using DISM Instead of Clean Install

    Kari
      My Computer


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #15

    Hello @Kari,

    Thanks for the reply, it is appreciated. Excellent Tutorial Kari.



    Have you got the DISKPART commands for PART 1 somewhere or in another Tutorial please?

    I really would like to have a go at setting up PART 1 with DISKPART commands, purely for the experience of it and as a learning curve.

    Thanks.

      My Computer


  6. Posts : 18,432
    Windows 11 Pro
       #16

    At the end you have:

    Code:
    diskpart
    list volume
    select volume 3 <- The R: [Recovery] Letter
    remove
    exit <- At this stage I could copy the CMD Prompt Data and Save it as a .txt file.
    exit
    This should be:

    Code:
    diskpart
    select volume R
    remove
    select volume S
    remove
    exit
    exit
    Also, whenever you do assign letter, the drive letter does not get quotation marks. You have:

    Code:
    assign letter="D"
    It should be
    Code:
    asign letter=d
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #17

    Hello @NavyLCDR,

    Thanks for the reply and correcting my errors, it is appreciated.

    Obviously I can NOT test this for a day or two, but do you think that this is pretty much ready to go please?

    Code:
    
    diskpart
    select disk 0
    clean
    convert gpt
    
    create partition efi size=100
    format quick fs=fat32 label="System"
    assign letter=S
    
    create partition msr size=16
    
    create partition primary size=30720
    format quick fs=ntfs label="W10"
    assign letter=W
    
    create partition primary size=450
    format quick fs=ntfs label="Recovery"
    assign letter=R
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    
    create partition primary size=51200
    format quick fs=ntfs label="Data"
    assign letter=D
    list volume
    exit
    
    dism /Apply-Image /ImageFile:F:\Sources\install.wim /index:6 /ApplyDir:W:\ /Compact /EA
    
    W:\Windows\System32\bcdboot W:\Windows /s S:
    
    md R:\Recovery\WinRE
    xcopy /h W:\Windows\System32\Recovery\WinRE.wim R:\Recovery\WinRE /Target W:\Windows
    W:\Windows\Systen32\REAgentC /SetReImage /Path R:\Recovery\WinRE /Target W:\Windows
    
    diskpart
    select volume R
    remove
    select volume S
    remove
    exit
    exit

      My Computer


  8. Posts : 18,432
    Windows 11 Pro
       #18

    Paul Black said:
    Hello @NavyLCDR,

    Thanks for the reply and correcting my errors, it is appreciated.

    Obviously I can NOT test this for a day or two, but do you think that this is pretty much ready to go please?
    I'm getting ready to try it out for you.
      My Computer


  9. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #19

    Hello @NavyLCDR,

    NavyLCDR said:
    I'm getting ready to try it out for you.
    Thank you. You are a Diamond.
      My Computer


  10. Posts : 18,432
    Windows 11 Pro
       #20

    You need to delete " /Target W:\Windows" from the end of your xcopy command.
    "W:\Windows\Systen32\REAgentC /SetReImage /Path R:\Recovery\WinRE /Target W:\Windows" failed.

    Code:
    X:\Sources>diskpart
    
    Microsoft DiskPart version 10.0.19041.964
    
    Copyright (C) Microsoft Corporation.
    On computer: MINWINPC
    
    DISKPART> select disk 0
    
    Disk 0 is now the selected disk.
    
    DISKPART> clean
    
    DiskPart succeeded in cleaning the disk.
    
    DISKPART> convert gpt
    
    DiskPart successfully converted the selected disk to GPT format.
    
    DISKPART> create partition efi size=100
    
    DiskPart succeeded in creating the specified partition.
    
    DISKPART> format quick fs=fat32 label="System"
    
      100 percent completed
    
    DiskPart successfully formatted the volume.
    
    DISKPART> assign letter=S
    
    DiskPart successfully assigned the drive letter or mount point.
    
    DISKPART> create partition msr size=16
    
    DiskPart succeeded in creating the specified partition.
    
    DISKPART> create partition primary size=30720
    
    DiskPart succeeded in creating the specified partition.
    
    DISKPART> format quick fs=ntfs label="W10"
    
      100 percent completed
    
    DiskPart successfully formatted the volume.
    
    DISKPART> assign letter=W
    
    DiskPart successfully assigned the drive letter or mount point.
    
    DISKPART> create partition primary size=450
    
    DiskPart succeeded in creating the specified partition.
    
    DISKPART> format quick fs=ntfs label="Recovery"
    
      100 percent completed
    
    DiskPart successfully formatted the volume.
    
    DISKPART> assign letter=R
    
    DiskPart successfully assigned the drive letter or mount point.
    
    DISKPART> set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    
    DiskPart successfully set the partition ID.
    
    DISKPART> gpt attributes=0x8000000000000001
    
    DiskPart successfully assigned the attributes to the selected GPT partition.
    
    DISKPART> create partition primary size=51200
    
    DiskPart succeeded in creating the specified partition.
    
    DISKPART> format quick fs=ntfs label="Data"
    
      100 percent completed
    
    DiskPart successfully formatted the volume.
    
    DISKPART> assign letter=D
    
    DiskPart successfully assigned the drive letter or mount point.
    
    DISKPART> list volume
    
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      Volume 0     F                FAT32  Partition     32 GB  Healthy
      Volume 1     W   W10          NTFS   Partition     30 GB  Healthy
    * Volume 2     D   Data         NTFS   Partition     50 GB  Healthy
      Volume 3     S   SYSTEM       FAT32  Partition    100 MB  Healthy    Hidden
      Volume 4     R   Recovery     NTFS   Partition    450 MB  Healthy    Hidden
    
    DISKPART> exit
    
    Leaving DiskPart...
    
    X:\Sources>dism /Apply-Image /ImageFile:F:\Sources\install.esd /index:6 /ApplyDir:W:\ /Compact /EA
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Applying image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    X:\Sources>W:\Windows\System32\bcdboot W:\Windows /s S:
    Boot files successfully created.
    
    X:\Sources>md R:\Recovery\WinRE
    
    X:\Sources>xcopy /h W:\Windows\System32\Recovery\WinRE.wim R:\Recovery\WinRE /Target W:\Windows
    Invalid number of parameters
    
    X:\Sources>xcopy /h W:\Windows\System32\Recovery\WinRE.wim R:\Recovery\WinRE
    W:\Windows\System32\Recovery\Winre.wim
    1 File(s) copied
    
    X:\Sources>W:\Windows\Systen32\REAgentC /SetReImage /Path R:\Recovery\WinRE /Target W:\Windows
    The system cannot find the path specified.
    
    X:\Sources>diskpart
    
    Microsoft DiskPart version 10.0.19041.964
    
    Copyright (C) Microsoft Corporation.
    On computer: MINWINPC
    
    DISKPART> select volume R
    
    Volume 3 is the selected volume.
    
    DISKPART> remove
    
    DiskPart successfully removed the drive letter or mount point.
    
    DISKPART> select volume S
    
    Volume 2 is the selected volume.
    
    DISKPART> remove
    
    DiskPart successfully removed the drive letter or mount point.
    
    DISKPART> exit
    
    Leaving DiskPart...
    
    X:\Sources>exit
      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 20:24.
Find Us




Windows 10 Forums