48 ms·
Raspberry Pi 4 can finally boot directly from USB
- sdfhbdf 6y agoFrom this page [1] on Raspberry Pi's Docs it seems like it's been like that for a while. Had there been a big change with this ROM specifically? [1]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- deleted 6y ago[deleted]
- m463 6y agoI know it was in beta. Maybe it's now the default? "USB msd boot support is now available in the default bootloader version 2020-09-03" (although the page you reference doesn't really reflect that - see the last paragraph)
- kekub 6y agoI can confirm that it is the default now. I installed a PI4 yesterday (ordered it right after release). I installed Raspberry Pi OS on an sd card first. When I tried to update eeprom, it was already up to date. After flashing the RPI OS image on an ssd, it worked perfectly fine. I did not have to touch a command line to make it boot from ssd.
- angryold 6y agoIt was previously in beta (may still be). I've been using this feature for some time now (at least 2-3 months I feel?).
- kaszanka 6y agoThe bootloader with USB support was first marked "stable" on 2020-06-17. This post is about a firmware with USB boot support being released on the "critical" update channel, which Raspbian will install by default without any user intervention.
- sokoloff 6y agoI've been doing this on a 3B for almost a year now. (At least I think it's a 3B; it's not a 4 in any case. The article title has since been updated to clarify that the change is relevant to the 4.)
- kondu 6y agoIIRC, enabling usb mass storage boot involves setting some OTP bits, which permanently disables usb host boot. But AFAIK, the 3B doesn't support usb host boot anyways. Is there any feature you could lose by enabling mass storage boot in this case?
- sokoloff 6y agoI think (but haven't checked) that you lose the ability to boot from a microSD. I just switched it to USB because I wanted higher reliability for a semi-permanent installation and never checked if it would boot from SD if I removed the USB.
- tzs 6y agoIt will still boot from SD. Enabling USB boot just adds USB booting at the end of the list of things checked to boot from.
- sokoloff 6y agoThanks. I wonder what's with the dire warning about changing the OTP bits then? https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- tzs 6y agoThe dire warning is mostly for the 3A+, where enabling USB host boot mode (which allows booting from USB mass storage devices) will permanently prevent booting in USB device mode. (Maybe...see below). Device mode is only supported on the Compute Module, CM3, Zero, Zero W, A, A+, and 3A+, so if you don't have one of those there is nothing to worry about as far as this goes. It still deserves a warning on other models, but not a dire warning. It's still permanent, but it is much harder for that to be a problem. It will only be a problem if you are going to have situations where you will have a bootable USB drive attached at boot time, without a bootable SD card inserted, and you will want it to not boot rather than boot from the USB drive. Although OTP changes are permanent, it looks like there is still a way to sort of work around the USB host boot mode one, albeit at a cost of losing access to 7 GPIOs or at least making them a lot harder to use. With another irreversible OTP change, you can tell your Pi to determine what devices to consider booting from by looking at 7 GPIOs [1]. Using GPIO boot mode, you could easily switch between SD card only, USB only, and SD followed by USB, and device mode, by just changing pull up resistors on the relevant GPIOs. [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/gpio.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- Florin_Andrei 6y agoI believe this applies to the RPi4 only.
- btgeekboy 6y agoThe 4 is a bit different under the hood (as evidenced by the different procedures). There was support on the older models, while the 4 launched without it.
- lioeters 6y agoI see in the docs for "Pi 4 Bootloader Configuration", under the BOOT_ORDER setting: - 0x4 - USB mass storage boot (since 2020-09-03) https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md#usbmassstorageboot https://www.raspberrypi.org/documentation/hardware/raspberry...
- etaioinshrdlu 6y agoWhich devices now support this? Does this require updating some built-in flash/eeprom memory?
- rwmj 6y agoThe bottom of this page has the instructions for it: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md https://www.raspberrypi.org/documentation/hardware/raspberry... It doesn't seem to say which specific versions support it, so perhaps all of them?
- JonathonW 6y agoThat page is for the Pi 4; it has a somewhat different boot setup than earlier versions. Instructions for USB boot on Pi 2 and 3 variants are here; this has been officially supported for a few years now (Pi 4 took longer because its boot process is different): https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- sigjuice 6y agoI just did an "apt dist-upgrade" and looks like my EEPROM got updated. These are the before and after versions. pi@4b:~ $ vcgencmd bootloader_version Apr 16 2020 18:11:26 version a5e1b95f320810c69441557c5f5f0a7f2460dfb8 (release) timestamp 1587057086 pi@4b:~ $ vcgencmd bootloader_version Sep 3 2020 13:11:43 version c305221a6d7e532693cc7ff57fddfc8649def167 (release) timestamp 1599135103
- rwmj 6y agoGood 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-installing-fedora-server-onto-pi4/ 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.)
- AgloeDreams 6y agoI 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.
- Uehreka 6y agoThis 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 6y agoYou 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 6y agoHonest question, why couldn't you do this before, having the boot loader on an SDcard and everything else hanging off USB?
- segfaultbuserr 6y agoYou can. See the other comments.
- omnifischer 6y agoPlease add rpi4 to the title
- loop0 6y agoHonest question, why did this take so long? Is this feature technically too difficult to implement?
- Jaruzel 6y agoAs I understand it - the Pi4 has completely different USB hardware.
- pronoiac 6y agoOh 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 6y agoYes, 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.
- web007 6y agoI feel like the RPi reps were incredibly condescending and rude in the thread. Starting with the immediate closing as a support request they were off on the wrong foot. Once they reopened, if people are looking for one place to follow for "can I boot from USB?" then their responses were between pointless and confusing: "We have this thing updated, but it's not ready for anyone to use" so why did they send an update? Followed predictably by "So when can we use it?" Then they threaten the user asking about it and lock the thread, only to unlock it the next day. All the while none of that matters, because only this week they finally got whatever was left finished (GPU firmware?) so it can work.
- ggm 6y agoI do get this, but i also get the other side. The sense of entitlement inherent in the requests, the frustration of people who can't be bothered to read before posting (I am btw, a serial offender of this, in FreeBSD land)
- geerlingguy 6y agoFYI 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.
- FullyFunctional 6y agoIt's nice but I'm honestly baffled that it's seen as such a big deal as it's pretty trivial to make grub boot off USB, leaving the SDcard only being used doing the initial boot. Is it just about the convenience?
- FullyFunctional 6y agoInstead of downvoting me, maybe you could explain what I'm missing?
- boredpenguin 6y ago> Instead of downvoting me, maybe you could explain what I'm missing? I didn't downvote you, just my opinion: > it's pretty trivial to make grub boot off USB, leaving the SDcard only being used doing the initial boot In that case you still need an SDcard, and it requires manual setup. With this you can truly boot from USB drives easily WITHOUT the SD card.
- vaccinator 6y agoYou have to update it using an SD card?
- progval 6y agoAfter the initial update, you can use it for something else.
- mayli 6y agoThere is no grub
- alanfranz 6y agoYou need two parts instead of one. I'd need a microsd just to boot. And most people would then use a usb drive because they're usually faster, especially with USB 3.0. So, the microsd is an unnecessary hassle and additional component. That's why people are so happy (and it used to work on rpi3 since years).
- vkaku 6y agoThis 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 6y ago"Finally available for the RPI4 in the default bootloader" is probably more accurate.
- 627467 6y agoI'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?
- maxioatic 6y agoJeff Geerling has some great and very detailed write ups on this. To quote directly from his post: "The results really speak for themselves. For sequential operations, using a USB SSD is 3-4x faster than using a microSD card."[0] [0] - https://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd https://www.jeffgeerling.com/blog/2020/im-booting-my-raspber... [1] - https://www.jeffgeerling.com/blog/2020/fastest-usb-storage-options-raspberry-pi https://www.jeffgeerling.com/blog/2020/fastest-usb-storage-o...
- geerlingguy 6y agoJust posted more results talking about TRIM and UASP support too! https://www.jeffgeerling.com/blog/2020/raspberry-pi-usb-boot-uasp-trim-and-performance https://www.jeffgeerling.com/blog/2020/raspberry-pi-usb-boot...
- maxioatic 6y agoI thought you'd stop by this thread! Thanks for all your work, it's very helpful and much appreciated.
- cogburnd02 6y agoI wonder if this will help improve its status on https://www.fsf.org/resources/hw/single-board-computers https://www.fsf.org/resources/hw/single-board-computers, moving it out of the category of SBCs which have "fatal flaws"
- yjftsjthsd-h 6y agoBoot media isn't the problem, proprietary firmware is, and that's not changing here.
- cogburnd02 6y agoSo where does the firmware reside? On the sd card/usb drive? Or on a chip on-board? Or somewhere else I haven't thought of?
- yjftsjthsd-h 6y agoI believe the main blob is loaded from the SD card and boots the GPU, which then starts the CPU and loads the OS (the Pi architecture is weird), although I suppose there must be some tiny blob on a chip on the actual Pi board to load that stage from the SD card. There's an attempt to make an replacement for the part on the SD card: https://github.com/christinaa/rpi-open-firmware https://github.com/christinaa/rpi-open-firmware
- LeoPanthera 6y agoBest 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.
- mmastrac 6y agoWhat are you using for a filesystem? NFS? My worry would be saturating the older 100Mbit connections when downloading things like docker images.
- mkj 6y ago100mbit is similar to a slow sd card or usb stick anyway?
- takeda 6y agoThat's more a problem of docker than NFS though. You probably would be better if you just use it traditionally or use something like NixOS. There was a project that I read about a while ago: https://matthewbauer.us/blog/nixiosk.html https://matthewbauer.us/blog/nixiosk.html
- threentaway 6y agoThe Pi4 can do 300-350mbps, which is faster than most people's internet connection.
- vetinari 6y agoNetbooting and mounting NFS root would be done over local lan, the speed of internet connection has no relevance there.
- threentaway 6y agoRight, I was referring to my parent comment that talked about pulling Docker images which come from the internet unless you set up a proxy.
- systemvoltage 6y agoNot 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.
- stevefan1999 6y agoAgreed. Thoe closed-source blobs and lack of docs also made it hard for WoA folks to write proper drivers for RPi4. I remember they had this beyond 3GB PCIE memory corruption issue for quite a long which is only recently fixed. I hope they can reverse engineer the GPU tho, it is nightmarish.
- colordrops 6y ago> Raspberry Pi is an ecosystem which is based on proprietary technologies and masquerading as an open source friendly thing It depends on what layer you care about. At the application layer it is completely open. Even if the chip designs and drivers were open source, you could claim that there are proprietary processes and supply chains for the hardware and material themselves. Unless amateurs could build one from scratch you will never be satisfied.
- systemvoltage 6y agoI mean, you're not wrong and it is open source at the app layer but it's not like Raspberry Pi is a purely software product. They're a hardware company, acting like a maker friendly, open source device - similar to Arduino (which btw is totally open source, even the bootloader and you can get data sheets for every single component on it), but it falls short with only the top app layer being open source. The middle layer (HAL, drivers, etc.) is all closed source. And hardware is closed source. It's ok to be closed source IMO, but they should not be marketing themselves like Arduino folks.
- maxioatic 6y agoMight 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 6y agoFrom the github page (https://github.com/raspberrypi/rpi-eeprom/issues/28 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....
- maxioatic 6y agoHmm, I'll have to check it out. I think it works great. Using the 64 bit 20.04 and now 20.04.1, I've had no problems with my 4 4Gb Pi4s (so many 4s!). You should be able to set up the wifi using netplan, although I do only run mine wired so haven't tried it.
- ComputerGuru 6y agoIt’s not clear what method you used but for the benefit of others: Don’t install Ubuntu, it doesn’t have the needed closed source firmware blobs and isn’t compiled with some of the kernel modules the Pi uses. Instead burn a copy of the preinstalled Ubuntu Raspberry Pi disk images to an SD card. Downloads here: https://ubuntu.com/download/raspberry-pi https://ubuntu.com/download/raspberry-pi 64-bit is only supported on newer 3B and 4 devices and is missing some Pi-specific features.
- amelius 6y agoNow if someone could make this possible across NVidia's Jetson platform ...
- yjftsjthsd-h 6y agoIt's pretty tied to the hardware. Closest obvious option might be to boot your board to uboot and then chain to the real payload?
- silicon2401 6y agoAs 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 6y agoOther 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.
- ComputerGuru 6y ago> A typical USB flash device won't be any more reliable than an SD card, though it might be better cooled. That’s not strictly true, as the USB storage controller abstracts away the NAND and can manage wear leveling and free blocks. There are also more “enterprise class” USB sticks than SD cards, and the USB3 interface to USB drives is much faster than pretty much any SD card interface. Best SD cards and best USB drives are Sandisk Extreme Pro, built entirely differently from their other lines. While Samsung Evo SSDs are top-of-the-line in each budget class, stay far away from their Evo SD cards which shamelessly borrow off the SSD reputation then drive it to the ground. They all tend to go read-only after undergoing “extended” writes. Suggestion: if you’re using Linux, stay away from the ext family of file systems when using SD cards. Use nilfs or f2fs, and XFS if you absolutely must use a journaled fs.
- GekkePrutser 6y agoCan confirm the read only. Indeed had it with 2 cards now. It's really annoying because the OS still caches writes in RAM so you only find out when you reboot and all your changes are lost. Still, not quite as bad as completely corrupting I suppose...
- greghines 6y ago
- agustif 6y agoIs thhere any way to use OS X on a Pi? Asking for a friend
- yjftsjthsd-h 6y agoTechnically it should be possible, since Darwin at least used to run in qemu. But... it's gonna suck performance-wise, since you're emulating x86_64 on AArch64, and of course I don't need to remind you of the legal issues. And, for that matter, that we're basically talking about a hackintosh VM, so don't expect long-term stability.
- askvictor 6y agoOnce OSX on ARM arrives, this would be a lot easier; however, I'd expect Apple's silicon would be a lot newer (and have more instructions) than the rpi's, so it might not end up being possible/feasible.
- agustif 6y agoNice one, can't wait to try it! hope hackintosh is still a thing then
- loxias 6y agoI've run OS X on a very low powered Debian box before. I'd wager it could be made to run on a raspi 4 (VERY SLOWLY) with sufficient effort. (you'd have to use qemu TCG, not KVM). It would be easier to run on a SBC that uses an x86_64 chip, like the Atomic Pi, or LattePanda. I'm curious though, why in the world would you ever want to run OS X so slowly?
- pmarreck 6y agoCan I boot on ZFS root yet?
- Abishek_Muthian 6y agoAlmost 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 6y agoCan 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?)
- Abishek_Muthian 6y agoSorry, that's not the case. Also I'm on USB SSD, which I should have mentioned. Even UHS card with over clocked card reader can reach only ~ 40 MB/s on RPi[1]. [1]https://www.jeffgeerling.com/blog/2019/raspberry-pi-microsd-card-performance-comparison-2019 https://www.jeffgeerling.com/blog/2019/raspberry-pi-microsd-...
- snvzz 6y agoRpi4 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 6y agoYou 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.
- snvzz 6y agoThat's the easy way for Debian or Raspbian users, sure. But I am on archlinuxarm. I have used rpi-eeprom-update in the past with no issue, but it won't see the update this story is about, for reasons unknown.
- snvzz 6y ago... figured it out. rpi-eeprom is not in archlinuxarm, but rather, I did install it ages ago from the AUR, manually. There's a new version, which does the trick. It turns out, the updater does not look online for the latest version as I'd imagine it did, but rather, it looks at a local path, and the hope is that the distribution will take care of the latest firmware being in that path for you.
- kingosticks 6y agoThere is a section of the documentation labelled 'Updating the bootloader' at https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- del_operator 6y agoBeen 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.
- teslalang 6y agoBig improvement over having to use SD chip!