Shrinking a Raspberry Pi Image
There are a whole bunch of posts out there on why you may want to shrink the size of the backup images you make of your Raspberry Pi SD card based installations. I list a couple at the end of this post - but while most of what is in these posts is good and applicable, I felt I found a simpler combination of steps for my purposes.
The difference in my case is the use of Virtualbox and the GParted Live CD. You see - a big advantage to having the entire Rpi system on an SD card, is that I can now put it in a USB card reader and make it available to GParted - running in Live CD mode in VirtualBox.
Essentially you can do the following:
The advice and information at some of the other sites on this topic still holds - so its good to go through them for knowledge:
The difference in my case is the use of Virtualbox and the GParted Live CD. You see - a big advantage to having the entire Rpi system on an SD card, is that I can now put it in a USB card reader and make it available to GParted - running in Live CD mode in VirtualBox.
Essentially you can do the following:
- Get the latest GParted 32-bit ISO (for greatest compatibility from here. While you're at it - be sure to show some appreciation for their great work if you can
- Create a Linux virtual machine in VirtualBox with no HDD and a CD ROM - setting it to the ISO you just downloaded
- Enable USB 2.0 at least so you can load the card reader into your VM
- Run VM - it should get you into the GParted graphical interface.
- Your USB based SD card partitions should be visible to GParted at this point
- Now you can simply resize your SD card partitions in the GUI - no calculations or messing around with other tools required!
- Once done simply shut down your VM - and on your SD card, you should have a Linux partition at the desired size
The advice and information at some of the other sites on this topic still holds - so its good to go through them for knowledge:
- http://www.aoakley.com/articles/2015-10-09-resizing-sd-images.php
- http://www.instructables.com/id/How-to-BackUp-and-Shrink-Your-Raspberry-Pi-Image/
Comments