Switching to SSD

Having had a major clean up of my junk pile (office) and found a 120 GB Samsung SSD drive I’m in the process of reinstalling from scratch. I hadn’t made that much progress but it does make me wonder what would be the smart way of either migrating from one drive/card to another. Also when it’s up and running I don’t think it will be practical to make images of it very often so is there a process to backup the key files ?

something like this? https://www.openhab.org/docs/installation/linux.html#backup-and-restore

So in order to move the config from one drive to another I do the backup, use the share to copy the backup onto my mac, switch drives, reboot and copy the backup back to the new drive, then run the restore script on the new drive ?

I had my Raspbian/openHABian image running from an SD Card and then decided I wanted to run my OS from a HDD. I used the utility in openHABian which essentially created a partition on the HDD, copied the contents from the SD to the HDD and then pointed the boot file to use the HDD partition instead of SD card.

1 Like

I can see that would be easier. My linux is a bit too rusty to do that at the moment. I seem to have a situation with the Samsung SSD at the moment. I put the raspberry pi on it with etcher and boot it up. It resizes the partition, reboots and then does the rest of the update and install ok. If at that point I logon to the console and do a shutdown command it comes up with an error (sorry didn’t take a photo) and then either hangs or completes the shutdown ( I suspect the former). If i then power off and power on again it does not boot. The adapter is a USB to SATA with a data lead and power lead and I’ve tried to connect the power to a separate supply but it’s not consistently booting at this point. I have to admit its all stuff from my spares heap at the moment. I do have a small USB 128gb pen drive as well - might try that. The main objective is to avoid the problems I’ve read on the forum about SD-CARDs getting corrupt. If you know of a reliable SSD and adapter, be that a “hat” or a usb cable combo it would be handy to know.



Click the link to read the part about the SSD enclosure.

Make sure in your /boot/config.txt file that you have max_usb_current=1 if not add this line and try with out external power on your SSD.

1 Like

Assuming you speak of a Pi with openHABian (right?), you could use Amanda (part of openHABian, installable via menu). Amanda can backup/restore partitions as well as directories. You should be able to boot from SD, with SSD attached, run Amanda backup once (to backup /dev/mmcblk0 which is the internal SD card) and restore to the SSD’s device (/dev/sda or whatever fdisk -l tells you that is). Note you need to partition the SSD first.
You could also try copying that SD to SSD with a simple dd command dd if=/dev/mmcblk0 bs=4M of=/dev/sda, but you should setup Amanda anyway as it’ll take care of backing up your whole system every night.
Btw, with that in place and a little bit of tweaking, you would avoid SD corruption (well, for the most part) and don’t need to run off SSD. And if your boot disk crashes (be it SD or SSD if you still decide to move), you will be able to restore it.

What model Pi are you using?

I’m using model 3 B+ thanks.

I have the same and boot w/out SD card, no issues so far. Here are the instructions I used if you want to compare with your setup.https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
For OH install I connected the SSD to my PC and used Etcher to flash the openhabian image, plugged it up to the Pi and 15 min later I was good. I used openhab-cli backup to create a backup file (from old RPI2) then moved that to my PC via Filezilla and openhab-cli restore (after moving the backup from PC to new RPI3) to get everything working again.

Hope it helps.

Has anyone copied an SD card over entirely and booted from an SSD w/out an SD card at all?

Most of the guides I’ve found only cover copying over the main partition, leaving the initial boot from the SD.


See post above yours. :sunglasses:



Like @sihui mentioned

And follow the link!

It appears from a lot of other forum discussions that the 3 B+ has some different firmware in it and was known to have issues with boots from external devices (no SD card). Some suggestions that the latest rasberrian stretch may have fixed it.

@Dave_G1 I don’t remember reading about issues with the 3 B+ but that’s been a few months ago.:thinking: When I first got my 3 B+ I put Raspbian on an SD card and booted up to verify it worked, it was a few more months before I moved my OH over and started using the 3B+. I used the instructions posted on the link above and everything worked the first time and I haven’t ran into any issue since. Maybe I just got lucky?

Not sure if this make a difference or not but I didn’t format or partition the SSD before loading the image. I just let Etcher do it’s thing and openhaban install took care of the rest.

Thanks both,

I followed the link and read the article.

I think I’m misunderstanding as the article reads as a fresh install onto the USB boot device.

I have a working system on an SD card which I would like to copy to the SSD.

I’ve made the changes to config.txt as per instructions, I then copied the image from the SD card and copying to the SSD using etcher, it didn’t boot without the SD card.

I could get it to boot from the SD card and use the SSD card for the root partition, but am unable to find any instructions or guidance to copy an image rather than a fresh install.


@james_2_roberts did you install OH (originally on SD card) via openhabian image?

No, I used apt-get to install OH.


Models prior to the 3 B+ required some bios flag to be set to enable boot from USB but apparently the 3 B+ has this enabled already. I used etcher to burn the github fresh image into the SSD via my laptop and it did boot and complete the install but a controlled shutdown would just hang and cold boots were less that 50/50 success rate.

I wonder if the same would be true of you used Etcher to flash the openhabian img.xz on your SSD. I know/think you prefer to install yourself, but if the image works, then you have something to compare against.

Here’s the link if you decide to give it a go.https://github.com/openhab/openhabian/releases/tag/v1.4.1