Migrating from Raspberry Pi 3 to Pi 4

It’s good to hear that there are noticeable gains!
What flavour pi4 did you go for?

Also - I thought SSD compatibility was just on the pi3?

Would you please let us know how are you using an SSD drive with your RPi4? Thank you!

1 Like

Well, currently the proper USB boot capability is not yet available, there are workarounds. Basically you boot from the SD card, but all the relevant files are on the SSD. I recommend this USB-boot tool (it’s a script that does everything for you that you would otherwise would have to do manually). It’s pretty neat because you can even move your existing SD card installation onto an SSD (but it’s fine if you just have the OS on the SD card so far). It only takes a few minutes and it works perfeclty. It was updated to work with pi4 although it was originally made for pi3.


Great!! I truly appreciate the info!

I’ve been looking into doing this and the normal guides talk about either ‘specific compatible drives’ or changing the ‘system’ location in fstab or in cmdline.txt

I’ve not seen this script before but the instructions are a bit vague.
I assume you’d need to change ‘something’ on the sd to have it redirect (for unattended boots) but I don’t see how it does that.
Would you be amenable to write up a pi 4 ssd hassio / ha installation ? (or should that be using the new naming as announced today.?)

I can do that (although I dont know when). The instructions of the script are vague, but once you actually run the script it’s pretty straight forward.

I run Raspian Lite with Docker and Hassio. I can give you a quick and dirty guide now:

  1. Flash Raspian (Buster) Lite on SD card (e.g. with etcher)
  2. Enable SSH by adding ‘SSH’ file on SD card
  3. Insert SD card into pi and boot
  4. SSH into pi
  5. Copy usb-boot from PC onto your SSD
  6. Attach SSD via USB to the device. Copy the usb-boot files onto your SD card
  7. Run usb-boot and make SSD boot device+copy files from SD card to SSD with the tool
  8. Install Docker sudo curl -fsSL https://get.docker.com | sh
  9. Follow hassio-installer instructions:
    9.1 installl dependencies (via sudo apt-get install)
    9.2 Enter sudo su to get root access
    9.3 Run curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m raspberrypi4
  10. Done!
  11. Set up samba
  12. Set up backup (e.g. the Google Drive Backup-Addon)

You Sir are a gentleman and a scholar !
I thank you
I’ll give it a go on both a pi3 and a pi4 and report back with questions / snags
Cheers :beer:

1 Like

Well I have used a small external hard drive in the usb 3 (waiting on another ssd adapter, as last one won’t even let the pi boot). And have it running on a pi 4 with everspring z wave stick plugged into a USB 2 port.
Everything pretty much as you describe. Though some comments to make it more accessible to all : -

  1. I’d copy the USB-boot.zip onto your computer then move the two scripts inside to the sd boot drive at the same time you write the ssh file in there
  2. Move the files to a directory (I used - mv /boot/usb-boot /bin/ but perhaps another location is better ???)
  3. Then do a chmod +x on the script to make it executable
  4. I formatted the USB disk when connected to the pi (had some issues with externally formatted partions before, not many but enough to be cautious)
  5. emphasise that ‘space’ is used to mark options in the script

Not sure about : -

  1. I set up ssh on raspbian so I didn’t bother setting it up as an addon in hassio
  2. Samba, really confusing, set it up on raspbian and pointed it at the required folder (can’t remember which one as don’t have my notes with me, but it’s certainly not ‘config’) anyway set this up in raspbian, added users and passwords - didn’t work. Set it up in hassio - started working. Stopped it in raspbian - didn’t work again. It needs BOTH to work ??? Don’t understand that, maybe I made a mistake ?

All in all the best and the closest I’ve come to getting it running with an external drive - my thanks

Metric.			pi3		pi4

Checkconfig		24s		8s
Reboot			198s	215s ???
Restart			will edit this later when I do the tests
Reload autom
Reload scripts

All below here is additional (the forum platform must think cib and I have a bromance as it’s objecting to me posting again, “let some others join the conversation” :rofl: )

Samba : - hahaha well I’ve been using samba for about 20 years (used to build my own NAS’s) so I will always find a way ! Never thought of putting samba in its own docker though. Its so easy to restart anyway I don’t think I’ll bother with that.
No, I was more concerned about newbies following instructions to get to share the ‘config’ folder (not only that but the other folders ‘beneath that’ like backup etc.
I see you set it up with the username ‘user’ which is the same as hassio was created with, but mine didn’t complain when I used another name.
I think a simple setup for most newbies will be fine in the instructions. Advanced users can meddle to their hearts content.

So you can either use the Samba add-on (which is enough for most people) to edit your config files etc., or you can setup regular samba in rasbian directly. Since I also had troubles setting it up (was my first time), I ended up using a dockerized version of samba (I also have another external HDD in this setup):

sudo docker run -d -p my-ip:445:445 \
  -v /mnt/Seagate:/Seagate \
  -v /usr/share/hassio:/Hassio \
  --name NasPi trnape/rpi-samba \
  -u "user:password" \
  -u "guest:guest" \
  -s "Seagate:/Seagate:rw:user" \
  -s "Hassio:/Hassio:rw:user"\

No way to migrate from pi3 to pi4 with snapshot.
I did a full snapshot on pi3 and moved to pi4 then first I tried with wipe and restore but the pi4 stuck as it was a new installation then I tried simply “restore” and HA never restart. I deleted the DB as suggested but same result the GUI doesn’t bring online.
Any suggestion?


1 Like

Same for me. Followed the steps but now doesn’t come up :pensive:
I hate to do EVERYTHING all over again, :face_with_symbols_over_mouth:

In the end… I managed to move my installation to Pi4.
I installed from scratch the Pi4 installing all the plugins and integration.
Then I copied only configuration and SSL.

I’m migrating from an Intel NUC running Ubuntu 18.04 and Docker, I assume the process is the same?

1. Download the [Hass.io ](http://hass.io/) image for Rpi4
2. Image the new microSD card
3. Let the the Rpi4 boot and sit and download everything
4. Make a snapshot on the Rpi3 and download it
5. On the Rpi4 install Samba Share and copy the snapshot into the backup folder
6. Reboot the Rpi4
7. Restore the snapshot on the Rpi4
8. Shutdown the Rpi3 and change the Rpi4 to have the IP of the Rpi3

Hi there, I followed this instructions but for me it stucks at point 6. After reboot the copied snapshot is not shown in Snapshots (available snapshots). Anybody out there who can help?

Fixt it. After refreshing page the snapshot was shown. :pleading_face:

1 Like

What’s the best way to restore in this case: “restore selected” or “wipe and restore”?

I always use “restore selected”. In both cases, probably your home-assistant_v2.db will be corrupted and you will need to delete it before restarting HA.

Hm, on selecting “restore selected” connection is lost and HA seems to restarts. Do I have to delete .db before selecting “restore selected”?

No, after restart you delete it and restart again.

1 Like