How to Shrink Raspberry Pi Images

This site contains affiliate links to products. We may receive a commission for purchases made through these links.

It is possible to shrink images on Raspberry Pi on the computer. Some of the images such as the Win32Diskimager will help shrink things but this is not always the case. There are some other things that may need to be done to reduce the size of the image and make it so that it can be used. A person may also be able to save their image on the USD card. It is possible to downgrade these images.

Basic Techniques

There are some ways to make documents and backups for the Raspberry Pi images and get them to fit into a specified size. These images can be compressed and will take up less space and may be able to be shrunk small enough to put them on the USD card or something even smaller. There are some things that may be needed to set up the system and help reduce the size.

The Raspberry Pi is needed and it can be used along with a Jessie Image that may have already been installed. There should also be a monitor, a mouse, a keyboard, and other things that can be related to the basic parts of the computer. A person may also need to have a USD or even a USB card reader with them to back up the files and images just in case something were to happen to the image.

For those that have other forms of equipment, there are External USB HDDs for the Raspberry Pi. These devices will have enough storage to back up any images and they can have their own label so a person will know what is located on each device.

How to Shrink Raspberry Pi Images

Needed Skills

While this may be a little technical to compress and shrink these images there are no special skills that are needed. A person does not have to be a technical wizard to figure out how to perform these functions. Some knowledge of the Linux system and the way it works is going to be helpful.

The process may take some time to complete so a person needs to learn how to be patient. They should be able to follow some basic instructions. All Linux connections should be carried out using the Raspberry Pi program.

Preparing the Raspberry Pi Software

Before any pictures can be compressed it is important to have the Raspberry Pi ready to go. A person will need to use the Linux commands to and make sure their software and images are set up.

If a person is using the Win32DeskImager, they will need to look at the picture and they will insert the USD card into the USB reader on the PC. A person will then enter c:/temp/ RaspberryPi/ BackUpServercompressed.img and click on the red button. This button should be in red. The software will then need to run and the image will be on the external disc.

Using Linux

The same process can be done using the Linux commands. A person will need to have the Raspberry Pi image ready to go. They will then put the USB external HDD into their Raspberry Pi. The terminal needs to be opened and the df-h command will be entered. A person will then see two pics and they will see something similar to media/pi. Appear. They will then have the image.

One image will be called boot and the other will have a long name with a mixture of numbers and letters. The Raspberry Pi card is then taken out using the command sudo umount/ dev/sdb1/ dev/sdb2 and a copy is made. This will also back up the image.


There are some things that may happen and a person may need to format their YSB stick and make it so that the image can fit on this. The Linux system has an NTFS drive but this is in a read-only format. A newer version of the NTFS is needed so that a person will be able to reboot and will be able to take in more information. To do this a person will need to look at the boot and where everything is stored.

Installing the Newer NTFS

To begin the process to check for the boot and the storage there are some things that a person will need to do. They will need to enter sudo fdisk-I/ media/ pi/ 1TBFreeCom/ MyImage.img. There will be different options for Start and a person will need to use the second partition which will be img2. The code for this will be 131027 and it can be found in the series of numbers.

A computer will then be allowed to run. Once this has finished a person will check the star button and things should be working. They may get a busy message at one time. They will then enter sudo losetup-d / dev/ loop0 and this should take care of the problem.


This will allow a person to continue the process of shrinking the image and they will be able to check it. A person will enter sudo gparted/dev/ loop0. A person will then select Partition 5. This will allow them to choose the Resize/,ove option. A person will move the slider to the left and they will be able to drag the slider so that the image can fit.

A person will then need to add a new size. They can even select a minimum size. They will then click the resize/ move option to finish the process. A person can then go to the Edit menu and select the apply all operations and then the apply button. If the resize has been completed, a person will get the message that all operations are successfully completed and they will have the image at the size that they want.

These are some things that a person should do when they are looking to back up and shrink the image that they have on the Raspberry Pi. This will allow a person to still have their images but they will be doing so on a smaller scale.

About The Author