Tech Support Guy banner

How do I use Diskpart/Diskcleanup in CMD?

783 Views 20 Replies 3 Participants Last post by  peterh40
Hello everyone I'm new here. So recently my windows 10 got corrupted because I changed something in the Regedit in my AMD GPU and I shutdown my PC while chkdsk is running at stage 5 (I was stuck for 3 hours in chkdsk, my fault I know) , then when I turn on my PC after the bios splash screen it turns black so that means my windows is dead. Now I am trying to install windows again in my hard drive using diskpart in cmd. My question is if I use diskpart to format my SSD (currently has my windows 10) will it reset REGEDIT and install windows?
Status
Not open for further replies.
1 - 20 of 21 Posts
My question is if I use diskpart to format my SSD (currently has my windows 10) will it reset REGEDIT and install windows?
Using DISKPART will format your drive which means everything will be lost (including registry changes), however this might not fix your problem with partial run of CHKDSK.

Here is how to proceed to resolve problem:

1. Boot from Windows installation media
2. Select language and keyboard layout and click "next"
3. Click on "Repair my computer" link
4. Click on "Troubleshoot"
5. Click on "Command prompt"
6. Run following commands
Code:
DISKPART
lis vol
7. This will show you partitions, your job is to identify each partition of problem disk
When you do so note the volume letter exit diskpart and run CHKDSK to fix it (in this case C:\)
Code:
exit
CHKDSK c: /rx
When the command is finished you can reboot and your old system should be able to boot.
If it doesn't boot you can follow steps 1-4 again but this time choose "Startup repair"

Otherwise if you want to continue by wiping out data on disk, you can recreate partition table, format disk clean and perform clean Windows installation.
See less See more
7. This will show you partitions, your job is to identify each partition of problem disk
When you do so note the volume letter exit diskpart and run CHKDSK to fix it (in this case C:\)
Btw I changed my bios to 1st boot my HDD because my SSD has the Windows. Volume 0 is my Storage while Volume 1 is my SSD.
What should I do next?
you need to identify volume letter not volume number.
What volume letter is SSD assigned?
Computer Personal computer Font Display device Laptop

Oh I forgot to send the picture. The volume letter of my SSD is D.
See less See more
Therefore your command according to this screenshot is:

Code:
exit
CHKDSK d: /rx
exit is needed to exit DISKPART context

Btw I changed my bios to 1st boot my HDD because my SSD has the Windows
To boot from SSD once it was repaired you'll have to revert changes in BIOS to boot from Windows installed on SSD.
Code:
exit
CHKDSK d: /rx
you mean? chkdsk d: /r /x

It says to me: chkdsk d: /rx
invalid parameter
you mean? chkdsk d: /r /x
Does that work?
Does that work?
Haven't tried it yet. Was waiting for your response I thought you know haha.;)
  • Like
Reactions: 1
Ah OK, thats fine, both commands should work.
the /rx version worked fine for me in virtual OS, but I'm too lazy to test again :p
therefore your issue is not disk problem but system boot.

See my initial post on how to troubleshoot startup problems.
Lmao sorry for being too slow. I still haven't found your "Troubleshoot startup problem" post. Can you please provide a link? Thanks a lot :LOL:
No problem hehe.
I still haven't found your "Troubleshoot startup problem" post
Here is relevant quote:
you can follow steps 1-4 again but this time choose "Startup repair"
EDIT:
Btw. the link is here:
#2 (techguy.org)
Azure Font Aqua Operating system Electric blue

Yep I already have tried that before both booting HDD and SSD 1st. I don't know why it is blank on Log file :(
See less See more
If you don't care to lose all data on SSD you can simply reformat drive and reinstall system.

Otherwise see options below for additional recovery options:
Recovery options in Windows 10 (microsoft.com)

If none of these recovery options work and you want to recover your data from SSD you'll have to use command prompt.
Btw. I forgot to tell you, but I think you need to set SSD as primary boot in BIOS before doing startup repair.
it could be it failed because HDD was diagnosed instead of SSD!
Btw. I forgot to tell you, but I think you need to set SSD as primary boot in BIOS before doing startup repair.
it could be it failed because HDD was diagnosed instead of SSD!
Font Display device Electronic device Gadget Multimedia

Done, but still the same error before. So how should I format my SSD? Should I use CMD and Diskpart or the format option in the installation menu
See less See more
Should I use CMD and Diskpart or the format option in the installation menu
If you're sure you don't need to back up data on SSD, both methods will do the trick.
The difference is that using diskpart you can clean drive more thoroughly AND perform slow format which will mark bad sectors.
Using format option in installation menu will only format, but if there is any problem with disk then it will remain to be a possible problem with new installation of windows.
  • Like
Reactions: 1
Thank you bro just fixed my PC now and currently installing drivers. I couldn't do this without your help thanks a lot & Advance Merry Christmas! :love:
  • Like
Reactions: 1
1 - 20 of 21 Posts
Status
Not open for further replies.
Top