Friday, June 30, 2017

Easy Resizing of your Raspberry Pi SD Card Partition

There are a whole bunch of posts out there on why you may want to shrink/resize your Raspberry Pi SD card based partition. 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 I think, 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:
  1. 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
  2. Create a Linux virtual machine in VirtualBox with no HDD and a CD ROM - setting it to the ISO you just downloaded
  3. Enable USB 2.0 at least so you can load the card reader into your VM
  4. Run VM - it should get you into the GParted graphical interface. 
  5. Your USB based SD card partitions should be visible to GParted at this point
  6. Now you can simply resize your SD card partitions in the GUI - no calculations or messing around with other tools required!
  7. 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/

No comments: