Tutorial: Using Pi Shrink to shrink images

Setup and Modification Tutorials and guides
Post Reply
Haggis
Reactions:
Posts: 132
Joined: Sun Dec 11, 2016 8:52 pm

Tutorial: Using Pi Shrink to shrink images

Post by Haggis » Sun Dec 11, 2016 9:18 pm

Ok so you want to add an image to your SD card but it complains its not got enough space

Pi Shrink is a great utility to shrink the image and remove the free space thats nots being used, this allows you to put the image on your SD card and then you can expand the file system to use all the space again.

So whats needed....

1. Image of your choice
2. Pi Shrink

You can download Pi Shrink from: https://github.com/Drewsif/PiShrink

Put both files in the same Directory just for easiness

So as you can see i have

game-gear.img
pishrink.sh

Image

as you can see the pishrink.sh is not executable yet, you can tell this by the permissions

Code: Select all

-rw-rw-rw- 1 haggis haggis        4153 Nov  1 23:17 pishrink.sh
executable should look like this

Code: Select all

-rwxrwxrwx 1 haggis haggis        4153 Nov  1 23:17 pishrink.sh
This makes it executable for everyone

to do this do

Code: Select all

sudo chmod +x pishrink.sh
So doing an 'ls' now the output looks like this

Image

now you can run the pisrhink command

Code: Select all

sudo ./pishrink.sh game-gear.img
Pi Shrink will now do its thing and remove the space it can to shrink the image down

Image

So as you can see now its done that it reduced this image from 60Gb to 6.2Gb (this is due to this image having no roms)

Enjoy!

Haggis
Reactions:
Posts: 132
Joined: Sun Dec 11, 2016 8:52 pm

Re: Tutorial: Using Pi Shrink to shrink images

Post by Haggis » Sun Feb 18, 2018 7:57 am

Thats just terminal in Linux

Haggis
Reactions:
Posts: 132
Joined: Sun Dec 11, 2016 8:52 pm

Re: Tutorial: Using Pi Shrink to shrink images

Post by Haggis » Thu Apr 26, 2018 12:33 pm

G22 wrote:
Mon Apr 23, 2018 6:46 pm
- Blanked
@G22 I have blanked your comment as it is rubbish, pishrnk will work with any img file at all, retropie, recalbox, linux, raspbian etc

Please make sure your info is correct

Post Reply