diskpart slow format vs clean /all

Page 1 of 2 12 LastLast

  1. Posts : 1,746
    Windows 10 Pro x64 22H2
       #1

    diskpart slow format vs clean /all


    I suspect this to be self explanatory but will ask anyway because it's not explicitly stated in the docs.

    Diskpart

    clean /all command will zero out entire disk
    format command without "quick" option will perform slow format.

    Is it valid to say that when we use slow format then no clean /all is necessary?
    doesn't slow format also zero the disk as if clean/all was run?

    What exactly does slow format do in addition compared to quick format and how is it different from clean /all?
      My Computer


  2. Posts : 16,946
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2

    Format only zeroes all sectors on the disk if you use the /P switch - /P:NumberEqualToOrGreaterThanZero.
    Quick format suppresses any /P switch in the command so it does not zero the disk.
    See the response to the command
    Code:
    Format /?
    or read Format - SS64
    It's referred to as "zeroing" but Format writes zeros only on the first /P run after which it writes random numbers.



    All the best,
    Denis
    Last edited by Try3; 12 Jun 2023 at 07:29.
      My Computer


  3. Posts : 1,746
    Windows 10 Pro x64 22H2
    Thread Starter
       #3

    At first you confused me because I never heard of "format.exe", but now found this link:
    windows 10 - Disk Management format vs command line format - Super User

    So basically slow format in diskpart zeroes the disk and there is no need for clean /all right?
    Format.exe in addition to zeroing with /P switch let's you write random data on top of zeroed disk.

    I guess I got this right, thanks!
      My Computer


  4. Posts : 16,946
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #4

    zebal said:
    At first you confused me because I never heard of "format.exe", but now found this link:
    windows 10 - Disk Management format vs command line format - Super User
    I have always understood [as do contributors to your linked article] that all Windows methods of formatting disks use the command Format.exe whether they bother telling you or not.

    zebal said:
    So basically slow format in diskpart zeroes the disk ...
    DiskPart uses the Format.exe command and only zeroes the disk if you use the /P switch.

    zebal said:
    Format.exe in addition to zeroing with /P switch let's you write random data on top of zeroed disk.
    The /P switch specifies how many times the "zeroing" is done but it is only zeros on the first run.

    zebal said:
    clean /all
    DiskPart's Clean command says it zeroes the disk. This seems to make sense since it only runs once [it has no /P switch to control repeat runs]
    Code:
    help clean
    
         Removes any and all partition or volume formatting from the disk with focus.
    
    Syntax:  CLEAN [ALL]
    
        ALL         Specifies that each and every byte\sector on the disk is set to zero, which completely deletes all data contained on the disk.
    
    On master boot record (MBR) disks, only the MBR partitioning information and hidden sector information are overwritten. On GUID partition table (GPT) disks, the GPT partitioning information, including the Protective MBR, is overwritten. If the ALL parameter is not used, the first 1MB and the last 1MB of the disk are zeroed. This erases any disk formatting that had been previously applied to the disk. The disk's state after cleaning the disk is 'UNINITIALIZED'.


    All the best,
    And thanks for the rep,
    Denis
      My Computer


  5. Posts : 1,746
    Windows 10 Pro x64 22H2
    Thread Starter
       #5

    Try3 said:
    DiskPart uses the Format.exe command and only zeroes the disk if you use the /P switch.
    But there is no /P switch in diskpart for format option, so it's implied without specifying "quick" right?
      My Computer


  6. Posts : 16,946
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #6

    zebal,

    I've just corrected serious typos in my posts.
    The first Format.exe /P run zeroes sectors, subsequent runs write random numbers rather than all zeroes.

    Just saw you post as I was typing.
    I believe that the DiskPart Format command writes zeroes because, as you say, it has no /P switch to initiate subsequent runs.
    It has a Quick switch so you'd have to use that if it is what you wanted.
    Diskpart Format - SS64


    Denis
      My Computer


  7. Posts : 1,746
    Windows 10 Pro x64 22H2
    Thread Starter
       #7

    Yes, makes sense, thanks again!

    Although I really see no reason why would /P switch be used to write random data on top of a zeroed disk?
    If disk is zeroed, old data is no longer recoverable so what's the point to write junk on top of that?
      My Computer


  8. Posts : 16,946
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #8

    zebal said:
    If disk is zeroed, old data is no longer recoverable so what's the point to write junk on top of that?
    There were allegations that the residual magnetism on zeroed sectors would vary enough for the original values to be recovered by those with suitable equipment.
    By writing random numbers on subsequent runs, you complicate such attempted analysis.


    Denis
      My Computer


  9. Posts : 1,746
    Windows 10 Pro x64 22H2
    Thread Starter
       #9

    Nice, thank you for all the help!
      My Computer


  10. Posts : 6,306
    Windows 11 Pro - Windows 7 HP - Lubuntu
       #10

    Just to add to the discution: Diskpart Clean is a drive cmd and format is a partition cmd.

    - Diskpart Clean or Clean/all delete all partitions on the drive. Then you have to initialize as MBR or GPT and create partitions.

    - Diskpart Format or simply format creates a File System (Fat, NTFS, ext2 etc) on a partition.
      My Computers


 

  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 17:02.
Find Us




Windows 10 Forums