USB boot Ubuntu Core on a RPi 4

Hi,

I was wondering if someone have successfully found a way to boot Ubuntu Core from an USB device? I’ve flashed a new eeprom bootloader (with flags 0xf14 - I want USB to have the priority over SD).

I’m using a «Kingston, A400, 120GB M.2 2280 Serial ATA-600» together with a «x862 v2.0 shield».

However it wont boot up and I’m struggling to find any tutorials or anything on how I can accomplish this, or if it’s even possible :slight_smile:

Anyone here knows if it’s possible?

Nobody knows if this is even possible?

it should theoretically be possible if you switched your EEPROM to default to USB boot, dd the image to the SSD disk and boot from it … but your mileage may vary …
(i.e. i have a few sandisk extreme SSDs in use, they only work with a Y-cable (and external power from the second line), else they draw too much power even with a 3A PSU)

Hi @ogra, thanks for your reply!

I’ve only tried writing the image with the Raspberry Pi Imager tool, without success. The Pi won’t boot.

Should that differ with dd?

And when you say I should use dd… Should I first write the OS to the SD card. Then boot up with the SD card, so all the data is initialized to the filesystem, then dd the content of the SD card to the SSD or just download and dd the offical image?

as i said, you first need to switch the EEPROM bootloader to default to USB … (and it needs to be a version that supports this (the early ones that came onboard did not)) … so you likely want to boot first with a classic ubuntu-server or raspberryPi OS and set that up proper …

RPi-Imager should surely work too then …

I’ve already flashed the new EEPROM, as mentioned in my initial post, but with the flags 0xf14 instead of 0xf41, since this should give the USB priority over the SD slot.

well, then i’d expect it to boot … perhaps the Imager does something different with the image, i personally never used it, try dd …

EDIT: oh, also … how exactly does it not boot ? does it not start up anything or do you hit any error ?

I’ll give dd a try :slight_smile:

There’s no errors or anything. The screen just stays blank/black, but on.

so you do not even see the rainbow screen ?

Nope, it just turns black and stays on… I will try to swap to 0xf41 instead, pull out the SD card and see how it identifies the SSD through the diagnostic screen that comes up when the preferred option is not present.

Will also try with the dd command instead :slight_smile:

So I’ve tried with dd too, without any luck. I do get the boot screen and the SSD is identified.

Any other suggestions on how I can get this running? :slight_smile:

Anyone managed to run plain ubuntu-server on an SSD with an RPi 4? Did you have to do any changes to get it running?

with server it is the same, you need to adjust the EEPROM first … i just remembered while we had well thought out USB detection code in the u-boot environment of the the pi-gadget we built from upstream originally, when the gadget maintenance was taken over by the foundations team they switched to the u-boot .deb package as input source and this adjutment was lost … @waveform would that old patch be adaptable to the u-boot deb ?

the latest Ubuntu Server images do not ship u-boot at all anymore, so you might be better off using that for the time being …

Aha, so that’s probably why. Hope there will be a fix for this; I’ve burned so many SD cards so far, that I actually need to reconsider using the Pi’s for this.

We have multiple properties that we want to install this in, so we can track temperature etc. That’s why I also wanted to go all in on snaps and Ubuntu Core. It just seemed as the way to go, so I don’t have to log in each time for every update… But guess I have to wait for a solution or simply just use the Server version. Luckily it supports snaps too!

and SD cards are not an option ? note that write operations are very limited on Ubuntu Core (logging goes to ring-buffer, writable files are defined through a whitelist and are only very few, you can make your application use the removable-media interface to store any app output to USB etc etc), i have personally not managed to kill any SD since 2016 using Core and have also not heard from customers having any problems …

It can be just the one I’m using at home, with Home Assistant installed, which is doing a lot of R/W operations every second.

It just seemed to be a more robust and easier/nicer to «wrap» in a 3D printed case, by just using a SSD expansion board instead of having all these USB things connected.

We will (however) not use HA in all the properties. Just MQTT every sensor data to a centrally located server. So an SD card is maybe suitable in this case, with Ubuntu Core.

Just booted the Ubuntu Server 20.10 image from the SSD. Works great. But I’ve grown found of Snaps and Ubuntu Core the past year working with it - so I’m still having my fingers crossed from a fix ;D

Just checking by if there are any updates on how to get a RPi4 to boot Ubuntu Core 22 from USB - or if anyone had any luck on it?

I still have the same problem, it’s just stuck with the cursor blinking on the screen. Would love to get it working. We have a lot of devices that would benefit from this.