Skip to content

aristosv/sdshrink

Repository files navigation

sdshrink

How to shrink a Raspbian SD card

Software needed:

  1. Insert the SD card in your computer, open PARAGON Partition Manager Free and select "Partition Manager"

alt text

  1. Select the right edge of your SD card, and drag it all the way to the left.

alt text

  1. A popup will show you the minimum size you can shrink the SD.

alt text

  1. Modify that number so you add some free space to the partition and click "OK"

alt text

  1. Click "Apply" and then "Yes"

alt text

  1. This will take a few minutes depending on the size of the SD.

alt text

  1. You will be notified when the process is finished.

alt text

  1. This is exactly how you want the SD to be. Shrunk down with some free space. The rest of the SD is unallocated.

alt text

  1. Open Win32 Disk Imager and create an image of the SD. Its size will be the full size of your SD (eg. 16GB)

alt text

  1. Run "gdisk64.exe -l big_image.img" and write down the "End" sector of the "Linux filesystem" partition.

alt text

  1. Run "ddrelease64.exe --progress if="big_image.img" of="small_image.img" bs=512 count=3665919".

alt text

  1. Notice the size difference after shrinking the image.

alt text

There you go! :)