zaman360live

Partition CMD By SHAMSUZZAMAN

Dec 27th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.42 KB | None | 0 0
  1. Steps
  2. 1. Insert a usb drive at least 4gb in size
  3. 2. Open a command prompt as administrator
  4. Hit Windows Key, type cmd and hit Ctrl+Shift+Enter. This will force it to open as admin.
  5.  
  6. 3. Run diskpart
  7. This will open and run the Diskpart command line utility, which allows you to manage disks, partitions and volumes.
  8.  
  9. C:\Windows\system32> diskpart
  10.  
  11. 4. Run list disk
  12. This will list all disks on your system. You’ll see the something similar to this:
  13.  
  14. DISKPART> list disk
  15.  
  16.   Disk ###  Status         Size     Free     Dyn  Gpt
  17.   --------  -------------  -------  -------  ---  ---
  18.   Disk 0    Online          238 GB      0 B
  19.   Disk 1    Online          465 GB      0 B
  20.   Disk 2    Online           29 GB      0 B
  21. 5. Select your flash drive by running select disk #
  22. Find the item that corresponds with your flash drive and select the disk. In the example above, my flash drive is disk 2 so I’ll run:
  23.  
  24. DISKPART> select disk 2
  25.  
  26. Disk 2 is now the selected disk.
  27. 6. Run clean
  28. WARNING: This deletes all data on your drive
  29. The clean command marks all data on the drive as deleted and therefore removes all partitions and volumes. Make sure you want to do this! If you are sure, run:
  30.  
  31. DISKPART> clean
  32. 7. Create a partition
  33.  DISKPART> create partition primary
  34. 8. Select the new partition
  35. Since we know there is only one partition, we can just run this:
  36.  
  37. DISKPART> select partition 1
  38. Without checking the partition number. If you’re really curious, run list partition to check.
  39.  
  40. 9. Format the partition
  41. To format it, we’ll use the NTFS file system and run a quick format:
  42.  
  43. DISKPART> format fs=ntfs quick
  44. 10. Set the current partition as Active
  45. Run:
  46.  
  47. DISKPART> active
  48. 11. Exit diskpart
  49. Run exit. This will exit diskpart, but leave the command window open.
  50.  
  51. 12. Mount your ISO
  52. Use Virtual CloneDrive or similar.
  53.  
  54. 13. Navigate to the mounted image and install a bootsector
  55. My ISO is mounted as G:\, so I’ll navigate to  G:\boot and run:
  56.  
  57. C:Windowssystem32> G:
  58. G:\> cd boot
  59. G:\boot> bootsect.exe /nt60 E:
  60. Where E:\ in this case is my flash drive’s letter.
  61.  
  62. 14. Copy the entire contents of the ISO to your flash drive
  63. You can either do this from Windows using Ctrl+C+Ctrl+V, or from the command line using xcopy.
  64.  
  65. G:\> xcopy g:\*.* e:\ /E /H /F
  66. /E copies all subfolders, /H copies all hidden files and /F displays all source and destination file names as it’s copying.
  67.  
  68. Once that’s done, go and install Windows!
Add Comment
Please, Sign In to add comment