6

I want to run Raspbian from a USB flash drive on a Raspberry Pi 3B+.

What would be the performance difference in doing so, as compared to running Raspbian from an SD card?

4

I've been doing it for years and currently have a Pi2, Pi3 and Pi4 booting from external USB HDDs. The main advantages are bigger capacity and reliability, I've found SD cards easily get ruined by power interruptions but not the USB HDDs

| improve this answer | |
  • Pi4 booting from external USB HDD - please share how you've managed this - is this a recent development (last week or so) – Jaromanda X Jan 30 at 3:30
  • 1
    It's not a recent development, as I said in my answer I've been doing it for years. You do need an SD card in some instances (e.g Pi4) to tell the Pi to boot from USB. See here for comprehensive documentation raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/… – Bra1n Jan 30 at 12:10
  • @Bra1n I'm not sure how you've been doing it "for years" on the Pi4, the page you linked to says that this is a feature that will be added "in the future" for the Pi4. The Pi4 has only been out for 6 months. This seems to be a guide but I'm not sure as to its effectiveness (it looks pretty tedious). – Ron Beyer Jan 30 at 18:41
  • RonR has released a script that automates the tedious process of a hybrid USB boot setup for the Pi 4. – Botspot Jan 30 at 20:39
  • I didn't say I'd been doing it for years with a Pi4, obviously I couldn't when it didn't exist, I just said I'd been doing it for years (ie with Pi2 and Pi3) and then stated what I currently have booting from USB HDDs (Pi2, Pi3 and Pi4). It's not at all tedious and quite simple to implement. – Bra1n Jan 30 at 22:10
3

You are using a Raspberry Pi 3B+. This model supports booting from an USB storage device instead of a SD Card out of the box. Just flash the USB flash drive as you do with a SD Card, put it into an USB port and be sure you do not have an SD Card inserted. Otherwise it would boot first from the SD Card. For details look at USB mass storage boot.

| improve this answer | |
  • 1
    It hasn't asked about "how to boot raspberry pi with a usb flash drive". – M. Rostami Jan 29 at 23:15
  • 2
    @M.Rostami What do you think does it mean: "running Raspbian through USB Flash Drive instead of SD Card?" How to boot without an SD Card? – Ingo Jan 30 at 1:11
  • 2
    As the question body, "Just want to know the Performance compared to SD Card." – M. Rostami Jan 30 at 6:29
  • 1
    Older Raspberries may need a firmware update in order to be able to boot on USB. – Thorbjørn Ravn Andersen Jan 30 at 20:41
2

The Raspberry Pi 3B + supports USB 2.0 specification which allows for transfer speeds up to 480Mbit/s or 60MByte/s.

USB flash drives can reach up 33MBytes/s, but there seem to be some limitations in the NAND itself so it will come down to the type of stick you get. However, the sd-card bus speed can reach up to 20MB/s read on the raspberry pi. So, the better choice here is a high-class USB 2.0 USB flash drive.

On the other hand, the payment would be concerned. It cost much less to buy USB 2.0 USB flash drive instead of a UHS-3/Class 10 sd-card.

In conclusion, I see little benefit in booting from a USB flash stick, the price, and the speed.


Related sources:
Raspberry Pi 3 micro SD card speed
SD Card speed - Pi limitation ?
Max USB stick transfer speed for the pi?
SD Speed Class/UHS Speed Class/Video Speed Class

| improve this answer | |
  • Isn't USB bus shared with the ethernet port? Would SD be a better choice for a network heavy application? That was always an issue when I tried to use mine as a local media server. It would get even slower when I stored everything on an external drive. – zero298 Jan 30 at 13:23
  • "I see little benefit in booting from a USB flash stick, the price, and the speed." - Although in the previous paragraphs you stated that a USB 2.0 flash drive is both faster and cheaper? – MrWhite Jan 30 at 23:44
  • @zero298 Of course you are right. The OS always is writing/reading and it's a job that the SD-Card is handling, and, you are also writing/reading over the local network and each request is a job for that. If you change the media server drive to a USB port storage, it would work better and faster. In fact, you division jobs. Now, think about that the USB port can be faster in writing/reading, no need more explanation. – M. Rostami Feb 2 at 16:47
  • @MrWhite The way that I was show the point maybe is confusing. "I see benefits in booting from a USB flash stick, the price, and the speed." What do you think about this one? || Thank you for the precision. – M. Rostami Feb 2 at 16:51
0

Finally Switched to SanDisk USB 3.0 Flash Drive.

Thank you guys.

All you have to do is.. Use Etcher to Burn to USB. And Open boot/config.txt and add this line to beginning of the file.

program_usb_boot_mode=1

And save the file. Plug In to Raspberry Pi and Enjoy 😋

| improve this answer | |
  • 2
    Doing this will program a bit in the OTP ROM. You should really note that any change you make to the OTP is permanent and cannot be undone! And it isn't necessary with a RPi 3B+. Just pull out the SD Card. Please follow my answer about all of this. – Ingo Jan 30 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.