1

I have have 32GB SD card Cloned Image of Raspberry PI, I want to make it small size as Flashing back to another SD card takes more time using DD command, I need a small size image so that i can place it in 64GB server Raspberry pi booted through network and flash the image to Client SD card, please guide on how to convert the Cloned Image to small size and flash using DD command

7
  • Does this answer your question? How to Backup/Shrink the image of my working Raspbian SD Card
    – Milliways
    Aug 12, 2023 at 7:15
  • Are you ACTUALLY using berryboot?
    – Milliways
    Aug 12, 2023 at 7:15
  • i have used the truncate command. Following steps got from ChatGPT app: 1. Open a terminal on your Linux system. 2. Identify the path and filename of your 32GB SD card cloned image. Let's assume the path is /path/to/original_image.img.3. Determine the desired size for the new, smaller image.
    – abhi
    Aug 14, 2023 at 10:03
  • For example, if you want to reduce it to 16GB, calculate the size in bytes: 16GB * 1024MB/GB * 1024KB/MB * 1024B/KB = 17179869184 bytes.4. Run the truncate command to shrink the image. Replace /path/to/original_image.img with the path to your original image file, and 17179869184 with the desired size in bytes: shell truncate --size=17179869184 /path/to/original_image.img
    – abhi
    Aug 14, 2023 at 10:03
  • With the truncate i am able cut unused space so 32GB - 5 GB(OS Apace) = 27GB unused space i have removed, now i converted from 32gb to 5gb...when i did recompressed using 7z its became 1gb, is there any further operation to convert 1gb to 100 or 200mb?
    – abhi
    Aug 14, 2023 at 10:07

1 Answer 1

0

One solution is to install image-utils on your RPi, and make a backup image file (*.img). The .img file takes only a few minutes to create, and can easily be used to create clones of your system to an SD card. Ref this other answer for details.

2
  • Thanks for the response Seamus, i have not got proper download link for image-utils , below is my compression methods 1 ) i did truncate of 32 GB SD card Clone to 5GB 2 ) converted 5GB to 1GB using 7zip and i tried tar, zip, xd, iso but i got Approx1GB , even if i try recompress of already compress is 1GB, i expect around 400MB
    – abhi
    Aug 17, 2023 at 7:49
  • @abhi: Downloads for image-utils: 1) from the RPi forum page, 2) from GitHub
    – Seamus
    Aug 17, 2023 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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