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
1 Answer
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.
-
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– abhiCommented Aug 17, 2023 at 7:49
-
@abhi: Downloads for
image-utils
: 1) from the RPi forum page, 2) from GitHub– SeamusCommented Aug 17, 2023 at 7:55
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.truncate
command to shrink the image. Replace/path/to/original_image.img
with the path to your original image file, and17179869184
with the desired size in bytes: shell truncate --size=17179869184 /path/to/original_image.img