0

I have a Raspberry Pi distribution on a bootable 32 GB SD card. What I would like to do, is the following:

  1. Shrink the partition to 4 GB (that's the size of the data on the card).

  2. Create an .img file from that SD card, so I can use it to create other bootable SD cards

Any ideas? A newbie here.

  • Look for piclone – Jaromanda X Jun 27 '19 at 22:54
  • you adked a question that has a yes/no answer – jsotola Jun 28 '19 at 0:27
0

There are some possibilities to shrink a partition but you may consider to create a complete new image file and copy your old installation to it. This way you are free to configure your new image as you like. You can modify the size of all partitions so just make the root partition 4 GB before copying.

If you have made the image file you can just flash it to SD Cards as usual.

Look at How to make an image file from scratch.

| improve this answer | |
1

This question, or variants, has been asked dozens of times on this site.

Basically, what you ask is not possible. (Actually it can be done, but requires a Linux computer and some expertise.)

If you want to create a backup image just compress it.

If you want to copy to a smaller SD Card use the SD Card Copier in Raspbian, or the piclone command line option.

See https://raspberrypi.stackexchange.com/a/93316/8697

| improve this answer | |
0

I suggest to use pishrink. This will shrink the partition to it's minimum, reduce the image size and create a minimal image.

| improve this answer | |
0

A little late to the gate, but anyway. I have had real good success in creating a backup image for my Pi using USB Image Tool 1.70, and then using balenaEtcher to burn the image to another SD Card. The reason I dont use the USB Image Tool to write the image is because in Win10 anyway, that wont work with the software. I cant run WinImage on Win10, so this way works well for me. 1.8 is here, I havent tried it yet: https://www.techspot.com/downloads/6355-usb-image-tool.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.