Solved Diskpart Clean All Error

NeedHelp99

New member
Local time
6:28 PM
Messages
6
Hello, came here to post my problem if anyone is willing to help.

Due to a recent virus which I can't seem to get rid of, I'm going to do a clean install of windows 7 from an iso file with virtual clone drive. However, after researching a bit I found it would be best to first do a clean all command from diskpart to overwrite any infected code on my computer.

Also noticing that the clean all command cannot be done from windows itself, I booted up the iso into the install, Shift+F10 'ed my way into a command prompt and tried the command, but I seem to always get this error:

"clean all is not allowed on the disk containing the current boot, system, pagefile, crashdump, or hibernation volume."

Any ideas on what could be wrong?
 

My Computer

OS
Windows 7 32bit
Hello NeedHelp99, and welcome to Seven Forums.

While you are doing a clean install, you could also just click on the Drive options (advanced) link at that stage, and Delete the volume to wipe the drive. Afterwards, you should be able to install Windows 7 on the remaining single Disk.

See the screenshot under step 7 and 8 in the tutorial below for more on this.

Clean Install Windows 7

Hope this helps,
Shawn
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
^Thank you, I will try that. For clarification, does just deleting the data on the drive achieve the same thing as clean all when it wipes the drive with a set of zeroes? Or will the former be more than enough to fix anything code-wise due to the virus?
 

My Computer

OS
Windows 7 32bit
^Thank you, I will try that. For clarification, does just deleting the data on the drive achieve the same thing as clean all when it wipes the drive with a set of zeroes? Or will the former be more than enough to fix anything code-wise due to the virus?

It will only mark the partition as deleted, but it will be formatted automatically during the installation of Windows 7.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Any ideas on what could be wrong?
Yeah, you can't do a clean install of the OS you are currently running. Since you want to make sure all code is removed...I'm not sure why you'd want to start the install from within the infected OS. Would you change your car's oil while driving down the highway?

Burn the iso image to an actual disc (or better yet, use it to make a bootable flash drive) then use either media to do a clean install by booting to from the disc or flash drive. Then you'll be able to completely clear your hard drive and do a clean install.
 

My Computer

OS
Windows 7 Ultimate x64 SP1
CPU
Intel Core i7-2600
Motherboard
Gigabyte GA-P67A-UD3P-B3
Memory
12 GB Patriot Extreme DDR3-1333
Graphics Card(s)
Nvidia GTX 470
Monitor(s) Displays
Dell UltraSharp 2209WA
Hard Drives
OCZ Agility3 240 GB, WD5001AALS, WD7501AALS
PSU
OCZ ModStream 700W
Case
CoolerMaster HAF 912 Advanced
Cooling
CoolerMaster Hyper 212 Plus
^Thanks again for the help. I made the bootable flash drive on another computer, used that for the installation and did all of the clean all commands no problem.

However, I do now have another problem if you can help, and if this is suitable for the same thread.

On the second page of the installation, the "select a driver to be installed" page, I have no drivers listed. There's options to browse and rescan, so I downloaded and moved driver files(using ImgBurn) for my fujitsu model onto a CD from here: Ultimate Laptop Drivers, Laptop Reviews & Laptop Specs Resource – Laptopdrivers.net , and popped it in. Though, when I select that drive it still tells me there's no drive to install upon. I don't know if this involves a SATA driver or what.

I've seen posts mention that when they used a DVD to boot, they simply re-burned the ISO at a slower speed to solve this, but would the same process apply to the USB I used to boot the install?
Any help on this matter is greatly appreciated, and I apologize in advance for my lack of computer knowledge :o
 

My Computer

OS
Windows 7 32bit
Are you saying you have no drives listed on install screen, because you typed "drivers?"

It is unlikely Win7 installer is missing any SATA driver, but you can try to unzip the SATA controller driver from the Fujitsu Support Downloads webpage for your model, browse to it from Load Drivers until it picks it up. It should then show the HD.

If not, then make sure you have the latest BIOS version update for your model. If so, reset the CMOS: Clear CMOS - 3 Ways to Clear the CMOS - Reset BIOS

Next in BIOS setup check the SATA controller setting: try AHCI first, then IDE mode if necessary.

If you're flash stick installer succeeded at cleaning the HD then it should install, but writing it again may help. The method which always works for me is to install UltraISO trial version: on file tab Open ISO, on Boot tab Write Disk image, Format, Write.

Let us know how it goes.
 
Let me update. With no success on the Driver Install Screen, I went to BIOS to check on the above advice, however I see no options in any of the tabs regarding anything SATA, AHCI, or IDE.

Even more bad news, once I exited BIOS and restarted, I now get an error saying "BOOTMGR is missing" whenever I place my USB first in the boot order(To go back to Windows 7 install). I then booted to CD/DVD first and popped in a Windows 7 System Repair Disk. It couldn't repair anything with my current computer state, but the diagnostic did give me the Error Code 00410001, saying it could be a disk error.

Any idea how to get past this problem so I can get back to the install and see if it recognizes the SATA driver?
 

My Computer

OS
Windows 7 32bit
That Bootmgr missing means it is skipping the flash stick installer and trying to boot the wiped HD so make sure USB stick is set to boot first in BIOS setup before HD, all other HD's and peripherals are unplugged.

Next try booting it using one-time BIOS Boot menu key with HD set first to boot.

Since you have a DVD drive, suggest you burn ISO to DVD using ImgBurn at 4x speed to try that method. Where did you get ISO?

Did you reset the CMOS? Is your HD registering correctly in BIOS?
 
That Bootmgr missing means it is skipping the flash stick installer and trying to boot the wiped HD so make sure USB stick is set to boot first in BIOS setup before HD, all other HD's and peripherals are unplugged.

I have the USB first in BIOS, it still gives me the error.

Next try booting it using one-time BIOS Boot menu key with HD set first to boot.

I'm assuming that's the F12 option. The USB was first there too, I chose it but I still get the BOOTMGR error.

Since you have a DVD drive, suggest you burn ISO to DVD using ImgBurn at 4x speed to try that method. Where did you get ISO?

I think I will have to try that, though I will have to go get some DVD's. I got the ISO from my college's software website, from a VPN connection so I wouldn't think the file is corrupt in any way.

Did you reset the CMOS? Is your HD registering correctly in BIOS?

According to your past link, I can reset the CMOS by putting back BIOS to its default settings. I tried it, but obviously it resets everyting, including the boot order, back to factory settings, with the HD second after floppy. I've set it back to factory and only changed the boot order so USB was first, but it hasn't worked.
Also, my HD shows up fine in BIOS, along with one other drive, and they both are enabled.

Any other suggestions are greatly welcome. I will try the DVD method and see if it will let me boot.
 
Last edited:

My Computer

OS
Windows 7 32bit
It could well be skipping over the flash stick because it is faulty, which woudl also explain the install fail. So it's a good idea to cross-check with DVD install.

Check the ISO hash against official Hash here: Windows 7 RTM SHA-1 hash / checksums

Burn the DVD using ImgBurn at 4x speed with Verify so there's no question.

Good quality DVD's are 3 for $2 on photo rack at Walgreens.
 
SUCCESS!!! :D

I burned the iso to a DVD at 4x and it worked just fine, HD came up and everthing. The boot USB was definitely the problem.

Thank you very much for all the help, it was very accomodating!
 

My Computer

OS
Windows 7 32bit
Back
Top