I’ve been running multiple Raspberry Pi systems here and there for years. It has always been a pain to use SD-cards because eventually they get corrupted. Now I finally decided to take a look at the options and didn’t get disappointed. It was really easy and cheap to switch from the unreliable cards to SSD and get some extra speed as a bonus. For a smart home hub, reliability is definitely something I need.
When I started thinking about testing the SSD boot on my Raspberry, I wasn’t sure if it would be worth it. So I decided to first try the absolute cheapest disk and adapter I could find, from a local store. So I ended up buying a Fuj:tech USB3.1 SATA disk case for 9,90€ and a 120Gb Kingston A400 SATA3 SSD for 26,90€. So in total, I spent well under 40€.
Fuj:tech isn’t exactly the most known brand and actually I’ve never seen those outside the Finnish verkkokauppa.com. But it’s using JMICRON JMS578 chipset, which is featured in other cases with the same price range. The dock is just like one can assume: made of cheap plastic and not exactly pretty. The SSD was also dirt cheap but the combo works just fine.
How is it so that lower price always mean brighter LEDs
Disclaimer: These instructions are for Raspberry Pi 3. RPi 4 does have some difference in how it boots from USB, so better read the official documentation.
There are clear instructions on the official Raspberry Pi documentation for enabling USB boot. Still, I had to have a few rounds of trial and error until I got the Raspberry booting. Eventually, I got past the problems by enabling a longer timeout for the boot.
So these steps I took:
Add program_usb_boot_mode=1 to the end of /boot/config.txt with this command
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
This line on the card will make the OS enable the host boot mode on all Raspberry Pi’s it’s booted with. So feel free to clear this line if you want to use this card on another Raspberry.
sudo reboot
Run this command on the terminal
vcgencmd otp_dump | grep 17:
It should show the return value as 17:3020000a
.
If it’s not, there’s something wrong. For me, it worked on the first try at least.
You might get lucky, but for me, it didn’t work. Apparently, the dock I bought is so slow to start that the Raspberry bootloader doesn’t wait for it to wake up. But there is a cure for that.
This is a special file that can control the bootloader from the MicroSD card. You can find the instructions and download link to the file here
Copy the file onto an empty MicroSD card formatted as FAT32.
Add a file named timeout (no extension) to the MicroSD card having bootcode.bin file. This will make the bootloader wait for 6 seconds for the USB device to wake up. This might be an issue for some users, but I rarely boot my Home Assistant, so I don’t care if it takes a few seconds more to boot.
Having both the bootcode.bin and timeout files on the MicroSD card and the USB dock connected to the Raspberry, turn on the power and it should boot into whichever OS you flashed the SSD with.
After switching to SSD, my Home Assistant feels much more responsive. For some use cases, it might not be the case, but at least for this kind of webserver use, it’s an improvement. For me, the main point for switching to SSD from MicroSD was to avoid corrupted cards. SSD’s do have their problems, but with this price, it should be worth it.
In my setup there is one problem I’m aware of: if I “soft reboot” the OS, it doesn’t boot. Maybe the USB dock does not reset properly or the bootloader does something weird, but if I need to boot the Raspberry, it needs to be powered off. Again for me, it’s not a problem, because I aim to avoid reboots and the device is easily reachable anyway.