RPI 3 B+ move system from SD card to external SSD?

  • I have LibreElec on a generic SD card, running on a Raspberry Pi 3 B+.

    I also have an external SSD hooked up to the Pi with a USB-to-SATA-adapter. I use the SSD as storage for various things.


    Is it possible, and how, to move the whole existing system from the SD card to the SSD and boot from there?

    Can I do this without destroying existing data on the SSD?

    • Official Post

    without destroying existing data on the SSD

    The RPi3B+ already allows for USB booting, so that's a good start. Hopefully your USB-SATA adapter is capable of fit for booting.

    It also means there needs to be a system partition on the SSD for the RPi to boot from.

    Option 1

    The 'simplest' solution would be to copy the current contents of the SSD to a temporary external location (a Linux PC?), then write the LibreELEC image onto the SSD so both partitions are created and LibreELEC can boot from it, and then restore the entire storage contents back to the SSD.

    Option 2

    "Without destroying existing data" is not impossible, but you will need a tool like GParted, to shrink and move the current EXT4 partition on the SSD to make room for the 512MB/1024MB size EXT4 system partition. Moving partitions around on a SSD is not their favorite actions AFAIK, but it's doable. Then copy of files from the LibreELEC SDcard's system partition to the SSD's system partition, hook up the SSD onto the RPi3B+ and power it up. And hope it all works

    If the current disk format on the SSD for storage is not EXT4, then option 1 is still the required option.

  • Easy to do from any Linux OS with gparted:

    in short you copy/paste both partition from sdcard to SDD and set boot flags as in sdcard and you are done. Probably first you need to resize/downsize existing partition from SDD if you don't have free unallocated space

    You can see here how I just added an working LE (sdb1 and sdb3) from a 2Gb sdcard to an SSD just to test new option USB boot on RPI4.

    This SSD did not had any free space left but I downsized sdb5 and sdb2 and moved sdb6 existing partition and I also expanded data partition from sd card LE install sdb3.

  • My USB-to-SATA-adapter is USB312SAT3CB by StarTech. I think it'll suffice.

    The only partition on the SSD is an NTFS partition but can't I just resize the partition and create an EXT4 partition right alongside it?

    Easy to do from any Linux OS with gparted:

    in short you copy/paste both partition from sdcard to SDD and set boot flags as in sdcard and you are done. Probably first you need to resize/downsize existing partition from SDD if you don't have free unallocated space

    You can see here how I just added an working LE (sdb1 and sdb3) from a 2Gb sdcard to an SSD just to test new option USB boot on RPI4.

    This SSD did not had any free space left but I downsized sdb5 and sdb2 and moved sdb6 existing partition and I also expanded data partition from sd card LE install sdb3.

    I'm somewhat familiar with GParted and my main computer runs Ubuntu. I'm not familiar with "setting the bootable flag" though. Do I do this with GParted or...?

    • Official Post

    Gparted is tool primarily for handling partitions. Setting the boot flag is pretty simply with it.

    Resizing is one option. Is the NTFS partition to remain on the SSD? Or perhaps that Gparted can reformat it into EXT4 while keeping the data. (Backups are still recommended).

  • Klojum I tried with a fresh install of LibreELEC on a Samsung 850 EVO with the aforementioned SATA-to-USB adapter. The initial boot was successful but after the first reboot nothing happened. Just a blank screen.

    Could the adapter or the SSD be incompatible with RPI 3 B+ or LibreELEC?

  • Incompatible?

    It worked the 1st time, so it should work the next time as well.

    Double-check the correct uuid's of the drive and in the config.txt file.

    Well I installed a fresh instance of LibreELEC to the external SSD so how could UUID there? I'll check it in the evening.

    I did use a different adapter however when installing LibreELEC and when I booted the RPI.

    I have had weird freezings with the main adapter when I've copied huge amounts of data to it.

    • Official Post

    If any SD card is still in there with the same (part)uuid, then there is a problem.

    Formatting a drive in Linux will give it new UUID numbers.

    Writing the same image onto drives will give them the same UUIDs.

    You could still have a (somewhat) incompatible USB/SATA controller.

  • If any SD card is still in there with the same (part)uuid, then there is a problem.

    Formatting a drive in Linux will give it new UUID numbers.

    Writing the same image onto drives will give them the same UUIDs.

    You could still have a (somewhat) incompatible USB/SATA controller.

    There was no SD card inside when I have tried to boot from the SSD. The UUID's of the partitions (viewed from GParted) match those in cmdline.txt. LIBREELEC-partition has type vfat, isn't that correct?

  • Klojum


    It was the bloody adapter!

    I managed to make everything work simply by trying another adapter that has its own power supply. The USB 2.0 port of Raspberry PI 3 B+ is incapable of providing enough power for USB312SAT3CB.