Shrink Raspberry Pi Images - Using Windows, Virtualbox running Raspberry Pi Desktop

in #raspberrypi5 years ago (edited)

Massive Pi Images are a pain as they take too long to write to a sd card, so trimming them down speeds up prototyping.

My personal "setup pi image" is 3gb which is all the apps and setting I want for a fresh Raspberry Pi, which has ssh, vnc, ect installed while all the stuff I never need is removed.

Tools required:
-USB memory card reader
-Win32DiskImager (available from sourceforge)
-Virtualbox running Linux ( I am running Raspberry Pi Desktop available on the raspberry pi website, you could Ubuntu ect)

Before we begin make sure that you have expanded your Raspberry Pi file system.

Choose "Advanced Options" then "Expandfilesystem"
In the terminal type: sudo raspi-config

Before starting, backup your raspberry pi image using Win32DiskImager encase something goes wrong!

Step 1:
Backup your image.

Step 2:
Start Virtualbox.

Step 3:
Install Gparted.
sudo apt-get install gparted

Step 4:
Mount YOUR usb-memory card reader in Virtualbox

Step 5:
Run Gparted.

Step 6:
Choose your memory card.

Step 7:
Unmount card (right click).

Step 8:
Resize drive (right click).

Step 9:
Move the slider and leave a gap to fit the file system in, I leave a couple hundred megabytes just to avoid issues.

Step 10:
Nothing has changed yet, you need to click "Apply All Operations".

Step 11:
Wait it takes a few mins.

Congratulations your done!

Now make a new image using Win32DiskImager


Welcome to Steemit!

We have all been waiting for you, we are glad you could make it.
I have given you a upvote to help you out!

Hope you love Steemit as much as we do.

Give these a read:

Chat with us:

If this post was helpful, please leave an upvote. It helps me to keep helping new users.

I'm sunnybooster, a booster for accounts not posts. Send me 0.5 STEEM or SBD to get a week of upvotes! If you don't yet know what this is its fine.

I am a bot and this was automated. I exist to help out new members and attempt to get them hooked

Coin Marketplace

STEEM 0.26
TRX 0.07
JST 0.040
BTC 30256.06
ETH 2013.79
USDT 1.00
SBD 2.39