News How to Boot Raspberry Pi 4 From a USB SSD or Flash Drive

May 23, 2020
1
0
10
0
Any idea if this will enable the Raspberry Pi 4 to be a viable Plex Media Server?
 
May 23, 2020
4
0
10
0
These instructions resulted in an error and also caused my pi to stop booting from the SD card.

When restarting after removing the SD card, I got an error on the bootloader screen saying:

Invalid ELF header: 'start_x.elf'
Firmware not found

And it would keep repeating and showing this error.

Then I tried reinserting my SD card and now it is showing the same error, even without the USB drive plugged in.

What has happened? I can't boot using my original SD card.
 
Last edited:
May 23, 2020
2
0
10
0
These instructions resulted in an error and also caused my pi to stop booting from the SD card.

When restarting after removing the SD card, I got an error on the bootloader screen saying:

Invalid ELF header: 'start_x.elf'
Firmware not found

And it would keep repeating and showing this error.

Then I tried reinserting my SD card and now it is showing the same error, even without the USB drive plugged in.

What has happened? I can't boot using my original SD card.
I tried this as well and did not have the issue with my sdcard booting on RPI4 but the USB boot did not work and got same error on bootup.
 
May 23, 2020
4
0
10
0
I tried this as well and did not have the issue with my sdcard booting on RPI4 but the USB boot did not work and got same error on bootup.
Yeah, I'm not sure why my sd card started getting the same error... Maybe I accidentally copied the bad start_x.elf to it or something. Anyway, I think there might be an issue with the current start_x.elf from the Github. Will wait for the OP's response.
 
May 23, 2020
2
0
10
0
Yeah, I'm not sure why my sd card started getting the same error... Maybe I accidentally copied the bad start_x.elf to it or something. Anyway, I think there might be an issue with the current start_x.elf from the Github. Will wait for the OP's response.
I'll do the same.
 
May 24, 2020
1
1
10
0
Hi, that sounds fantastic ! May I ask where is now the previous way of doing described ? (i.e. sudo fdisk -l; sudo mkfs.ext4 /dev/sda1 etc) ?

BTW, is there a way to upgrade from previous way to this new way so to maintain what was already installed on the SSD, and not to have to re-install it all ?
 
Reactions: CS_J
May 24, 2020
1
0
10
0
@FrenchPi : I am not an authority on this, but my answer is a qualified "yes". I have successfully done the firmware upgrade without messing up my USB external drive contents or configuration.
In my case, I had partitioned the external drive (a 1TB Seagate "Backup Plus Portable" USB 3.0) as follows:
  • /dev/sda1 vfat (1GiB, Primary) "USBBOOT"
  • /dev/sda2 - (938.5 GiB, Extended)
    • /dev/sda5 ext4 (128.0 GiB) "/"
    • /dev/sda6 swap (8.0 GiB) "swap"
    • /dev/sda7 ext4 (223.0 GiB) "/srv"
    • /dev/sda8 ext4 (502.0 GiB) "future" (not mounted)
Note that this does not follow the SD card partitioning (at least for the "Noobs" image) which appears to have "Recovery" as the primary partition, and in the extended partition, a partitions for "/boot", a "Settings" partition that doesn't seem to get mounted, and the root partition.

I have been booting off of an SD card with my root file system on the external drive for months now with no problems. It's much faster, and more spacious, than the SD card. "/boot" was still mounted from the SD card in "/etc/fstab", but everything else was mounted from the external hard drive.

The following are the steps I then followed:
  • I followed the directions for from the article, doing the "apt" update and full-upgrade, editing the file "/etc/defaults/rpi-eeprom-update" and performing the "rpi-eeprom-update" followed by a reboot.
  • After the update, I checked the firmware with "vcgencmd bootloader_version", but it reported the old firmware.
  • I disconnected the external HD and booted off the 32 gig SD card I had originally installed Raspbian on and ran the same steps again.
  • After reboot, the "vcgencmd" reported the expected May 15th date.
  • I connected the USB drive; all of the partitions of note on the HD auto-mounted under "/media/daniel" (substitute your own username for "daniel"). I copied all of the files from the current "/boot" to the HD's boot partition (/dev/sda1), then edited the "etc/fstab" on /dev/sda5 to mount /dev/sda1 for "/boot" instead of the SD card partition.
  • I shut down the Pi, turned off the power, and removed the SD card. Turned the power back on.
  • It tried to boot. The monitor showed a text console telling me that it could not find "recovery.elf" and that "start.elf" is not compatible, and I should download the latest from a URL. I turned it off and put my usual boot SD (an 8 gig with a modified "cmdline.txt" file to put root on /dev/sda5) into the board, powered the PI back up and it booted fine.
  • I went to the Raspberry Pi "downloads" link and read the release notes for the beta bootloader. It said the ".elf" files would be made available soon. I didn't see any new ".elf" files in the repository.
  • I checked around, and found another article that included using the command "rpi-update" after the "apt full-upgrade", with a reboot after the "rpi-upgrade".
  • I ran "sudo rpi-update" and confirmed that I wanted to do it. It took a little while, but it completed without errors.
    • Note: Because I had edited the "/etc/fstab" on /dev/sda5, when I ran "rpi-upgrade", it put the new files in the vfat filesystem on /dev/sda1, not on the SD card from which the Pi actually booted. This installed the correct "start.elf" on the hard drive.
  • I rebooted with the SD card, then ran the "rpi-eeprom-update" again, just to be safe.
  • I rebooted once more with the SD card and verified that "vcgencmd bootloader_version" reported the correct boot firmware.
  • I shut down, removed the SD card, and turned the Pi back on.
  • The scary messages about not finding "recovery.elf" still appeared, but after a few seconds, the screen blanked, then went through what's pretty much the normal boot (screen has a flashing text cursor in the upper right hand corner, then the cursor goes away, and after a while, the login screen is displayed.)
I now have a Pi 4 that boots from an external USB 3.0 hard drive without an SD.

I hope this rather disorganized and overly long description helps someone.
 

deesider

Commendable
Jun 15, 2017
56
10
1,545
3
Any idea if this will enable the Raspberry Pi 4 to be a viable Plex Media Server?
It already was before. This latest update doesn't make a huge difference, it just allows for the USB drive to completely replace the SD card. Previously the SD card was still required for the boot files and the root file system could be located on the USB drive.

The access speed for files from the drive will certainly be fast enough. The limiting factor for use as a Plex server is whether any transcoding needs to take place on the Pi. If it does it will struggle.
 
Reactions: RobU
May 24, 2020
1
0
10
0
As noted in a reply above, if you flash the Noobs image to your USB or SSD drive your Pi will not boot. You need to use a plain version of Raspbian. The Noobs image has a recovery partition before the boot partition that prevents booting. The Pi imager has plain images
 

cwoodhouse

Distinguished
Feb 3, 2010
2
0
18,510
0
These instructions resulted in an error and also caused my pi to stop booting from the SD card.
When restarting after removing the SD card, I got an error on the bootloader screen saying:
Invalid ELF header: 'start_x.elf' Firmware not found
I got same error.

Used the method in this link: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md

Basically, instead of downloading from Github, use rpi-update to update the boot sector on the SD, then copy *.dat and *.elf from the SD card to the \boot directory on the SSD (I did that in the Windows environment).
 
May 25, 2020
5
0
10
0
i'm just wondering the reason for pointing people to do a

sudo apt update
sudo apt full-upgrade

its completely unnecessary, just edit rpi-eeprom-update to beta channel, sudo run rpi-eeprom-update to pull down beta bootloader, install and profit..

on top of that, why get peeps to run vcgencmd bootloader_version ... again just run rpi-eeprom-update .. it'll straight up compare ver running to latest.. booshaka

~ $ rpi-eeprom-update
BCM2711 detected
BOOTLOADER: up-to-date
CURRENT: Fri May 15 10:05:52 UTC 2020 (1589537152)
LATEST: Fri May 15 10:05:52 UTC 2020 (1589537152)
FW DIR: /lib/firmware/raspberrypi/bootloader/beta

am i missing something here?? just seems like a few unnecessary steps in the guide
 
Last edited:
May 26, 2020
1
0
10
0
Thanks for a nice guide!
Is it possible to do something similar on Ubuntu64-raspberry system?
 
May 27, 2020
1
1
15
0
These instructions resulted in an error and also caused my pi to stop booting from the SD card.

When restarting after removing the SD card, I got an error on the bootloader screen saying:

Invalid ELF header: 'start_x.elf'
Firmware not found

And it would keep repeating and showing this error.

Then I tried reinserting my SD card and now it is showing the same error, even without the USB drive plugged in.

What has happened? I can't boot using my original SD card.

This was my experience also when I tried yesterday. Then, last night (5-27-20) updated files were placed on github. Using those files, and following these directions, was successful. I can now boot either from microSD or from a Samsung EVO ssd drive through an adapter off the shelf from Best Buy.

Good luck!
 
Reactions: CS_J
May 23, 2020
4
0
10
0
This was my experience also when I tried yesterday. Then, last night (5-27-20) updated files were placed on github. Using those files, and following these directions, was successful. I can now boot either from microSD or from a Samsung EVO ssd drive through an adapter off the shelf from Best Buy.

Good luck!
Thank you for this info! I will try it out soon.
 
May 23, 2020
4
0
10
0
Finally got it working with the new instructions. Downloading the .dat and .elf first then copying to sdd boot folder may have been introducing a problem on Mac (Save Link As). After downloading the zip then extracting and copying over the files, it worked.
 

apiltch

Editor-in-Chief
Editor
Sep 15, 2014
153
11
10,695
1
The reason I pointed to the Github archive for this (instead of recommending copying off your microSD card which is the official method) is that newer versions of the *.elf files break USB booting and, if your microSD card has them, this may not work. It's important to download the whole repo as a .zip file because if you just visit github and right click on the file names and "save link as" you're not actually getting the full files.
 
May 30, 2020
1
0
10
0
I applied this, and it worked flawlessly. I did have to install Firefox, because I was unable to download the required .elf and .dat files with Chromium. It can probably do it, but it was simpler for me to just install the browser that I know how to use.

The image copier tool is nice - my SSD is larger than the SD card, and the tool preserved that large size of the SSD. That probably means it actually creates a filesystem and copies files, rather than just doing a byte copy of the device.
 
Dec 19, 2019
2
0
10
0
These instructions resulted in an error and also caused my pi to stop booting from the SD card.

When restarting after removing the SD card, I got an error on the bootloader screen saying:

Invalid ELF header: 'start_x.elf'
Firmware not found

And it would keep repeating and showing this error.

Then I tried reinserting my SD card and now it is showing the same error, even without the USB drive plugged in.

What has happened? I can't boot using my original SD card.
Why are you doing this on an SD card. The instructions are for updating the *.dat and *.elf files ON THE USB DRIVE.
 

User360

Honorable
Jun 29, 2013
74
0
10,630
0
Any idea if this will enable the Raspberry Pi 4 to be a viable Plex Media Server?
Used it for PMS for a while. It depends on your client device - if it's a chromecast or Roku, you can expect 720p and 1080p if you're lucky (flaky 1080p support depends on codex supported). If you use Kodi you could probably use it more reliably as a PMS (so PI -> PI playback) but you might still get the occasional flaky support.
 
Jun 4, 2020
1
0
10
0
Am I missing something? I've done all the steps as described, and with the later June version of the bootloader too. All that happens when I power on the RPi4 without an SD card is it stops and says, "Please insert an SD card". It won't go any further until I put the SD card back in.

This is an 8GB RPi4 in case that makes any difference.
 
Jun 5, 2020
1
0
10
0
I've just followed the instructions on my Pi 4b and worked flawlessly (I also didn't need to copy the files mentioned, although that may be specific to my setup)

Using the below as the latest:
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2020-06-03.bin


The only issue I did have was several services failing to load on boot, I'm guessing this was due to increased power consumption on the USB3 port perhaps, it working fine on the USB2 port..
 

swcrapser

Prominent
Nov 23, 2018
11
0
510
0
I have somewhat related questions but first here's where I'm currently at:

I have a brand new setup with a RPi4 (4GB) and a Samsung M.2 NVMe SSD (250GB) attached via components from Geekworm (X872/X735/X857-C1). I have a 32GB SD micro with NOOBS. I'm waiting for a cable to hook my rig up to a monitor that uses a DVI-D which should arrive Tuesday, June 9th. I have done nothing with this brand new setup other than assemble the hardware. In the meantime, I'm doing my homework and found this discussion.

My question is what should I do when initializing the M.2 SSD? Do I use MBR or GPT/GUID? If I need to use MBR, can I set up a small partition for the boot and use GPT/GUID for the rest of the drive partitions I make? There isn't a lot of discussion on these aspects of setting up an external SSD drive. I think this is because the M.2 NVMe and other SSD drive types are all throttled by the USB3 capabilities so perhaps there hasn't been enough people working with them to generate a lot of discussion.
 

ASK THE COMMUNITY

TRENDING THREADS