Question how to use diskpart to clean old SSD with windows installed

k1dfue

Prominent
Sep 4, 2022
17
0
520
i upgraded my old sandisk 240gb ssd to a 480gb kingston MVNE

the way i installed windows on my mvne is using rufus on a bootable usb
i did not clone the ssd as i needed a clean install

as attached pics i tried to use diskpart to clean the old ssd but it wont let me saying it contains current boot, system, page file etc.

disk 1 is the mvne and disk 0 is the old ssd



 
Solution
your boot drive is still the old 250gb drive, you would have been better off installing windows without that drive attached.

System partition = EFI = boot partition.

windows does that if it sees a boot partition, it just adds itself rather than make a new one. If nvme only drive attached, it can't do this. Also makes it easier to wipe after fact.

there are ways to create it on C but its easier to just reinstall without ssd attached, then attach it and then run diskpart clear
your boot drive is still the old 250gb drive, you would have been better off installing windows without that drive attached.

System partition = EFI = boot partition.

windows does that if it sees a boot partition, it just adds itself rather than make a new one. If nvme only drive attached, it can't do this. Also makes it easier to wipe after fact.

there are ways to create it on C but its easier to just reinstall without ssd attached, then attach it and then run diskpart clear
 
Solution
your boot drive is still the old 250gb drive, you would have been better off installing windows without that drive attached.

System partition = EFI = boot partition.

windows does that if it sees a boot partition, it just adds itself rather than make a new one. If nvme only drive attached, it can't do this. Also makes it easier to wipe after fact.

there are ways to create it on C but its easier to just reinstall without ssd attached, then attach it and then run diskpart clear
i see, is it tricky to move the efi and recovery partition to the new disk?
 
You need to resize C to give the drive space to create the 2 partitions in.

this shows how to move recovery partition - https://superuser.com/questions/1453790/how-to-move-the-recovery-partition-on-windows-10

this shows how to create an efi:
Step 1. Boot your PC with Windows installation media. Then, press "Shift + f10" on the first screen to launch the Command Prompt.

Step 2. Run the following commands and click enter at the end:

  • Diskpart
  • List disk
  • Select disk
  • List partition
  • Create partition efi
  • Format quick fs=fat32
  • List partition
  • List volume (i.e. the volume letter where the Windows OS is installed)
  • Exit
  • bcdboot X:/windows (Replace "X" with the Volume letter of the Windows OS partition).
Step 3. Now, you can remove the Windows installation media and restart your PC.

if you have any data on the drives now, I would back it up before starting.
 
  • Like
Reactions: k1dfue
i see, is it tricky to move the efi and recovery partition to the new disk?
Quite easy.
Execute following from elevated command prompt. Regular command prompt will give error on last step.
If you get any errors, then stop immediately and show screenshot with command output.
diskpart
list disk
select disk 1
(select 465GB disk)
list partition
select partition x
(select 465GB partition, replace x with appropriate number, x=1 or x=2)
shrink desired=500
create partition efi
format fs=fat32 quick
assign letter=H
exit
bcdboot c:\windows /s H:
Boot into BIOS and change boot priority to Windows Boot Manager on 500GB drive.

And don't worry about recovery partition. It will be recreated automatically after next major windows update.