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

in #raspberrypi7 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
raspi-advanced-options.JPG
expand-files-system.JPG

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

Step 1:
Backup your image.
backup-image.jpg

Step 2:
Start Virtualbox.
vbox-boot.jpg

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

Step 4:
Mount YOUR usb-memory card reader in Virtualbox
mount-usb-memorycard.jpg

Step 5:
Run Gparted.
run-gparted.jpg

Step 6:
Choose your memory card.
select-usb-card.jpg

Step 7:
Unmount card (right click).
unmount-card.JPG

Step 8:
Resize drive (right click).
resize-move.jpg

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.
move-resize-slider.jpg

Step 10:
Nothing has changed yet, you need to click "Apply All Operations".
apply-all-operations.jpg

Step 11:
Wait it takes a few mins.
wait.jpg

Congratulations your done!

Now make a new image using Win32DiskImager
backup-image.jpg

Sort:  

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.18
TRX 0.15
JST 0.029
BTC 63439.39
ETH 2545.40
USDT 1.00
SBD 2.66