There are plenty of lenghty explanations around the web on how to clone a Linux OS onto a new device, but I came through this great tool on my Pi which reduces it to a few minutes and no typing at all.

It is a built-in “SD Card Copier” which you can use to regularly backup your OS, or upgrade your file system to a larger SD card, which is my case.

1. Setup.

As mentioned, I want to move my Raspbian OS to a larger and faster SD card. Both cards need to be accessible on your Pi, so I got it set up like this:

  • Raspberry Pi 4B with Raspbian 10 Buster
  • 32Gb SD card on Pi's SD card slot.
  • 128Gb fast SD card on USB adapter via Pi's USB
  • For a backup, you can plug in a USB stick and transfer the backup onto it.

We will be using the "SD Card Copier" or "piclone", which should be built-in but you can install it on Raspbian via:

sudo apt-get update

sudo apt-get install piclone

[Not tested!] Piclone should work for other Linux distributions, if you're skillful enough to build all the required dependencies. In that case, you can access the github repository and follow the instructions there:

https://github.com/raspberrypi-ui/piclone

2. Transfer your OS via piclone.

Open the "SD Card Copier" either by finding the app launcher or via terminal, and make sure you have superuser permissions:

sudo piclone

The software is very simple and just looks like this:

Select each device from the drop down lists, and click "Start".

After a little while you will have a bootable copy of your current OS.

Help documentation mentions a 10-15minutes wait, but it took quite longer as it depends on your storage size.

3. Launch your new card.

Finally:

  • shut down your Pi
  • swap cards, and
  • check it is all up and running
  • with the upgraded storage
Using GParted to check the new partition details