If you read through you will find I finally got USB boot all working using a 2GB RPi4 with various ways to boot my RPi4 – “rpi-cloned” from one master SD. The SD, SD-in-USB3, USB3 stick, USB3 HD,USB3 Hybrid Drive, USB3 SSD.
Why bother with all of this? Speed and reliability, that’s why!
The SSD is currently running my house – but at first I could not get this setup to run in another 2GB RPi4. To cut a long story short, on the SECOND RPi4, no matter what, the SD worked but attempts to use USB resulted in:
Worse, if I took that master SD, put it in an RPi3 it ALSO worked as SD, but put the SD in a USB socket, it refused to boot – with the exact same message appearing on the screen – I had to attach a monitor to my normally headless devices to progress this.
That same RPi3 worked with previous USB images… The message appeared during boot just before the point where the prompt would appear. It turned out (and this is important) that as covered on other blog entries, for the PI4 you do need the full upgrade and currently use the beta eeprom file.
There are a number of SD-TO-USB adaptors that look to be fast enough for writing – hence creating clones (so they seem ok) but are NOT good enough to boot up a Pi4.
Above, the larger USB adaptor (which is clearly marked USB 3.0 and WAS widely avalable on AliExpress cheaply but seems to have disappeared) works a TREAT. The smaller unmarked ones do NOT allow Pi4 booting. That’s about all I can tell you. The latter are going in the bin. At this point I’ll also stop talking about USB boot with RPi3 as, thinking about it, it is not a lot of use due to the slow USB2 speeds on the RPi3.
The Raspberry Pi4
The 8GB modem is still not actually available it would seem – but is advertised anyway – the new model features 8GB RAM and some software updates – beta 64-bit Debian if you are into using beta software – oh and a new name “Raspberry Pi OS” – are you excited? I noted “faster processor” but compared to what? That sounds like the battery adverts that claim “10x faster” without being specific – which turns out to be 10x faster than the batteries hardly anyone uses any more. Be aware that the price of this upgraded RPi4 in the UK takes it well above the original throw-away price of the RPi.
At the time of writing, Pi-Hut advertise but don’t have stock of the new 8GB Pi4, CPC have them on back-order at £69.77 no doubt plus shipping… Pimoroni want £73.50 and are out of stock, OKDO have no stock either but price is £70.50 all in.
The 4GB RPi4 still seems to cost around £54 so unless you actually need all of that memory, there is still the 2GB version at around £34 – bearing in mind that you will need a case and power supply. RS Components don’t mention the VAT until the shopping basket and their all-in price is £70.91 – but state that the product is “on back order for dispatch 26/10/2020”. 2GB and 4GB models are widely available. I’m happy with my 2GB models for IOT use.
With any RPi4, the old cheap plastic cases we loved in older model RPis are really no good as you need a decent heat sink – and your power supply needs to be sufficiently beefy – so you have to ponder the total practical price of a Pi4 8GB which now approaches £100 all in (using SD, more if you choose to use an SSD)
USB3 Boot for RPi 4 AT LAST
We now have USB BOOT albeit in BETA form. If you are new to this – it’s a big deal, the RPi3 has USB boot but then it uses slowcoach USB2 so really that’s not a lot of use. USB3 on the RPi4 on the other hand is well worthwhile – and NOW you can BOOT from USB3 on all RPi4 models – currently with tiny mods you will see on other sites and mentioned here.
Note in the photo above, my RPi4 is both booting and running off a USB stick (not fast but all I had handy at the time).
The BETA USB boot was released on May 20, 2020 – you really want a JUNE 2020 or later master AND additional /boot folder files (ONLY the DAT and ELF files).
RPi3 users who upgraded to RPi4 may still be wondering why, a year after the launch of the RPi4, this useful feature is still not mainstream – SD remains the weak point of serious RPi use because of limited write cycles and power sensitivity but that is now fixable with SSD on USB3 – you can probably tell I’m sold on the idea – I now have both Blitzwolf and Kingdian SSDs – no comments on relative reliability – time will tell.
Personally having taken the arguably sensible approach of using a media centre as a media centre and saving money over the RPi “solution” – I have several RPi3 and RPi4 2GB projects none of which are seriously stressed by my home control setup which you can read about in this blog – I HAVE had an RPi fail remotely due to nearby lightning killing the SD (ok, a bit extreme, I’ll grant you) bu that’s my only in-situ failure to date.
So what else is new on RPi? They’ve re-named the operating system and brought out a new “flasher”. So what was the first thing I tried? Flash the May 27, 2020 “Raspberry Pi OS” (lite 32 bit) onto a handy USB stick using their new Flasher. Nope – no chance. So I tried my old favouite – Balena Etcher – done.
As you do, I added a blank file called SSH to the boot folder (after removing the USB stick and re-inserting into the Windows PC wherein you can access the boot partition as a disk – often drive E:). All looking good. I plugged the USB stick into the PI and booted the Pi with no SD. Result? Attrocious HDMI output but readable enough to see that the USB boot still didn’t work. SO – then I tried the same Raspbian, same flashing method on an SD in a USB stick – same result.
Finally I took the new SD, put it in my normal USB adaptor – flashed perfectly as you’d expect. The SD would not operate as USB but started up perfectly in the SD socket. I left it to do it’s automatic initial resize, checking for Raspberry Pi EEPROM updates, apt update and apt upgrade.
After 15 minutes watching the local display the PI was still doing the upgrade or crashed, not sure which. I took the self-same SD, put it in an SD adaptor and into the PC, tried the new Pi Imager and that flashed. Despite not immediately appearing on the PC after disconnecting and reconnecting, I put the SD into the Pi4. Worked fine as SD but again not as USB. I put the SD back in the PC and added the empty SSH file.
I then put the SD back in the Pi and checked, again ok as an SD but not as a USB stick, so reconnected as SD, I added the 14 boot folder files as I’d used with previous attempts but this time NOT marking the SD as BETA (which didn’t work for me anyway). I removed the CD and inserted into the USB connection. This time it worked.
The NEXT stage was to copy this SD to a true USB stick (full clone to be safe) using RPI-clone – that WORKED. So now I had an SD-in-a-USB socket and a REAL USB stick both working. Add to that an external 80GB USB3 disk – cloning again worked…. I then had to copy all my working files from the second partition of a working installation to one of these fresh USB-bootable drives. Rpi-clone seemed to manage that on my first attempt with a test installation but did not work with my full Node-Red-based installation.
USB Upgrade Summary
At June 16, 2020 – recent blog entries out there seem to offer conflicting advice – everything from Tom’s hardware through Andreas Speiss YouTube and several others – all good-meaning but they only got me so far – there is very little on UPGRADING existing installations (assuming we all want to start from scratch every time RPi bring out new hardware or software – erm, NO).
Well, right now I can tell you that I’ve upgraded an early May 2020 Buster installation with “The Script” and HASS to run on FIVE different USB variations (SD, stick, HD, Hybrid HD, SSD) and NOW, my main Pi installation which has been continually updated and rpi-cloned since before Raspbian STRETCH and last fully updated not that long ago – has upgraded successfully to boot from USB.
Note that in front of me I have a pair of upgraded working Pi4 working on USB. https://thepi.io/how-to-boot-your-raspberry-pi-from-a-usb-mass-storage-device/ – RPi3 users might recall:
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
which adds to the end of /boot/config.txt file to let the RPI3 boot from USB (one-off, irreversable operation, you can remove it from /boot/config.txt when done). This is NOT relevant to RPi4.
I ended up having enabled USB boot on the Rpi3, with an SD-in-USB booting fine on both RPi3 and RPi4 but my actual USB stick (Duracell 32GB) only booted the Pi4. Don’t anyone ever say I don’t go into these things in depth…poor Antonio must have gotten bored to death as I don’t think he has an RPi at home and I’ve been at this for ages – it turned out that my issues were partly down to bad USB convertors as covered above. As I’ve also concluded above, using USB boot on the RPi3 does not give a FANTASTIC advantage in the end due to slow USB2 speeds.
But RPi4 with USB3 – yes to USB boot – definitely.
The CLEAR winning options for me from a speed and reliability aspect are hybrid drive and SSD.
Arbitrary write-speed testing using DD on the RPi:
1TB Hybrid drive 187MB/s, 110MB/s, 86MB/s 256GB SSD 124MB/s, 130MB/s, 125MB/s 32GB SD 12MB/s, 13MB/s, 16MB/s 72GB Real HD 211MB/s, 31Mb/s, 30MB/s
Price-wise, I’m afraid SD wins hands down but on performance – well – cheap 64GB and 128GB SSDs are not TOO far behind on price and for speed the SSD is the clear winner. Incidentally the first SSD I used in the tests was a USB3 250GB Blitzwolf stick with 125MB/s write – I later noted 228MB/s using my Kingdian 128GB SATA drive with USB3 adaptor. The latter also returned well over 100MB/s after booting an RPi3 with exactly the same test conditions. I’m quite pleased with these results.
Finally, just for good measure.. I threw in a 12-year old 160GB 2.5″ SATA hard drive which has been with me through experiments with NANOPI NEO and all manner of other SBCs – even THAT managed write speeds 2-4 times faster than an SD. I guess I’ll hang onto it.
And finally – June 27, 2020 – the USB booting which was such a big deal – is now no longer BETA – it’s mainstream. Others will describe how to set up USB boot on a Raspberry Pi 4 on a new installation so I will concentrate on the often forgotten existing installations for those of us who don’t want to start from scratch every time.
The final setup assuming Raspbian lite or full… on the Raspberry Pi 4 (RAM size isn’t important)
sudo apt update && sudo apt full-upgrade
sudo nano /etc/default/rpi-eeprom-update
Pick the latest pieeprom file – should be pieeprom-2020-06-15.bin or later
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
Reboot at this point and you are done.