top | item 24520397

Raspberry Pi 4 can finally boot directly from USB

672 points| ethanpil | 5 years ago |github.com | reply

261 comments

order
[+] Uehreka|5 years ago|reply
This sounds pretty cool! Features like this really open up exciting ways to deploy RPis, even for DIY folks like me who use them to do things like control projectors in a theatre show.

But man oh man, this page is a striking reminder that GitHub could probably use finer grained controls for commenting on issues. I sympathize with the person who wanted to close the issue originally, it looks like it just became a magnet for "Are we there yet?" seat-kicking and "I prefer commenting to thumbs-upping" spam. If there isn't already, there should be a way to toggle a single issue so that anyone can react but only org members can comment.

[+] Wowfunhappy|5 years ago|reply
You can already lock conversations to collaborators. I can see how the ability to do that while still allowing reactions would be a pleasant enhancement, but it doesn't strike me as such a significant limitation.
[+] FullyFunctional|5 years ago|reply
Honest question, why couldn't you do this before, having the boot loader on an SDcard and everything else hanging off USB?
[+] LeoPanthera|5 years ago|reply
Best decision I ever made was setting up a Pi netboot server on my LAN. Now I have a whole bunch of Pi 3's and 4's scattered around my home with no local storage at all doing cool things, and I can make them boot into a completely different OS just by renaming a symlink on the server.
[+] umvi|5 years ago|reply
> Now I have a whole bunch of Pi 3's and 4's scattered around my home with no local storage at all doing cool things

Elaborate? I have a single pi3 as a Plex server, looking for more ideas.

[+] giancarlostoro|5 years ago|reply
Can you host the netboot server from a workstation by chance? This is something I had never considered and it would really change things up for me, how does that even work? Is it just an installed distro or just a network image on the device it's booting from? I'm somewhat familiar with netbooting an installer but I've never setup a server just used the tech to install an OS from the network to hardware.

I did bump into these docs:

https://www.raspberrypi.org/documentation/hardware/raspberry...

Are these the gist of it, or did you do a little more?

[+] chaz6|5 years ago|reply
How do you handle persistent storage? I find it is often non-trivial to adapt an appliation-specific operating system to run via pxe boot.
[+] mmastrac|5 years ago|reply
What are you using for a filesystem? NFS?

My worry would be saturating the older 100Mbit connections when downloading things like docker images.

[+] zbrozek|5 years ago|reply
I did this, but using a more traditional server. It was... OK. The pi3b+ bootloader was flaky and I ended up needing an SD card with just the kernel on it, but I wanted it ro. This made updating kind of touchy.

I can imagine that if they've made the bootloader more robust on the pi4 that this is truly excellent now.

[+] terrywang|5 years ago|reply
That requires your network attached storage (NFS/iSCSI or something else) to be HA ;-)

I started booting from USB SSD a couple of months ago since I got my Pi 8GB, intended to use it as my low power consumption workstation replacing the Optiplex SFF Running Manjaro + KDE Plasma. Turn out to be, Manjaro ARM + KDE Plasma on Pi 4 runs pretty well (even all KWin eye candies work as well as the Intel HD integrated GPU on the x86_64 variant). However, USB 3.0 to SATA III SSD is clearly a bottleneck still. I am yet to check if NFS over 1Gbps ethernet can be faster (anyway, my btrfs backed consumer grade NFS may not be production grade to support 10+ devices).

[+] mikorym|5 years ago|reply
What happens when you get a power cut?

Or, assuming you are from a well functioning country, what would happen and how would you restart?

[+] abhishekjha|5 years ago|reply
> just by renaming a symlink on the server.

Wow. How?

[+] JamesSwift|5 years ago|reply
Thats awesome. I asked about people netbooting for retropie in reddit and people were really confused why I would want to do that. I think I'm going to go ahead and set it up now.
[+] fulafel|5 years ago|reply
Whaty the best way to do this without trusting the untrusted LAN?
[+] r22z|5 years ago|reply
Pantera, é você? :-O
[+] jes5199|5 years ago|reply
what hardware does the netboot server run on?
[+] vkaku|5 years ago|reply
This is such a misleading title. 2 and 3 have had this for a while, one can do this with 4.

I'm currently using a recent MicroSD card on my Pi 4 though, haven't had any real issues with it.

[+] tyingq|5 years ago|reply
"Finally available for the RPI4 in the default bootloader" is probably more accurate.
[+] _x5tx|5 years ago|reply
Honest question, why did this take so long? Is this feature technically too difficult to implement?
[+] rwmj|5 years ago|reply
Good timing! Only today I was following these instructions to install 64 bit Fedora on a RPi 4B, booting from a USB 3 drive:

https://fwmotion.com/blog/operating-systems/2020-09-04-insta...

(Unfortunately I didn't get to the end because my ancient spinning-rust USB drives take up a bit too much power to work reliably without a powered USB hub, so now I have to wait for some SSD-based USB drives to be delivered.)

[+] systemvoltage|5 years ago|reply
Not a fan of Raspberry Pi. It hides behind proprietary Broadcom chip, no DSI/MIPI support and you're at the mercy of Raspberry PI for any sort of commercial implementation (RPi Zero and independent module). They do guarantee upto 2026 availability for their DIMM modules which is nice. We wanted to build commercial device using RPi but its a no go due to its blackbox nature.

What they should do is to leverage their position in the market and convince Broadcom to open source the bootloader and drivers. There are a bunch of binary blobs from Broadcom that are a mystery as to what they do. No docs, no anything. HAL layer is completely at the mercy of Raspbery Pi.

Raspberry Pi is an ecosystem which is based on proprietary technologies and masquerading as an open source friendly thing.

If you want to support proper open source development (I understand, at some point things get proprietary the closer you get to the hardware, but with RPi, there isn't even a datasheet for the processor that you can get your hands on), buy Beagle board and other alternatives.

[+] pronoiac|5 years ago|reply
Oh man I feel for the maintainers here, with the many "this isn't the place for that" and now-deleted comments.

It's on my mind, as I just set up a vpn gateway on a Pi, and while I sorta want to document the process, I don't want to support randos.

[+] ggm|5 years ago|reply
Yes, the sense of frustration in the threads is palpable. Its a no-win situation: bleed time/labour dealing with "no" answers and the consequences, and get hated, or, be harsh up front, and get hated.
[+] 627467|5 years ago|reply
I'd love to boot my por from usb as I have plenty of usb sticks/disks and not many as cards. Is there a performance benefit to this?
[+] silicon2401|5 years ago|reply
As a pi noob: does this make it more reliable/feasible to use a pi to run a home server/application/etc? I've read in the past that SD cards aren't good with repeated read/writes, which makes it somewhat unreliable in the long run. If a pi is configured to run via USB, does that make it as reliable as other consumer hardware like a pc/laptop?
[+] jagger27|5 years ago|reply
Other commenters in this thread have mentioned netbooting their Pis to avoid that exact issue. A typical USB flash device won't be any more reliable than an SD card, though it might be better cooled.
[+] greghines|5 years ago|reply
Several manufacturers offer endurance-oriented microSD cards. They're designed to store footage from security cameras and the like, so they should have the write endurance to handle most any workload you throw at them. Depending on the write endurance you desire, they range from only a few bucks more than a regular microSD card to roughly double the cost.
[+] jccooper|5 years ago|reply
You could always use a real drive for storage on some mount point, or even as an overlay on a read-only SD card. Being able now to boot directly off a SSD is more convenient, though.
[+] Florin_Andrei|5 years ago|reply
My router / firewall is an RPi3 booting from a USB drive. A regular SD card would wear off after a few months, but a USB drive will last a long time.
[+] AgloeDreams|5 years ago|reply
I have a Pi4 set up to do this with a cheap Walmart portable SSD, it all has been far more reliable and faster than microSD.
[+] del_operator|5 years ago|reply
Been using my Pi 4 8GB with K3s and found it to already be quite enjoyable. I’ve seen some odd things being new to the Pi. I started off with the full desktop raspberry os and saw my usb storage devices weren’t mounted when I did not connect my a monitor or set a default resolution in rasp config.
[+] etaioinshrdlu|5 years ago|reply
Which devices now support this? Does this require updating some built-in flash/eeprom memory?
[+] Abishek_Muthian|5 years ago|reply
Almost all of my SBCs run from USB storage, the performance improvements over SD card are obviously night and day; but I never had success with the direct boot from USB(official methods) and had to jump from SD card to USB storage after boot i.e. having only /boot on SD card. RPi 4 being newer, I assume it's designed with USB boot in mind and perhaps USB boot might work better than earlier iterations.
[+] gorgoiler|5 years ago|reply
Can you elaborate on the performance improvements over SD card?

(I have always assumed that the SD card had a much faster, more performant bus than USB. It sounds like that’s wrong?)

[+] geerlingguy|5 years ago|reply
FYI the EEPROM page in the Raspberry Pi docs still says:

> USB boot support is currently being beta-tested. See > the "USB mass storage boot" section of the Bootloader > Configuration Page for further details.

But in general, it seems like it works without having to change your 'FIRMWARE_RELEASE_STATUS' setting from 'critical' to 'stable' anymore.

[+] snvzz|5 years ago|reply
Rpi4 and still no usb version of bootloader. What am I missing?

    # rpi-eeprom-update
    BCM2711 detected
    BOOTLOADER: up-to-date
    CURRENT: Tue 10 Sep 2019 10:41:50 UTC (1568112110)
     LATEST: Tue 10 Sep 2019 10:41:50 UTC (1568112110)
    VL805: up-to-date
    CURRENT: 000137ab
     LATEST: 000137ab
I wish this was better documented.
[+] simongr3dal|5 years ago|reply
You gotta do:

  $ sudo apt update
  $ sudo apt upgrade
  $ sudo apt dist-upgrade
Then do a restart and the bootloader should be updated, if that doesn't work you also need to do a:

  $ sudo rpi-update
Now the eeprom should be updated and the default option should be to boot from SD, then USB.
[+] maxioatic|5 years ago|reply
Might be a silly question because I'm a noob in this area, but:

Does this work with the official Ubuntu images or only Raspbian?

[+] paines|5 years ago|reply
From the github page (https://github.com/raspberrypi/rpi-eeprom/issues/28) you can see that this needs an updated firmware which you can install via rpi-update. Never used Ubuntu on the Pi only raspbian, but I am sure they also have those rpi tools. How does Ubuntu run on the Pi work? I never got passed installation, because after install the first boot just hangs. It seems to me it wants to install additional stuff via ethernet which in my case is not attached and I never had the option to configure wifi....
[+] amelius|5 years ago|reply
Now if someone could make this possible across NVidia's Jetson platform ...
[+] yjftsjthsd-h|5 years ago|reply
It's pretty tied to the hardware. Closest obvious option might be to boot your board to uboot and then chain to the real payload?