9

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?

MC Naveen
  • 211
  • 1
  • 2
  • 6

4 Answers4

6

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

Bra1n
  • 1,251
  • 7
  • 7
  • 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 '20 at 03: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 https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md – Bra1n Jan 30 '20 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 '20 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 '20 at 20:39
  • 1
    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 '20 at 22:10
5

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.

Ingo
  • 42,107
  • 20
  • 85
  • 197
3

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 a comparatively small 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

Neil
  • 223
  • 1
  • 4
M. Rostami
  • 4,323
  • 1
  • 17
  • 36
  • 1
    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 '20 at 13:23
  • 1
    "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 '20 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 02 '20 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 02 '20 at 16:51
2

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

MC Naveen
  • 211
  • 1
  • 2
  • 6
  • 3
    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 '20 at 11:10
  • Why make a permanent change when it is not necessary? The 3B+ device will boot from USB if there is no SD card: no configuring necessary – gatorback Nov 10 '23 at 16:43