Booting the Raspberry Pi 4 with an External SSD
ฝัง
- เผยแพร่เมื่อ 15 ม.ค. 2025
- I'll show you how to boot the Pi 4 with an external USB 3.0 SSD, then show some benchmarks that highlight the huge speed difference you get when you run from an SSD versus a microSD card.
Blog post that accompanies this video: www.jeffgeerli...
"Pi 4 a Day" - Watch me try replacing my Mac with a Pi for a whole day: • Pi 4 a Day - Can the 8...
Kingston 240 GB SSD: amzn.to/37IBYCd
Inateck USB 3.0 Enclosure: amzn.to/3dgO4U8
If anyone comes across this video and needs a quick update as of 11/8: I just flashed a 64 bit rom on my Windows 10 host machine using the Rasberry Pi Imager. I just plugged in my solid state in my Windows host and followed the steps like I would on an SD card except I just selected my SSD. Thank you for the video! This runs so much faster! I am using Raspberry Pi's to learn Linux. It's so great!
Thank you Jeff. Following this I can now boot my Pi4 from USB. I also ran a bit of a comparison between my microSD drives and many of my USB drives. USB is clearly faster.
One thing others might learn from my mistake - If you build the USB SSD first, as I did, do not put it in the Pi4 while you run the microSD part of this - because it will give unstable results. Even without the changed files, the Pi4 will open the USB drive /boot directory and start to boot from it. Then you either get a failed boot if the USB is the only drive and has not been modified, or the system will continue the boot *off the microSD card root directory* if it is in it's drive... In that case many of the steps noted will not work as you expect, or as indicated by Jeff.
Great tutorial! I've been running usb boot on the Pi 4 for the last few weeks, and have found the step that involves replacing files on the ssd redundant. Everything seems to now work perfectly fine without this step😁
It's not redundant until a production version is announced, check the github page to see how many different cases are regarding the same issue and no, it's not something we are doing wrong, or maybe you just got lucky. Seriously, there are several factors involved, including SSD internal Sata controller(MJX SATA controller on Samsung Evo 860 SSD's for example work great out of the box), usb to sata adapter compatibility with certain chipsets(ASM1153E variations works great without any mods), different RPI 4 board revisions, etc and we are covering only about raspbian 32 bit OS. Don't even get me started on Ubuntu Server 20.04 LTS 32/64 bit, Berryboot V2.0 and PINN issues with USB boot with latest (pieeprom-2020-06-15.bin).
@@josephtremblant2173 As it turns out the Windows FX10.1 distro (Ubuntu-based) I was playing with, now also refuses to boot from a Crucial 1 TB USB SSD, so back to Raspbian for the time being until they get this a little more stable.🙄
@@josephtremblant2173 With the stable version of the eeprom and the Raspberry Pi OS 64-bit beta, it's no longer necessary to copy those files to the SSD manually.
Great post, tried loads of different tutorials on youtube but this one is the only one that worked. Bravo!!
I just stumbled apon this device and almost instantly ordered one. This looks like a lot of fun. Thanks for the videos.
The separated interfaces make a huge difference, i did a test a while back with read and write speeds and drive format
i used a RPi-4 4gb and a Samsung MUF-128BE4/APC, the pi was running pihole and had smb setup, the PC was windows 10, os drive was a samsung 860 evo ssd, network being full gigabit, test file was a random 4gig iso
average number from the tests were :
FAT32 - 56 Write
72 Read
EXT4 - 90 Write
113 Read, flat lined
Pretty impressed really
I was going to get an Inateck case as listed above. Did you select the case without UASP for a specific reason? The case supporting UASP was only a buck more. Or is there a reason for selecting the case without?
Actually, that's a good question. I just realized my old enclosure is the non-UASP model. But it would be better to get the UASP model, as it could offer a bit more performance and even less CPU usage on the Pi. I might have to order that and do a comparison of the two Inateck models!
@@JeffGeerling I haven't seen a comparison like that before. I think it would be very interesting.
@@bmanske1 I posted it! Lots of good information that I found: www.jeffgeerling.com/blog/2020/uasp-makes-raspberry-pi-4-disk-io-50-faster - I'll also be posting a video later summarizing the information there.
Awesome... Always very informative Jeff, Thank you for sharing.
Hi Jeff, great video and benchmarks! Just one small thing, the x axis in the graph @4:27 still has the "MB/sec" title, even though it should be seconds.
D'oh! Copy-paste strikes again. Thanks for pointing that out.
Thank you for the tutorial! Finally got it working...!
Command for the new stable:
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
Aaaand again!
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2020-07-16.bin
BTW, if this happens to fail again with future updates then just use the following command to determine the version required:
ls /lib/firmware/raspberrypi/bootloader/beta/
@@boost3d831 Better to run /stable rather than /beta versions IMO
Thank you. Finally get mine work by following your video.
Very nice and useful video. Many thanks Jeff.
Note the firmware update has now moved from Beta to Stable
I've been amazed how it seems like people don't know how to do a hybrid boot ? (/boot from SD-card and /, etc. on SSD). Which would mean, only booting is slower and their is no reading/writing to the SD-card under normal operations. Because that set up with give pretty much all the benefits but was already possible without the firmware update.
this is pretty cool. My main issue with the raspberry pi is I was running HomeAssistant on it. I'm sure as you know it didn't take long for the SD card to bog down on me due to the small number of read/writes available. I'm going to give this a try, I really want to use the raspberry pi as a mini home server but the SD card was always a limiting factor for me.
Love it! Just like your books! Thank you.
I'm really looking forward to Pi X has a M.2 slot at its back. I put them together and the form factors permit.
sudo rpi-update
updates the firmware files
4:27 you didn't change the x side of the chart's label to "Seconds" from "MB/sec".
There is already the stable version!
@bodzio4062 Yes its the Beta x64 works
He is talking about the boot beta, is stable now
There's been a method to use USB SSD for a few months. I've been using mine since last week with an m2 SSD. Snappy, replaced my desktop for daily use.
Awesome! Hopefully the process gets more straightforward as changes trickle down to stable
just need now the full video acceleration with vulkan support since the acceleration video part is still very lackluster on the pi.
I understood since 3 days back June 17th is not a beta functionality anymore as there is a stable version (not production) or beta version should be used still to work?
can you combine the SSD with the Raspberry Pi clusters ?
For persistent storage claims? I would like to see how Jeff does it.
3:32 Did you power this setup up with the standard 5V 3A USB-C power supply, or did you use one with higher Amps?
Yes; I used the standard Raspberry Pi USB-C power supply in all the tests.
@@JeffGeerling Thanks for your reply! In that case I'll stop my search for a 5V adapter with higher amps and also use the standard power adapter.
Since its less than 550 mbps, it makes sense to use a regular sata ssd with a sata to usb adapter instead of a more expensive m.2 nvme to usb adapter.
PI is becoming very viable for general use cases for sure I am planning to buy some PIs here in the future one for PI hole for sure and others for other projects I may have. I was thinking of 3d printing a 2U rack so I can put them in with my PLEX and file server so they are stored away as well.
Great vid! Also, I've never witnessed the Like ratio like this before.
Jeff what happend if you have all your things on a sd card, and want to boot on a new ssd? how can you copy the OS from the sd to the ssd with all the stuff that you use, without lost any information or configuration? it's enough with copying all the data? may be doing an rsync?
You can 'clone' the image to another drive using a tutorial like this: techsparx.com/linux-sbc/raspberry-pi/backup-sd-card.html - it's the same process if you're cloning to another microSD card or SSD.
@@JeffGeerling thanks a lot bro, i will read it and apply it!
great helpfull...thanks bro
Hello Jeff, I am a new user of a Rasberry Pi 4 Model B (4GB) since yesterday, but today I booked my first success. I am now booting on a CRUCIAL BX500 480Gb 2.5 SSD in a STARTECH S2510BPU33 USB 3.0 Hard Drive Enclosure with UASP. I had to mix your way to do it, with the one of Andreas Spiess to succeed, Thanks
is there a full release version or is it still on beta?
Hello thank you so much for the video.
Would you also be so kind to explain or even better, create a video explaining, how we can use an SSD with ext4 (or NTFS) file format to boot and install OS on?
As far as I know the imager currently converts the main boot partition to FAT32. Is there a way to flash OS drives with in Raspberry Pi OS with and option to select file format?
Or can we for example install OS on SD card, install necessary support for file systems, copy and paste boot contents like you do in this video to an Ext4 or NTFS SSD?
I really would like to set my "first" pi on an SSD which is using ext4 (or NTFS or at least ExFat at the very least). I would like to install the OS on an ext4 drive and boot from it for the most resilient setup, before I even delve into the Pi world wormhole.
Perhaps you can make an updated video for this subject and perhaps even do a benchmark for FAT32 vs Ext4 etc?
Would really appreciate any comment, help or guidance from you.
what case are you using for the Pi 4 ??? it has the hole for the fan, so i'm assuming it can host the Pi4 with PoE hat!!
It’s a slightly modified Pi 4 case; see www.jeffgeerling.com/blog/2019/raspberry-pi-4-needs-fan-heres-why-and-how-you-can-add-one
What about nvme vs ssd? Would the USB still be a bottleneck? I read that nvme was faster so I went that direction..
What have your findings been here? I have a spare nvme and thinking of doing the same. If it proves well, I'm thinking of getting a second one for a RAID 1 setup
Hi Jeff, thank you for the detailed information shared in your video, indeed storage speed is an issue on Pi4. If you fancy would be interesting for all to see what's the fastest USB 3 flash disk that can be used as alternative to mSD with Pi4, tnx.
Can this work with a cluster as well? Might be a silly question but I just want to be sure before I purchase some gear.
Can you use it with others distros yet? Kinda don't want to give my Ubuntu Server installation up.
I have a raspberry pi 4. I also have a 250 GB solid-state drive 3d nand from western digital. My question is if I use my SSD with my raspberri pi do I need to still use my sd card in my raspberri pi 4. Can I use my SSD to install everything that I need for my raspberry pi 4 without an SD card
Any news on this? Video seems to be 2 years old. I would love to use the pi with a storage that is not an sd card. Something with way more space. Also i am logging pictures and data from around my house from various experiments. i am afraid to kill my sdcard with too many read/writes. would love to know what i can use for a maximal robust pi logger.
One question if we boot from ssd drive ... what can we do with the SIM card ?
Thanks for sharing. Does the openmediavault work on the RPI 4 with 64 bit Raspbian?
Thanks for the helpful video. I have successfully gone through the process and the RPI4 boots. Is file structure different when run from a SSD. I have been using ffmpeg to stream video. It works from the SD card but not from the SSD. Any thoughts?
Keep making amazing videos
I am having trouble with my Pi4. everytime I boot it.All my previous settings for the installed applications dissapears.. What could be cuasing this? Any help is much appreciated.
Have it working on my brand new Pi 4. Firmware update was needed indeed. I guess I bought one from old stock. using KingSpec 42mm Sata SSD from AliExpress and a Sabrent SATA M2 SSD enclosure from Amazon NL. They also sell an NVMe enclosure. I bought the SATA SSD instead of NVMe one to upgrade an old HP laptop earlier but the lap was not good enough. More useful with a Pi.
Would you tell us that why i got error while booting my raspberry pi 4 with SATA 2.5 SSD through USB 3.0
"
Error msg on boot - mmc1:
Controller never released inhibit bit (s)
"
How would you set this up in a YAML playbook? I'd like to do this on 8 Pi's
im getting this error in one of the PI's.
/bin/sh: 0: can't access tty: job control turned off
SDD won't boot up.
This is the ONLY video i know that has some range and has no dislikes xD
Hi Jeff thanks for the details.
Actually as part of the Raspberry OS there is a tool call SD Card Copy that you can use to copy the bootable SD card content to any USB device attached to the Raspberry. I've tested and it worked.
But in the case that we want to install Ubuntu server 64 or another 64 distro, what is the best way or tool to copy the SD Card to a SSD?. I think there should be better ways that dd command?. And what would happen in the scenario that you SD Card is 16GB and your SDD 128 GB how you recover the additional 112 GB after using dd?.
Thanks in advance for your reply.
I have a question,can you help me?I found that CM4 without emmc and boot from TF card can not shutdown completely. The power LED is still on! But the CM4 with emmc can shutdown completely!
hi Jeff, thanks for your video, do you know if the brand of the SDD to USB converter affects? I mean, some weeks ago I perform another little different process to boot my Pi4 with SDD, and I found that the bradn affect :| do you know something about it? I have a UGREEN converter.
Yes, the brand matters-some support UASP, some don't. Some work well with the Raspberry Pi, some don't. Unfortunately there's not really a way to guarantee one will work or not based on specifications, only on testing. The ones I used and linked to definitely work :)
So I went thru the steps except I used a 2TB SATA drive via a SATA to USB-C adapter.. I then went thru the SD -card copy program and it booted perfectly.. the next project is the bramble cluster but I am going to try ISCSI export from the master node and mount then on worker nodes for k3s to use as its data stores I hope to avoid SD card corruption and see if the performance is acceptable.. fingers crossed
Apr / 2024: With RP imager 1.8.5, do you have a step by step recommendation for getting a RP 4 / 8GB to boot from a NVME M.2 ssd ?
A caution for anyone trying to do this for CentOS - it defaults to thinking you are booting from an SD card, so if you do an SSD you have to change the root directory specified in cmdline.txt otherwise it'll never boot. www.raspberrypi.org/forums/viewtopic.php?t=255371
Since the stable version of usb boot has been released, what is the process of updating to the stable version if you are currently running the beta? Run these cmds below with the existing os or do we need to start fresh?
sudo nano etc/default/rpi-eeprom-update -> to change from beta to stable
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
Is this ONLY on pi4?
Hi do you know how to get pi-top os to work for ssd boot. Raspberry os does work but the little screen doesn't work.
can I do this without doing a clean install onto my USB drive?
So if usb 3.0 is backward compatible with usb 2.0 why didn't they go with four 3.0 ports?
It's almost double the power requirement between USB 2 and USB 3
Can you show a benchmark test showing the thru-put of Gigabit Ethernet bandwidth while at the same time transferring a large file over USB 3.0 bus to see what the processor/chipset is actually capable of handling? Perhaps Download something via Gigabit Ethernet while monitoring the USB 3.0 Bandwidth with any performance utility? Or any creative way you can think of over loading the Pi's work load. Thanks Jeff Love your videos!
Found your more recent videos: Raspberry 400 limited to 3.2GB/ps thru put and about 288MB or 2.3Gbps or 288MB/s for Ethernet I hope thats correct.
Video Title: Raspberry 400 Unboxing mentioned 3.2Gb/s over USB 3.0
VIDEO TITLE: Raspberry Pi CM4 does 2.5 Gigabit Ethernet! addressed Ethernet.
Thanks Jeff!
What can I do if the Pi won't boot from SD card?
Can the Raspberry Pi run external usb SSD hard drive without external power supply?
hi great video, have you a fix for the error "Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b" that's what i get when usb boot... i burn my brain trying to solve this :(
I have a Raspberry Pi 4 8gb screwed to a Raspberry Pi 10 inch touchscreen. The Pi is connected to the screen with a 180 degree usb3 & 180 degree hdmi adapter included with the screen. So no cables are needed from the Pi to the screen. The power for the screen is deliverd by the 180 degree usb2->usb-c connector and uses the bottom usb3 connector of the Pi. There is also a sepate power-connector on the screen.
Now i want to connect a usb3.2 (10gbs) mvme drive to the 2nd usb3 port on the Pi to run Klipper from the mvme drive. When booting from usb (witch you have to install a bootloader 1st) i get a blank screen and the mvme-drive does power off after a few seconds.
So my guess is that the powersuply deliveres not enough power to the screen & mvme drive.
I can not say how much power the screen needs. This is nowhere to be found. It's a 10.1 inch 1024x600 ips display.
How much power does a usb3.2 (10gbs) mvme usb-3 drive & the screen need?
The powersupply of the Pi4 is 3A (15,3w). I think this is not enough.
Thank you
Will this work on rpi3
Thanks a lot. since this video is 2 years old, the EEPROM update is ` /pieeprom-2020-07-16.bin `. Would you please share where in documentation I can find the recent bin update. Thank you and thank you again big man
what has changed since this video please?
I got a haircut!
@@JeffGeerling so nothing regarding the Pi4 booting?
@@Tom_Cruz thanks
Great video! (You kind of sound like Ferris Bueller - that's not terrible)
Need to write an SSD driver using pio. Dma on spi 2 lane 4 gbs possible?,jpk
Hey Jeff, just want to see if you or anyone else has run into the issue I'm having:
I am using the RBPI4, all up to date and am trying to boot from an xpg sx8200 pro in a TDBT SuperC enclosure. Nomatter what I do I cant get it to boot and I am suspecting is may be due to high power draw from the USB 3 port I have it plugged into. I have read elsewhere that using a separately powered usb hub would fix this but I get the impression from others that they've been able to make this work without doing this. Any feedback would be appreciated, thank you.
I tried to boot Ubuntu 20.04 this way and the bootloader doesn't seem to find the files its looking for. Raspberry Pi OS works well though.
I've heard of mixed results getting Ubuntu to boot. I _think_ someone was able to get it to work but with a microSD card installed with a valid bootcode.bin that allows the Pi to start from the microSD then switch to the SSD. Also see this answer on Ask Ubuntu: askubuntu.com/a/1239145/88829
@@JeffGeerling Ahh interesting, it actually simply just worked when I put an SD card with the same image written to it. It booted to the USB that was still connected, if I take the USB out it falls back to booting the SD card as expected.
100% Works with SAMSUNG SSD 860 EVO 1TB 2.5 Inch SATA III Internal SS (MZ-76E1T0B/AM)!
Tossed the SD card on my GF, she didn't really liked it.
Ya gotta watch your power. Been running usb 3.0 4tb hd's. 4amps not quite enough...use external power hd's. Work fine. Max transfer.5.2gbs. ssd on op5 m2 ~10x that. Still great compared to sdcard.
Does anyone know how the gigabit Ethernet chip connects to the Broadcom ARM SoC in the Pi 4? I know that the USB 3 chip is connected via PCIe but as far as I can tell the SoC only provides one lane.
Regarding the current Compute Module 3+, there appear to be two sets of 5 unused pins on the edge connector. If the centre pin of each group is used as a ground to shield the other contacts, that gives eight pins, or four differential pairs available to the upcoming Compute Module 4. As a bare minimum, a single PCIe lane would use up three of those pairs (TX, Rx and clock), leaving only one pair of contacts for the Ethernet. Hmmm. I don't see how the Turing Pi motherboard is going to be able to take advantage of the Compute Module 4 but I'm sure there are much smarter people than me working on the problem.
For me it doesn t work... i use the same kingston a400 240 gb and raspberry pi 4 4gb. It seems to stay doing nothing at boot. Is my second day when i try to do my raspberry work. I tried, step by step, many times, different methods... nothing works.
Try a different USB3 to SATA adapter. Unless your Kingston A400 240 Gb is defective, it should work. More info about compatible usb adapters, check here:
jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/
A SSD is much more expensive than Pi itself
I am facing an issue with usb booting when 2 usb 3.0 drives are connected. anyone else facing the same problem?
If yes, any solutions?
It would be nice if the firmware was updated to provide a boot menu to allow booting from an external USB (or other device) like a regular PC BIOS.😉 *UPDATE:* OK, so followed all the instructions and used the updated firmware: pieeprom-2020-06-15.bin, and I *STILL* couldn't get the RPi 4B to recognize the USB SSD (1 TB). Finally, I realized my version of the Raspberry Pi Imager on my iMac was outdated, so upgraded to ver. 1.3, and reflashed the SD card and the SSD with Raspbian 32-bit. STILL no joy.. even after copying the .dat and .elf files over to the SSD /boot partition, so I finally got it to work by running Raspbian from the SSD, and using the SD card imager in Rasbian to do a direct copy to the SSD, and setting it to use the entire drive. Once I got it to boot from that successfully, I tried to do the same thing from a Ubuntu-based distro (WindowsFX 10.1), and unfortunately, the SD Imager utility isn't included on that distro. I ended up doing the initial install and updates from the SD card and then removing both and setting them up on another machine with Clonezilla, and doing a direct copy from the SD card to the SSD. Then it would actually boot from the SSD, but the partition was only 64 gb. like the SD card. I downloaded gparted after I got it up and running and expanded the /root partition to the full capacity of my SSD drive (1 TB), and now it seems fairly quick and stable. I'm sure there's probably something I'm missing in /etc/fstab or the /boot directory, but maybe it will straighten itself out in the coming days.😉
That would be nice. Basically make the boot order something one could configure in some BIOS-type setting, or maybe even via raspi-config.
One big minus - temperature -> and therefore ventilation need -> noise -> unusable (for my taste)
If you run the Pi 4 in a case, you can use a case like the Flirc case that's effectively a heatsink-case, and the Pi won't overheat no matter how hard you push it (according to my testing). I do use a fan on a couple of my builds, but that's just because I'm cheap and don't have a bunch of Flirc cases around, but still like to have my Pis enclosed. See this post for more details: www.jeffgeerling.com/blog/2019/best-way-keep-your-cool-running-raspberry-pi-4
@@JeffGeerling Oh thank you for info, that can bring some hope. I found your channel recently and I like your videos ! For me your videos encourage to get things done, thank you for that ). May be because I was impressed how fast you progress, even though with this 10 times delay, it still faster then I can manage so far:) I am relatively new to linux . I am also curious about your setup of the workplace. May be i should search your video about that , or if you didn't make it I encourage to do it with much of details, because so far I was trying to figure it out from your videos on other topics using modern technology - pause ;) . Wish you the best , great videos !
the beta is stable now
You go to damn fast!
There no card above you when you said there way figure id let you know
One thousand people tells on youtube "SSD-Boot soooo fast"...Bla bla etc. but "NO" on gives Butter to the Fishes and tell Numbers.
Why ?
No Balls ?
No Brain ?
Ok,i try it and get back to MSD
Why ?
It isnt worth.
I suggest: Less Bla bla, more usable Data.
If you have any issues with some UASP cables .. check this www.raspberrypi.org/forums/viewtopic.php?t=245931
My ssd read/write was very slow until I found this fix.
Stable Bin is Now: 2020-16-07.bin
Gigazine から来ました。
>USBデバイスを使用する際は「転送モード」の違いに注意
gigazine.net/news/20200712-usb-uasp/
>エンジニアのJeff Geerling氏が自身のブログ上で語っています。
>Geerling氏がUSBの転送モードについて検証するきっかけとなったのは、自身のTH-camチャンネルで公開した「Raspberry Pi 4の起動ディスクに外付けSSDを利用する」ムービーのコメント欄であったとのこと。ムービー内では、microSDからOSを起動した場合と、外付けSSDから起動した場合の転送速度などの性能比較を行っています。
change it back to stable
Please don’t use Kingston it does not facilitate Linux. I had to replace my ssd after disk problems. Could just be me though.
It currently represents the best bang for the buck for a brand name, cheap SSD drive, it's hard to beat that. I use for production SBC's and PC's only Samsung SSD Evo Pro drives. For testing/tinkering purposes, nothing beats A400 SSD series which costs 1/3 of the Samsung ones.
what if your beard shaved?
ppppp
first!!
Tip: reconfigure your pi to act as FIRMED HARDWARE..aka mother board (BIOS), xternal hdd as RAM/HDD/GraphiX card, and finally Your Pi 4 main arm Chip to just kick back and quarter back.... Software:
Windows the whole thing but virtual every OS :) enjoy. T his is optimal. Ducking SuPEr computer literally now. hey FTW keep this om the low