Creating and Shrinking Raspberry Pi Image using SD Card

Learn how to create a copy of the Rasberry Pi from an SD card and shrink it

Photo by Harrison Broadbent on Unsplash

Step 1: Create a img using the SD card


diskutil list
SD card
sudo dd if=/dev/disk7 of=/Users/vivekmaskara/Downloads/Rpi.img

Other OS

Step 2: Shrink Image


Shrinking image using PiShrink

docker run --privileged=true --rm \
--volume $(pwd):/workdir \
mgomesborges/pishrink \
pishrink -pZv GramsRpi.img GramsRpiShrinked.img
PiShrink output

Step 3: Test your Shrunk image



All my stories have moved to

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store