Running a diskpart "clean" command fails frequently in current Win 11 version


hsehestedt

Well-known member
Pro User
VIP
Local time
4:49 AM
Posts
2,566
Location
Texas, USA
OS
Win11 Pro 23H2
I've been experiencing an odd problem with Diskpart lately, wondering if anyone else is seeing this. It's really easy to reproduce.

Steps to Reproduce
==================
Plug in a thumb drive
Run diskpart
Within diskpart run the following commands (in my example, my thumb drive is disk 2). Be careful as this will erase the selected drive!:

list disk
select disk 2
clean

DiskPart has encountered an error: A device which does not exist was specified.
See the System Event Log for more information.

DISKPART>

If I look in event viewer, I see this message:

Cannot zero sectors on disk \\?\PhysicalDrive2. Error code: 1B1@0101000F


More Information
================
First, note that the above error happens ONLY if the thumb drive is configured for MBR. It will NEVER happen when it is GPT.

Second, my initial workaround was to simply issue the "clean" command again. Probably about 90% of the time, a second run of the command will work. However, I have had times in a batch file where it does not succeed, maybe due to the short time between the two commands. I have a program as well as several batch files that have a need for this to be rock stable.

I have a new workaround that seems to be working 100% for me, but it's stupid that I need to even employ such a workaround.

The new workaround is like this:

list disk
select disk 2
clean
convert gpt
clean
convert gpt
clean
convert mbr

The idea of the above series of commands is to try and perform a clean 3 times. Since we know that it never fails when GPT is used, after each clean we do a "convert gpt". By doing so, if we had a successful clean operation, we can guarantee that the next clean will not fail because we are now in GPT mode. Now, we are in a known good state, so we can do a final "convert mbr" successfully. The end result is a successfully cleaned disk using MBR.

I only just converted a system back to windows 10 so I have not been able to test to see if this happens on Windows 10. I plan to try it this evening. However, it's happening frequently on my Win 11 machines. Note that all my Win 11 machines are on the latest Feb 2022 Windows patches.

Has anyone else been noticing this? I can't swear how long this happening, but I became very aware of it in the last few weeks, definitely before the Feb patches rolled out.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
However, I have had times in a batch file where it does not succeed, maybe due to the short time between the two commands. I have a program as well as several batch files that have a need for this to be rock stable.

There is 15 second time out required between batch files.
Without the 15 second time out the second command may fail.

For example: diskpart /t 15

For the MBR clean see if adding noerr makes any difference. For example diskpart > sel dis 3 > clean noerr

Also instead of clean see if delete partition noerr override makes any difference.


This link had a similar work around mbr > gpt to clean:
 
Last edited:

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation
Thanks for the suggestions, zbook. I will give those a try.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Thanks for the suggestions, zbook. I will give those a try.


This is a link on the t /15

Code:
 Important

When using the DiskPart command as a part of a script,
it is recommended that you complete all of the DiskPart
operations together as part of a single DiskPart script.
You can run consecutive DiskPart scripts,
but you must allow at least 15 seconds between each script
for a complete shutdown of the previous execution before
running the DiskPart command again in successive scripts.
Otherwise, the successive scripts might fail.
You can add a pause between consecutive DiskPart scripts
by adding the timeout /t 15 command to your batch file along
with your DiskPart scripts.



 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation
This is a link on the t /15

Code:
 Important

When using the DiskPart command as a part of a script,
it is recommended that you complete all of the DiskPart
operations together as part of a single DiskPart script.
You can run consecutive DiskPart scripts,
but you must allow at least 15 seconds between each script
for a complete shutdown of the previous execution before
running the DiskPart command again in successive scripts.
Otherwise, the successive scripts might fail.
You can add a pause between consecutive DiskPart scripts
by adding the timeout /t 15 command to your batch file along
with your DiskPart scripts.



I appreciate that, but that's not the issue I'm encountering. Even if I run diskpart manually with no previous operations pending, the clean fails most of the time but only if the disk is MBR - NEVER for a GPT disk.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Hmmm interesting....Have you tried running

Dism.exe /Online /Cleanup-Image /RestoreHealth

and sfc /scannow to see if they could repair diskpart ( or if its damaged)

Also have you tried deleting the partition 1st then rebuilding it in win 11?

You should only have to do this once.
I seem to recall in Win 8 that there was a problem with diskpart not not liking mbr disks done in win 7.
but I can't pin it down.
 

My Computers

System One System Two

  • OS
    windows 10, 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gateway DX4370G
    CPU
    2.20 gigahertz AMD A6-3620 APU
    Motherboard
    Gateway DX4370G
    Memory
    16 gigs
    Graphics Card(s)
    NVIDIA GeForce GT 710
    Sound Card
    AMD HDMI AUDIO
    Monitor(s) Displays
    Samsung c27f390 (curved) 27 inch
    Screen Resolution
    1920x1080
    Hard Drives
    931GB Western Digital WDC WDBNCE0010PNC (SATA (SSD))
    465GB SHGS31-500GS-2 (SATA (SSD))
    multiple usb drives
    PSU
    unknown
    Case
    tower
    Keyboard
    logitech k400r
    Mouse
    logitech m570
    Internet Speed
    113 mbps
    Browser
    firefox
    Antivirus
    malwarebytes
  • Operating System
    Windows 11 Pro 21H2 22000.493
    Computer type
    PC/Desktop
    Manufacturer/Model
    hp Pavillion 590-p0053w
    CPU
    2.80 gigahertz Intel core i5-8400
    Motherboard
    hp 843B 00
    Memory
    16 gigs
    Graphics card(s)
    Intel(R) UDH Graphics 630
    Sound Card
    Intel(R) Display Audio onboard
    Monitor(s) Displays
    Samsung c27f390 (curved) 27 inch
    Screen Resolution
    1920x1080
    Hard Drives
    Ct500mx500ssd1 (500 gig)
    M2 pcie nvme 500 gig
    Case
    box
    Mouse
    logitech k270
    Keyboard
    logitech m185
    Browser
    firefox
    Antivirus
    malwarebytes
I've been experiencing an odd problem with Diskpart lately, wondering if anyone else is seeing this. It's really easy to reproduce.

Steps to Reproduce
==================
Plug in a thumb drive
Run diskpart
Within diskpart run the following commands (in my example, my thumb drive is disk 2). Be careful as this will erase the selected drive!:

list disk
select disk 2
clean

DiskPart has encountered an error: A device which does not exist was specified.
See the System Event Log for more information.

DISKPART>

If I look in event viewer, I see this message:

Cannot zero sectors on disk \\?\PhysicalDrive2. Error code: 1B1@0101000F


More Information
================
First, note that the above error happens ONLY if the thumb drive is configured for MBR. It will NEVER happen when it is GPT.

Second, my initial workaround was to simply issue the "clean" command again. Probably about 90% of the time, a second run of the command will work. However, I have had times in a batch file where it does not succeed, maybe due to the short time between the two commands. I have a program as well as several batch files that have a need for this to be rock stable.

I have a new workaround that seems to be working 100% for me, but it's stupid that I need to even employ such a workaround.

The new workaround is like this:

list disk
select disk 2
clean
convert gpt
clean
convert gpt
clean
convert mbr

The idea of the above series of commands is to try and perform a clean 3 times. Since we know that it never fails when GPT is used, after each clean we do a "convert gpt". By doing so, if we had a successful clean operation, we can guarantee that the next clean will not fail because we are now in GPT mode. Now, we are in a known good state, so we can do a final "convert mbr" successfully. The end result is a successfully cleaned disk using MBR.

I only just converted a system back to windows 10 so I have not been able to test to see if this happens on Windows 10. I plan to try it this evening. However, it's happening frequently on my Win 11 machines. Note that all my Win 11 machines are on the latest Feb 2022 Windows patches.

Has anyone else been noticing this? I can't swear how long this happening, but I became very aware of it in the last few weeks, definitely before the Feb patches rolled out.

Interesting. I recently cleanly installed because I upgraded all my NVMe SSDs and I ran into a similar issue - but it was not something that I do often, so I shrugged it off.

Now that you have steps of reproducibility, I'll see if I can get it to replicate on my end as well. WOuld not be surprised at all if there is a bug there that recently manifested itself that almost no one has found.
 

My Computers

System One System Two

  • OS
    Windows 11 23H2 Current build
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spectrum ES07DC9 4K Gaming Monitor (Glossy)
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD (USB)
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    NZXT KRAKEN Z73 73.11 CFM Liquid CPU Cooler (3x 120 mm push top) + Air 3x 140mm case fans (pull front) + 1x 120 mm (push back) and 1 x 120 mm (pull bottom)
    Keyboard
    SteelSeries Apex Pro Wired Gaming Keyboard
    Mouse
    Logitech MX Master 3S | MX Master 3 for Business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Browser
    Nightly (default) + Firefox (stable), Chrome, Edge
    Antivirus
    Defender + MB 5 Beta
  • Operating System
    ChromeOS Flex Dev Channel (current)
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Interesting. I recently cleanly installed because I upgraded all my NVMe SSDs and I ran into a similar issue - but it was not something that I do often, so I shrugged it off.

Now that you have steps of reproducibility, I'll see if I can get it to replicate on my end as well. WOuld not be surprised at all if there is a bug there that recently manifested itself that almost no one has found.
Thanks, John.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I appreciate that, but that's not the issue I'm encountering. Even if I run diskpart manually with no previous operations pending, the clean fails most of the time but only if the disk is MBR - NEVER for a GPT disk.
Not a solution, just a workaround:

Diff:
diskpart
sel disk X
convert GPT
clean
convert MBR

Kari
 

My Computers

System One System Two

  • OS
    Windows 11 PRO x64 Dev
    Manufacturer/Model
    Hyper-V Virtual Machine (host in System 2 specs)
    CPU
    Intel Core i7-8550U
    Memory
    6 GB
    Graphics Card(s)
    Microsoft Hyper-V Video
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
  • Operating System
    Windows 11 PRO x64 Dev Channel
    Computer type
    Laptop
    Manufacturer/Model
    HP HP ProBook 470 G5
    CPU
    Intel Core i7-8550U
    Motherboard
    HP 837F KBC Version 02.3D.00
    Memory
    16 GB
    Graphics card(s)
    Intel(R) UHD Graphics 620 & NVIDIA GeForce 930MX
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
    Hard Drives
    128 GB SSD & 1 TB HDD
    Mouse
    Wireless Logitech MSX mouse
    Keyboard
    Wireless Logitech MK710 keyboard
    Internet Speed
    100 Mbps down, 20 Mbps up
    Browser
    Edge Chromium Dev Channel
    Antivirus
    Windows Defender
    Other Info
    2 * 3 TB USB HDD
    6 TB WD Mirror NAS
Not a solution, just a workaround:

Diff:
diskpart
sel disk X
convert GPT
clean
convert MBR

Kari
Thanks, Kari. As I noted in my original post, that's almost exactly what I do but I perform the clean 3 times because it sometimes fails the first time, and on very rare occasion, fails the 2nd time. After each clen I perform a convert gpt because once I get it to gpt, I'm guaranteed success after that.

So it ends up looking like this:

Code:
list disk
select disk 2
clean
convert gpt
clean
convert gpt
clean
convert mbr
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
When I need to remove partitions and reset a thumbdrive I don't use diskpart. I hate command line interfaces so I use a 3rd party utility like EaseUS Partition Manager or Partition Wizard. They always work.
 

My Computers

System One System Two

  • OS
    Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom built
    CPU
    AMD Ryzen 5 5600X
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB Corsair Vengeance LPX DDR4-3200
    Graphics Card(s)
    PowerColor Red Devil Radeon RX 6600XT with 8GB GDDR6
    Sound Card
    Realtek integrated
    Monitor(s) Displays
    Acer Nitro 24" RG241Y 144hz refresh rate
    Screen Resolution
    1920 X 1080
    Hard Drives
    Western Digital Black SN770 1 TB NVMe SSD
    Samsung 860 QVO 1 TB SATA SSD
    Seagate Barracuda 1 TB HDD
    PSU
    LEPA B650 650 watt
    Case
    Enermax Coenus
    Cooling
    Cooler Master Hyper T4 air
    Keyboard
    CM Storm Devastator
    Mouse
    E-Blue Cobra Jr.
    Internet Speed
    100mbs
    Browser
    Microsoft Edge Chromium
    Antivirus
    Microsoft Defender
    Other Info
    Optical Drives: LG DVD-RW and Pioneer BluRay/ DVD burner
  • Operating System
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus ROG Zephyrus G14
    CPU
    AMD Ryzen 9 6900HS
    Motherboard
    Asus board (GA402RK)
    Memory
    16 GB Samsung DDR5-4800
    Graphics card(s)
    Integrated Radeon 680M and discrete Radeon RX 6800S with 8GB GDDR6
    Sound Card
    Integrated Realtek with Dolby Atmos
    Monitor(s) Displays
    Laptop screen 14" WQXGA, IPS, 120hz refresh rate
    Screen Resolution
    2560 X 1600
    Hard Drives
    1TB PCIe Gen 4 SSD (WD Black SN850)
    PSU
    Battery power and Asus power brick/adapter. Also has USB-C charging
    Case
    Laptop
    Cooling
    Laptop fans in vapor chamber
    Mouse
    Touchpad and Omoton bluetooth mouse
    Keyboard
    Built in RGB backlit
    Internet Speed
    100mbps
    Browser
    Edge Chromium
    Antivirus
    Microsoft Defender
I've been experiencing an odd problem with Diskpart lately, wondering if anyone else is seeing this. It's really easy to reproduce.

Steps to Reproduce
==================
Plug in a thumb drive
Run diskpart
Within diskpart run the following commands (in my example, my thumb drive is disk 2). Be careful as this will erase the selected drive!:

list disk
select disk 2
clean

DiskPart has encountered an error: A device which does not exist was specified.
See the System Event Log for more information.

DISKPART>

If I look in event viewer, I see this message:

Cannot zero sectors on disk \\?\PhysicalDrive2. Error code: 1B1@0101000F


More Information
================
First, note that the above error happens ONLY if the thumb drive is configured for MBR. It will NEVER happen when it is GPT.

Second, my initial workaround was to simply issue the "clean" command again. Probably about 90% of the time, a second run of the command will work. However, I have had times in a batch file where it does not succeed, maybe due to the short time between the two commands. I have a program as well as several batch files that have a need for this to be rock stable.

I have a new workaround that seems to be working 100% for me, but it's stupid that I need to even employ such a workaround.

The new workaround is like this:

list disk
select disk 2
clean
convert gpt
clean
convert gpt
clean
convert mbr

The idea of the above series of commands is to try and perform a clean 3 times. Since we know that it never fails when GPT is used, after each clean we do a "convert gpt". By doing so, if we had a successful clean operation, we can guarantee that the next clean will not fail because we are now in GPT mode. Now, we are in a known good state, so we can do a final "convert mbr" successfully. The end result is a successfully cleaned disk using MBR.

I only just converted a system back to windows 10 so I have not been able to test to see if this happens on Windows 10. I plan to try it this evening. However, it's happening frequently on my Win 11 machines. Note that all my Win 11 machines are on the latest Feb 2022 Windows patches.

Has anyone else been noticing this? I can't swear how long this happening, but I became very aware of it in the last few weeks, definitely before the Feb patches rolled out.
I registered into this forum just to thank you, your method was the only one who solved my flash drive problem. It started I guess when I formated for a different purpose one ubuntu, then windows would recognize it as RAW, as had multiple issues
 

My Computer

System One

  • OS
    Windows 11 22H2, Ubuntu 23.10
    Computer type
    Laptop
    Manufacturer/Model
    Dell G5 5590
Is 'clean all' perhaps better (lower probability of failures) than 'clean' because of the zeroing out all data? Besides it being more secure, although it takes longer.
 

My Computer

System One

  • OS
    Windows 10 Pro
I just use Minitool or EaseUS to delete/format drives.
I know, I'm a barbarian. :D



Here's me, warming up my disk cleaning tool...


image1.png
 

My Computers

System One System Two

  • OS
    Win 11 Home ♦♦♦22631.3447 ♦♦♦♦♦♦♦23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® [May 2020]
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    Asus Pro WS X570-ACE (BIOS 4702)
    Memory
    G.Skill (F4-3200C14D-16GTZKW)
    Graphics Card(s)
    EVGA RTX 2070 (08G-P4-2171-KR)
    Sound Card
    Realtek ALC1220P / ALC S1220A
    Monitor(s) Displays
    Dell U3011 30"
    Screen Resolution
    2560 x 1600
    Hard Drives
    2x Samsung 860 EVO 500GB,
    WD 4TB Black FZBX - SATA III,
    WD 8TB Black FZBX - SATA III,
    DRW-24B1ST CD/DVD Burner
    PSU
    PC Power & Cooling 750W Quad EPS12V
    Case
    Cooler Master ATCS 840 Tower
    Cooling
    CM Hyper 212 EVO (push/pull)
    Keyboard
    Ducky DK9008 Shine II Blue LED
    Mouse
    Logitech Optical M-100
    Internet Speed
    300/300
    Browser
    Firefox (latest)
    Antivirus
    Bitdefender Internet Security
    Other Info
    Speakers: Klipsch Pro Media 2.1
  • Operating System
    Windows XP Pro 32bit w/SP3
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® (not in use)
    CPU
    AMD Athlon 64 X2 5000+ (OC'd @ 3.2Ghz)
    Motherboard
    ASUS M2N32-SLI Deluxe Wireless Edition
    Memory
    TWIN2X2048-6400C4DHX (2 x 1GB, DDR2 800)
    Graphics card(s)
    EVGA 256-P2-N758-TR GeForce 8600GT SSC
    Sound Card
    Onboard
    Monitor(s) Displays
    ViewSonic G90FB Black 19" Professional (CRT)
    Screen Resolution
    up to 2048 x 1536
    Hard Drives
    WD 36GB 10,000rpm Raptor SATA
    Seagate 80GB 7200rpm SATA
    Lite-On LTR-52246S CD/RW
    Lite-On LH-18A1P CD/DVD Burner
    PSU
    PC Power & Cooling Silencer 750 Quad EPS12V
    Case
    Generic Beige case, 80mm fans
    Cooling
    ZALMAN 9500A 92mm CPU Cooler
    Mouse
    Logitech Optical M-BT96a
    Keyboard
    Logitech Classic Keybooard 200
    Internet Speed
    300/300
    Browser
    Firefox 3.x ??
    Antivirus
    Symantec (Norton)
    Other Info
    Still assembled, still runs. Haven't turned it on for 13 years?
I found that I always have to pull out the USB stick and reinsert it, once, everytime, before clean all/clean succeeds.

I have been wondering if it's related to that reported B550 chipset USB bug.

Code:
clean all
normally takes minutes. If it looks like it finished so fast, then there's 99 percent an error in the event log about failing to zero the disk.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro x64 23H2
    Computer type
    PC/Desktop
    CPU
    Ryzen 9 5900X
    Motherboard
    ASRock B550 PG Velocita (UEFI-BIOS P3.40)
    Memory
    32 GB G.Skill F4-3200C16D-32GVR
    Graphics Card(s)
    Sapphire Nitro+ Radeon RX 6750 XT
    Monitor(s) Displays
    Alienware AW3423DWF OLED ultrawide
    Hard Drives
    Western Digital Black SN850 1 TB NVMe SSD
    PSU
    eVGA Supernova 750 G3
    Case
    Corsair 275R
    Internet Speed
    VTel FTTH 1 Gb down and 1 Gb up
  • Computer type
    PC/Desktop
    CPU
    Ryzen 7 5800X3D
    Motherboard
    Asus ROG Strix B550-F Gaming (UEFI-BIOS version 3405, which fixes " LogoFail" bug according to Asus)
    Memory
    16 GB
    Graphics card(s)
    Sparkle Titan Arc A770 16 GB
    Hard Drives
    Samsung 970 Pro 512 GB NVMe SSD
    PSU
    eVGA Supernova 650 GQ
    Case
    Fractal Focus G
Worked okay for me.

1707284314185.png

1707284396228.png
 

My Computers

System One System Two

  • OS
    Win 11 Pro 23H2 22631.3447
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Intel® Core™ i7-12700F
    Motherboard
    ASUS TUF GAMING Z690-PLUS WIFI
    Memory
    G.SKILL Ripjaws S5 Series 64GB (2 x 32GB) DDR5
    Graphics Card(s)
    EVGA GeForce RTX 3050 XC Black Gaming
    Sound Card
    Sound Blaster AE-5 Plus
    Monitor(s) Displays
    ASUS TUF Gaming 27" 2K HDR Gaming
    Screen Resolution
    2560 x 1440
    Hard Drives
    Samsung 990 Pro 1TB NVMe (Win 11)
    SK hynix P41 500GB NVMe (Win 10)
    SK hynix P41 2TB NVMe (x3)
    Crucial P3 Plus 4TB
    PSU
    Corsair RM850x Shift
    Case
    Antec Dark Phantom DP502 FLUX
    Cooling
    Noctua NH-U12A chromax.black + 7 Phantek T-30's
    Keyboard
    Logitech MK 320
    Mouse
    Razer Basilisk V3
    Internet Speed
    350Mbs
    Browser
    Firefox
    Antivirus
    Winows Security
    Other Info
    Windows 10 22H2 19045.4291
    On System One
  • Operating System
    Win 11 Pro 23H2 22631.3447
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Intel Core i7-11700F
    Motherboard
    Asus TUF Gaming Z590 Plus WiFi
    Memory
    64 GB DDR4
    Graphics card(s)
    EVGA RTX 2060 KO Ultra Gaming
    Sound Card
    SoundBlaster X-Fi Titanium
    Monitor(s) Displays
    Samsung F27T350
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 980 Pro 1TB
    Samsung 970 EVO Plus 2TB
    Samsung 870 EVO 500GB SSD
    PSU
    Corsair HX750
    Case
    Cougar MX330-G Window
    Cooling
    Hyper 212 EVO
    Internet Speed
    350Mbps
    Browser
    Firefox
    Antivirus
    Windows Security
Back
Top Bottom