[ARM] Raspberry Pi 4 series - boot from USB device

The people over at Archlinux Arm have been putting out some really great enhancements lately. Kudos to everyone involved with this.

One of the enhancements is the ability to boot from a USB device.
Another is linux-raspberrypi4 5.10.16-3 mainline kernel.

So today was spent playing with booting from a USB device. It culminated in a new version of the image installer.

EDIT:
In order to boot a RPi 4b or 400 from a USB device,
the onboard eeprom must have the latest version of firmware.
See Post # 3 on this topic.

Follow the instructions to git clone image-install, launch image-install, and answer some basic questions
ChooseDevice

So far, this only works on the 32 Bit OS. Then
storage-device
and you end up with an Archlinux Arm base image install on a USB device.
Plug the USB device in your RPi4 and then install EndeavourOS with your choice of Desktop Environments.

Here are five USB devices I successfully installed Archlinux Arm on, and the three test beds I tested on.

Pi-Pi-Pi_everywhere

Left to right: Sandisk USB Thumb drive 16 GB, Samsung 560 EVO 256 GB, Samsung T5 500 GB, Samsung T7 500 GB, and a Samsung m.2 NVME 970 + 500 GB in a NVME to USB C enclosure. I think they are pretty much lined up in order of speed also. No proof, just a subjective guess. Although between the last four the speed difference is probably insignificate.

Tested on a Raspberry Pi 4b 4 GB RAM, a Raspbery Pi 4b 8 GB RAM, and a Raspberry Pi 400.

As they say, no neofetch means it never happened.

neofetch

Pudge

9 Likes

Wow !!! That fast… look like I clean ssd later today​:blush: :pray: so much for this…

2 Likes

Many thanks to @Shjim for doing some testing on this. :pray: It came up that in order for a RPi 4b or 400 to boot from a USB device, the board must have the latest eeprom firmware installed.

Here is how to check for the installed eeprom firmware version, and how to update it IF you choose to do so.

The first thing that needs to be done, is check the EEPROM version in the Raspberry Pi 4b. If it isn’t the latest version, it needs to be updated to do USB boot. This only needs to be done once, then you are good to go. Raspberry Pi OS will be utilized to do this EEPROM upgrade. It is the official OS for RPi4, and the EEPROM update is now official and in their stable repository. This has to be the safest way to flash the EEPROM, but you still do this at YOUR OWN RISK.

Install Raspberry Pi OS Lite on a 8GB or bigger micro SD card.
In a Operational Linux computer, in a internet browser go to:

and click on the ‘Raspberry Pi OS Lite’ download button.

After it is downloaded, using a file manager, go to the Downloads directory. Then on the downloaded file, right click, and use an Archive Manager to extract the image file.

Use gnome-disks or your favorite ISO burner to install the image on a 8 GB or larger micro SD card. When finished, insert the micro SD card in the Raspberry Pi 4b and power it up.

When the RPi4 is finished booting and doing a little house cleaning, log in as username ‘ pi ‘ and password ‘ raspberry ‘. Update the image.

$ sudo apt update
$ sudo apt full-upgrade
$ sudo systemctl reboot

After reboot, as user ‘ pi ’ edit the following config file using nano or vi

$ sudo nano /etc/default/rpi-eeprom-update
change
From: FIRMWARE_RELEASE_STATUS=”critical”
To: FIRMWARE_RELEASE_STATUS=”stable”
close file.

Check the Current firmware version

pi@raspberrypi:~ $ sudo rpi-eeprom-update

BCM2711 detected
VL805 firmware in bootloader EEPROM
Checking for updates in /lib/firmware/raspberrypi/bootloader/stable
Use raspi-config to select either the default-production release or latest update.
BOOTLOADER: up-to-date
CURRENT: Sat 16 Jan 2021 02:10:13 PM UTC (1610806213)
LATEST: Sat 16 Jan 2021 02:10:13 PM UTC (1610806213)
RELEASE: stable
VL805: up-to-date
CURRENT: 000138a1
LATEST: 000138a1

Check the installed version of the installed firmware. If it reads
CURRENT: 000138a1
It is up to date. If it is not 000138a1 (probably a lower number) then it is not up to date.

If it is not up to date, you have to make a decision whether to upgrade the firmware or not.

Update the firmware.
$ sudo rpi-eeprom-update -d -a
The EEPROM is now updated. Raspberry Pi OS and the micro SD card it is on are no longer needed.

Your RPI 4b or 400 should now be capable of booting from a USB device.

Pudge

3 Likes

@Pudge
In case you haven’t seen this.

http://www.jeffgeerling.com/blog/2021/raspberry-pi-can-boot-nvme-ssds-now

2 Likes

Hey thanks for the link.

That article is for the Raspberry Pi Compute Module 4. A Compute Module 4 is a stripped down Raspberry Pi without USB ports, video out, ethernet port. etc.

In the first picture, the small board with the orange connector for the GPIO is the RPi Compute Module 4 which is mounted on a device supplied by Mirko PC.

That would be really neat for a distributed computing setup with several Compute Modules and one Mirko board for the controller. Not by thing, but interesting.

Pudge

1 Like

I don’t know all the Pi models but I thought it was something new? I’m thinking og trying a Pi 4 8GB but trying to decide what i would use it for. :thinking: The only thing really would be to experience installing the ARM version which i have never done.

1 Like

In my humble opinion, save yourself some money and get the Pi4 4GB model.
Spend the money you save on a good cooling solution.

The 8GB model probably isn’t what you think it is.
The RPi4 SOC (System On a Chip) can only directly address up to 4 GB. On the 8 GB model the second 4 GB cannot be directly accessed by the CPU and to utilize it is more involved. The second 4 GB could be used as ram disk, temporary storage for large amounts of data, such as a huge spread sheet, etc.

Secondly, the architecture is different enough, that at this point in time the RPi4 8 GB model cannot reasonably run a 64 bit OS. For some reason, the 8GB model does not have USB support, so the 64 bit OS is working just fine, but you cannot use a keyboard or mouse. You can only access the SBC via SSH. There is a hack to fix the USB, but it seems as though every other update breaks it and the hack has to be done again.

So at this point, the RPI4 4GB will run a 64 bit OS and the 8GB model will not. Although the 64 bit OS is still kinda flakey at times and I recommend the 32 bit OS.
Both 4GB and 8GB will run a 32 bit OS perfectly fine. FYI the 32 bit OS will also boot and run from an external USB SSD, the 64 bit OS not so much.

As for 4 GB vs 8 GB, even with Gnome installed, the idle ram usage is 700 to 800 MB. Under load such as viewing a MP4 on VLC ram usage is usually around 1200 to 1300 MB, still under 50 %. So IMHO the only time the extra 4 GB would be helpful would be for compiling, rendering images, programs that manipulate large amounts of data, etc. However IMHO those activities should be on the most powerful x86_64 computer you own, not a SBC.

@Shjim has a RPi4 8GB model, perhaps he could add some insight besides what I listed. Also correct me if something I said is incorrect.

Pudge

3 Likes

That is interesting to know this. I’m still debating because I’m thinking about another desktop since i already have the motherboard waiting here. My goal is getting an AMD RX 6700XT paired up with Ryzen 7 3700X and 32 GB ram with the WD 850 NVME drive which is one of the fastest plus some other stuff.

1 Like

So does 64 Bit not work on Raspberry Pi? I see you have Pi4 4 GB and Pi 4 8 GB and also Pi 400 4 GB? which is better?

64 bit work on pi4 4Gb ,8Gb but on 8Gb there usb problem no work without patch . need patching every update . most use 32bit. pi400 i no sure as no have … 4Gb pi4 have no problem on 64bit

@purge … think you cover everything :+1:

@ricklinux 4Gb enough on 64bit or 32bit . I have Pi4 8Gb it fly on 32bit :heart: it ! i use Pinebook Pro as day driver that have 4gb :blush: just wonderful machine when out of office +on the go

3 Likes