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

The above command doesn’t display any progress details and it might take 10–20 minutes to finish.

Other OS

Step 2: Shrink Image

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

Step 3: Test your Shrunk image

--

--

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