Skip to content

Instantly share code, notes, and snippets.

@rnagarajanmca
Created September 20, 2017 11:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnagarajanmca/3ec531dd33ad59c9bba3bdcdf93fb4c5 to your computer and use it in GitHub Desktop.
Save rnagarajanmca/3ec531dd33ad59c9bba3bdcdf93fb4c5 to your computer and use it in GitHub Desktop.
Format SD card for Raspberry pi using Windows CMD

Formatting SD card using diskpart


Insert the SD card into an card reader and plug it to the PC.

  • Open a Windows command prompt console and start Diskpart by typing following command.

    \>diskpart

  • List all of your disks.

    DISKPART> list disk

  • Select your SD card disk.

    DISKPART> select disk <#>

  • List all of your disks to ensure that the correct disk is selected – the selected disk will have an asterisk next to it.

    DISKPART> list disk

  • Clean the disk.

    DISKPART> clean

  • Create a primary partition.

    DISKPART> create partition primary

  • Create and format the primary filesystem.

    DISKPART> format fs=fat32 quick

  • Assign the disk to a Windowsdrive letter so it shows up in Windows Explorer.

    DISKPART> assign

You can use this SD card to load Raspbian .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment