How to recover the Unallocated space on Your SD card due to Raspberry Pi OS

When you install Raspberry Pi OS Image onto your SD card, it allocates the storage as per its requirement on the card and leaves the rest of the memory unallocated. So when you want to use the card for normal storage purposes, it shows storage capacity much less than the actual value, because major part of the SD card is unallocated memory. It happened to me when i loaded the Raspbian Wheezy onto my 16 GB SD card and ran it successfully but when i formatted my card to use it for normal storage for my Camera. It was showing memory capacity as 56 MB instead of regular 14.8 GB. If you encounter same sort of problem, no need to worry, here is a quick solution.

To get your memory back as normal storage do the following steps in Windows7.

  1. Press Windows-R and type DiskPart in the ‘Open’ box.
  2. This will bring up a DOS box with DiskPart running in it.
  3. Type ‘list disk’ and look for the disk that resembles your SD card. (For this tutorial, we’ll assume it’s Disk 1)
  4. Type ‘select disk 1′
  5. BE REALLY SURE YOU WANT TO WIPE THE CARD.
  6. Type ‘clean’. This resets the disk.
  7. Type ‘create partition primary’
  8. Type ‘exit’ to quit.

About author

Devesh Samaiya

Chief Tinkerer at Lonely Night Projects

30 Comments

  1. kurt meir March 2, 2013 at 6:21 pm

    Hi thanks for the tip. Unfortunately it doesn’t work under windows xp.
    Will have to find an other solution….

  2. Haris May 3, 2013 at 7:36 am

    Very helpful article, i thought that my SD Card has been damaged! thank you

  3. Alvaro June 14, 2013 at 11:08 pm

    Hello!

    I have this problem, and this is the seventh thread I read without solving it!

    I tried SD Formatting Tool, Windows Manager, DiskPart… but still 56MB is the maximun I can “see”…

    Maybe it’s worth buying another SD card :(

    Thank you in advance for any other suggestions!

  4. Sergio Soares June 28, 2013 at 10:40 pm

    Thank you very much!

    It solved my problem.

    Regards,

    Sergio Soares (Brazil).

  5. chris July 14, 2013 at 10:25 am

    This is still just giving me my original 56mb from my sd card. Whats the trick to get the whole 8gb card bacl??

  6. Ewan September 23, 2013 at 10:00 am

    Hi Alvaro and chris,

    Go it working :D

    I’ve hunted for a fix before, tried all the other pages as well. Pretty frustrating!

    The trick I found was to:

    Use DISKPART as suggested BUT, run it twice, heck run it three times, but DONT run the cmd line ‘create partition primary’. Just type Exit. Then do all steps again. and again. until ‘List Disk’ shows the correct size of your SD card.

    Hopefully this helps others as I have been in this situation before ages ago and it 2has taken me another 15mins to figure out haha

    Good luck!

    Ewan

  7. David November 1, 2013 at 11:54 am

    This worked for me. Thanks!

  8. Anusuya November 30, 2013 at 9:28 pm

    Thank you for this article. Bless you. I thought I had turned my sd card into a bookmark. Followed you instruction and now I have recovered my space.

  9. Jose-Maria December 21, 2013 at 7:44 am

    Great, thank you worked perfectly!!!

  10. jones December 26, 2013 at 6:31 pm

    This solved my problem! Thanks!

    Running W7 on my laptop, and it worked flawlessly!

  11. Miguel December 28, 2013 at 1:47 pm

    Thank you!
    A lot more helpful than Windows Help.
    Fixed the problem with a few simple steps.

  12. RV January 22, 2014 at 5:10 pm

    I’ve tried this, and i’ve tried doing it a few times as suggested in a comment but still not working :s

  13. Kory February 16, 2014 at 10:07 pm

    The only thing that worked for me was following the directions above and then removing the SD card and then reinserting the card back into the computer. Now it shows the full size.

  14. kevin February 22, 2014 at 12:00 pm

    great post

  15. Sarath V April 6, 2014 at 3:58 pm

    Thanks a lot, this article helped me in the right time!

  16. Sampath April 29, 2014 at 7:51 am

    Hello,

    I tried to all the steps but i am getting this error
    “Diskpart has encountered an error: data error(cyclic redundancy check).see the system event log for more information.”

    Plz help me

    Thankyou.

  17. Banzee Simmons May 16, 2014 at 6:22 am

    I have been using Windows since a while now and I was actually not aware about this utility.. If I would have known it earlier then I could have actually saved a lot of money that I spent of Photo Recovery Software.. I have tried different softwares and currently I am using Stellar Phoenix which was working good.. but this looks like a better solution.. Thanks a lot buddy..!!

  18. Troy May 21, 2014 at 11:42 pm

    Thank you soo much for this article! I bought a bunch of class 10 16 gb sd cards and they showed up as 1 gb, I thought I got scammed.

  19. Andrew May 23, 2014 at 12:03 pm

    I’ve spend 10 hours to figure out the problem and thanks for this post.
    Diskpart is works for me when not use Create Partition Primary.

    Thank you.

    I’ve tried SDFormater, HP USB disk format tool, BootIce and other software without any luck.

  20. nate July 22, 2014 at 6:15 pm

    thanks! if i had linux installed it would’ve been cake but i am a bit shaky on dos commands

  21. KpT, November 5, 2014 at 2:56 pm

    Thank you !

    Saved my day

  22. st1114g November 7, 2014 at 2:52 am

    Thank you!!! Simple solution and clear tutorial!

  23. ravi November 23, 2014 at 3:13 am

    very useful & much needed information for all the users of Raspberry PI.

    Thanks

  24. ninjaneer November 24, 2014 at 9:33 pm

    this solved my problem as well

  25. sabs546 December 5, 2014 at 9:01 pm

    oh you type in “select” disk 2
    no wonder

  26. ia December 7, 2014 at 10:40 am

    what if the unallocated space is 7.5 gb and my sd card is 8gb? what should i do? p

  27. Tim January 9, 2015 at 9:28 pm

    Thanks! This has been bothering me for weeks and I couldn’t come up with a solution. Perfect! A simple web search and a few DOS commands POOF, I have my 16GBs! Thanks!

  28. KodG April 14, 2015 at 2:28 am

    “AOMEI Partition Assistant” was the only program that worked for me 100%. Now I only use this one for almost everything related to SD cards.

  29. Augustine Fernandes August 4, 2015 at 8:43 pm

    Worked Great for me

    Thanks

Leave a reply

Your email address will not be published. Required fields are marked *

+ 45 = 51