indospot

CreatePartitions

Sep 24th, 2025
10,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | Software | 0 0
  1. rem == CreatePartitions-UEFI.txt ==
  2. rem == These commands are used with DiskPart to
  3. rem create four partitions
  4. rem for a UEFI/GPT-based PC.
  5. rem Adjust the partition sizes to fill the drive
  6. rem as necessary. ==
  7. select disk 0
  8. clean
  9. convert gpt
  10. rem == 1. System partition =========================
  11. create partition efi size=200
  12. rem ** NOTE: For Advanced Format 4Kn drives,
  13. rem change this value to size = 300 **
  14. format quick fs=fat32 label="System"
  15. assign letter="S"
  16. rem == 2. Microsoft Reserved (MSR) partition =======
  17. create partition msr size=16
  18. rem == 3. Windows partition ========================
  19. rem == a. Create the Windows partition ==========
  20. create partition primary
  21. rem == b. Create space for the recovery tools ===
  22. rem ** Update this size to match the size of
  23. rem the recovery tools (winre.wim)
  24. rem plus some free space.
  25. shrink minimum=1500
  26. rem == c. Prepare the Windows partition =========
  27. format quick fs=ntfs label="Windows"
  28. assign letter="W"
  29. rem === 4. Recovery partition ======================
  30. create partition primary
  31. format quick fs=ntfs label="Recovery"
  32. assign letter="R"
  33. set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
  34. gpt attributes=0x8000000000000001
  35. list volume
  36. exit
Advertisement
Add Comment
Please, Sign In to add comment