The Raspberry Pi is a great computer, even if it doesn’t have SATA. For those of us who have lost a few SD cards to the inevitable corruption that comes from not shutting a Pi down properly, here’s something for you: USB Mass Storage Booting for the Raspberry Pi 3.
For the Raspberry Pi 1, 2, Compute Module, and Zero, there are two boot modes – SD boot, and USB Device boot, with USB Device boot only found on the Compute Module. [Gordon] over at the Raspberry Pi foundation spent a lot of time working on the Broadcom 2837 used in the Raspberry Pi 3, and found enough space in 32 kB to include SD boot, eMMC boot, SPI boot, NAND flash, FAT filesystem, GUID and MBR partitions, USB device, USB host, Ethernet device, and mass storage device support. You can now boot the Raspberry Pi 3 from just about anything.
The documentation for these new boot modes goes over the process of how to put an image on a USB thumb drive. It’s not too terribly different from the process of putting an image on an SD card, and the process will be streamlined somewhat in the next release of
rpi-update. Some USB thumb drives do not work, but as long as you stick with a Sandisk or Samsung, you should be okay.
More interesting than USB booting is the ability for the Pi 3 to boot over the network. Booting over a network is nothing new – the Apple II could do it uphill both ways in the snow, but the most common use for the Pi is a dumb media player that connects to all your movies on network storage. With network booting, you can easily throw a Pi on a second TV and play all that media in a second room. Check out the network booting tutorial here.
64 thoughts on “Raspberry Pi 3 Gets USB, Ethernet Boot”
AMAZING! Thanks for listening guys. This will now bring the Pi3 into the serious leagues. Well, at least for me. Having USB2 connection speeds via the shared USB/Ethernet interface isn’t SATA but also isn’t really a hindrance.
Finally! SSD Booting!
HAD, please guys. Seriously. Please move the report flag.
I fat fingered yet another “Report comment”. Anyone that reads HAD on a mobile device will have this problem.
Trust me, that’s the most insignificant problem with mobile.
Don’t worry about the report button. That doesn’t auto-mod until a few different IPs click it, and even then it goes to the (real) mods to fix any problems.
Or at least swap reply and report since most webpages tend to have their reply where HAD has it’s report :P
I know I’m guilty of hitting report when I mean to hit reply on more occasions than I would care to admit.
Chiming in to say I’ve done it and this is my excuse.
Ideally it would be on the upper left or right. Maybe next to the user name.
Chiming in with Brian to say, “don’t worry about it”. Worst thing that happens is that after ten people (or however many) make the same mistake, I have to read the comment again. I’m totally cool with that.
Haha! You crazy commenteers!
(This got sent back for moderation. Touché.)
There’s been bugs in the Facebook bridge for Hackaday for at least the last year… not sure anyone is very concerned about usability.
“There’s been bugs in the Facebook bridge…”
Well there’s the problem! It’s Facebook!
Did I miss some drama on my comment?
They must be envious of the U-Boot port for the Pi:-) Of course, you do need an SD card to make that work, but it can be completely read-only and tiny. U-Boot also works on all versions of the Pi, not just the 3, as the spiffy new boot ROM does. That said, by the sounds of it, they’ve also written a version of their code that will work on older Pis to, being loaded from SD card and then chaining on to the next location just like U-Boot.
Where can one download a prebuilt image?
netboot is pretty nice, but on the other hand 16GB of eMMC is pretty cheap. As an added bonus if some eMMC fails it’s isolated to a single board, that one node doesn’t start up any more and you can go investigate. If netboot fails it probably fails for everything.
“…For those of us [ADULTS; my addition] who have lost a few SD cards to the inevitable corruption that comes from not shutting a Pi down properly…”
One of the reasons I refuse to buy a Raspberry Pi.
Follow this closely: let me know where I’ve made an error in logic:
The Raspberry Pi was meant for computer-illiterate children.
The Raspberry Pi was DESIGNED for computer-illiterate children.
As of February 2016, the Raspberry Pi has sold over eight (8) million units since its introduction.
The Raspberry Pi was released for sale on 29 February, 2012.
The literature is filled with complaints regarding a rational shut-down procedure, and has been since the (collective) unit’s introduction four years and eight million units ago.
In the four years of the production of eight million COMPUTERS FOR KIDS, the designers of the Raspberry Pi HAVE NOT SEEN FIT to include one of the simplest of design necessities in the Raspberry Pi: a rational shut-down mechanism. The lack–by an engineer–of designing this capability into any device offered for sale to the public would be seen as a career-limiting decision by most companies, if not an outright firing offense by some. In the case of a company whose stated aim is to sell to computer-illiterate children, this decision verges on hubris, and verges absolutely on sheer stupidity.
I suppose that one’s complaining–or not–about this glaring omission is how the Raspberry Pi Foundation determines the level of one’s ‘computer literacy’?
And what exactly breaks when the SD card gets corrupted? Sure the computer stops working, temporarily, but then the kid learns the value in shutting something down properly instead of yanking the power out.
Because today it might be a Pi whose SD card can simply be re-loaded from an image and it’ll be good as new. Tomorrow it’ll be a shiny expensive portable DLP projector and the bulb shatters because it didn’t get cooled down before it was unceremoniously shoved into a carry bag.
This sounds precisely as does the type of equivocating and dissembling received from members of the Raspberry Pi organization whenever a problem–ANY problem–with the product is discovered (want to have fun? Post in the RPi forums that the device can’t truly be programmed in assembly language (it can’t)).
Remember Gareth Halfacree? He co-authored the best selling book, “Raspberry Pi User Guide”, along with Pi’s designer, Eben Upton (4th ed. available 21 Sept., 2016).
When Halfacree surprised the internet with his revelations of a serious heat-generation problem by the (then) new RPi 3, when Upton finally got around to addressing the problem, his comments could most charitably be characterized as prevarications (I seem to remember a feeble attempt to compare the Pi 3 to a laptop processor…). But do your own paper trailing–keep going; don’t stop with the smattering offered here:
I suggest you use your web browser and your imagination, e.g., ‘raspberry pi 3 overheating’, and ‘raspberry pi 3 heat problem halfacree’; you get the idea.
“Originality is no excuse for ignorance”.–Fred Brooks, author of ‘The Mythical
Man-Month’, et. al.
What’s the issue with programming the Pi in assembly? I’ve done it in a couple different ways without a problem…
The “no assembly” thing seems suspicious. The ARM processor runs ARM machine code. How is the ARM supposed to tell if the code came from C or from assembly? What about in-line assembly in a C program: how does the CPU tell which code that it is supposed to run and which code that it is supposed to refuse to run?
I suspect the complaint here is that the Pi is a GPU with an ARM sidecar. The GPU is closed; you can’t write your own programs for it and the ARM is a second-class citizen.
(replying one level up since the reply button is missing on Anachronda’s post).
Programming the GPU/VideoCore scalar(?) engines (in any language) isn’t officially supported AFAIK, yes. However there’s been enough reverse engineering that you certainly can program it, well enough to write real-world useful code, at least in assembly and maybe even in C these days. I think there’s even full documentation for the vector core (the part that would implement an OpenGL pixel shader I believe), just not the scalar(?) VC cores.
Still, if that was the original objection, I’d like to pedantically point out the whether you can program the GPU or not (something not typically supported on almost any HW) is something entirely different from a complaint about which languages are supported.
You can’t prevent corruption to the card if kids pull the card out while the OS is writing to it.
Problem has nothing to do with kids of any age pulling out the card.
Problem has EVERYTHING to do with having kids in responsible design positions.
Obsolescence + Engineered timed failure
This is how the world works since
Do any sbc’s other than the Beaglebone have a rational shutdown method (I assume you mean a power button?)
Banana Pi, Cubieboard, Odroid, and probably many other that I don’t remember right now.
OLinuXinos have power, reset and wake up buttons.
Anything with a PMU likely has one, I can’t remember a list of them but they’re common and extremely similar to a pi in all but community support.
That is why I have created this handy button that can start and stop the rpi as a real PC: http://www.ivancreations.com/2016/06/physical-onoff-button-for-raspberry-pi.html
So your computer was so inadequate you had to put another computer inside your computer?
So you can compute while you compute.
very well said, see as it cannot turn itself on when a specific event arises … it had to be fixed :)
You’re looking at it the wrong way. RPi’s are designed for *education*. If a kid corrupts an SD card by not shutting it down correctly, then they learn to shut it down correctly in future, simples!
Anyway, I’m sure a lot of people here grew up before ACPI came along and we turned out all right.
I remember as a kid having to type in a head-reader parking command for the hard drive of my family’s first computer before we turned it off…(Tandy brand, $2000.00 back in 1989 or 1990, had RAM measured in kilobytes and a hard drive was less than 50MB if i remember correctly)
There is no logic to criticize here, merely statements of maybe-fact. No computer for consumers, child or other, withstands a sudden removal power, and ones designed to be super-cheap less so. Try the same trick with your tower or yank the battery out of your expensive laptop during on time – under any opsys – and let me know how you do.
For a pi that costs less than a tower power supply with a soft power switch (which warns the opsys what’s about to happen) and enough storage energy to allow most drives etc to flush their cache (which is on top of the one in the opsys) – your expectations are utterly unreasonable. I built a lan of things with pis here – and reboot them every 8 months or a year whether they need it or not (not one has actually needed it, but I took them down to make hardware changes). Most consumer, much less child-grade stuff would be left in the dust by that uptime. I do take precautions to use the SD card for /boot only, of course. Something complex that’s running MySQL, NGINX, and a host of other big programs that write logs deserves much better than a cheap SD card. See Bunnie’s blog for words on SD cards. In short “they don’t store your data, they store a probabilistic approximation of your data”. They have their own cache, garbage collection, wear leveling and so on – as do most modern drives of any kind…it’s just that most of a thousand dollar machines can afford to either store more energy in the power supply for power failures and warn the system, os have soft-off buttons. What you ain’t paying for in a pi is what you don’t get. Duh,
I don’t quite follow. “sudo shutdown” seems like a perfectly rational, if inconvenient, shutdown procedure. Or do you want a physical button on it that triggers an ACPI shutdown? That would be kinda nice.
For what it’s worth, I’ve pulled the power on many Pi’s and haven’t had a problem yet. *fingers crossed*
You don’t half go on.
“One of the reasons I refuse to buy a Raspberry Pi.
Follow this closely: let me know where I’ve made an error in logic:
The Raspberry Pi was meant for computer-illiterate children.”
When I was 16, one of the first things I learned about a unix system is to always properly shut it down, because it was so smart to aggregate disk changes in memory before committing it to the disk. In the 32 years since, I have never had a problem with it.
The thing with computer illiterate children is that they will be literate as soon as somebody teaches them a thing or 2.
I am more concerned that of the 8 million computer-illiterate kids, not all of them had someone to teach them the basics of unix-like computer systems. Maybe their guardians or teachers are too busy complaining about how they need to spend time teaching their kids, while they expected the Raspberry PI foundation to take that job out of their hands?
Having said that, I know that a big part of the problem lies in some of the SD cards themselves. Some of them cache the data in an intermediate buffer before committing it to flash. Pulling the power from the SD card before the commit has been done will corrupt the file system as well. This is not a problem of the Raspberry but of the SD card.
Etherboot is very handy as it allows for physically embedded systems and swappable boxes which maintenance of IoT stuff much easier, but without “Wake on LAN” it is crippled. Have they got that working on the RPi3 yet? I had a quick look around and found nothing useful. :-(
The Ethernet controller probably doesn’t support it, given the cost-sensitive nature of the Pi this does not surprise me, however it shouldn’t be hard to set up a separate Ethernet controller via SPI that does.
But that would quickly undermine the point of using the RPi3 and suggest that a search for more capable hardware is required? I looked at various hacks, including radio remote switches etc. but they are not robust and secure enough. You need to be able to either boot it off a server and ensure it is running the latest code, or detect that it did not boot and swap out a box to see it the new one will boot, to eliminate any problems with cables etc. Then the economies of scale with the hardware modules start to work for you. I’m not a big fan of WiFi unless you are mobile, and prefer locations to be wired for data and power whenever possible.
Last time I inquired the controller would support it, but the responsible pins aren’t routed to anything sensible on that machine nor is the USB/Ethernet combo chip responsible for power management of the RPi.
You could probably achieve a WoLAN feature with a CM1 (or CM3 once it arrives) by doing the ETH/USB chip circuitry/layout yourself on the masterboard.. maybe it’s even available at one of the CM boards that are proposed/sold?
You can already do this by changing the boot config file on the SD to boot the USB partition. But its nice to make it easier
First off, THANK YOU to the RPi team! This is awesome. 8)
I decided to commit to using a PI 3 as my daily computer only two weeks ago. Overclcocked CPU to 1400Mhz (heatsink and fan!) and bumped the RAM and core speeds to 500Mhz. The Pi 3 can run Pepper Flash and Chromium browser at an acceptable speed – not perfect, but good enough to watch full screen flash based video players such as the BBC Iplayer or YouTube etc (one caveat is that it does not support DRM, so no Netflix etc. in the browser). The frame rate is a little low at full screen, but considering it’s running without acceleration on a Raspberry Pi CPU, it’s not too bad (I can certainly watch a full TV program without problems). It’s “good enough”, and I can live with it. Other flash based web stuff works as expected, even tested a couple of games. Web browsing is fast, and it works as expected. Computing performance wise, the Pi 3 is about as fast as a Netbook from circa 2010. I can now comfortably do 95% of the day to day stuff I did with my Windows machine.
The only thing I really need to improve is the slow read / write of the SD card compared to a hard disk (and add some virtual memory – 1Gb RAM is a bit tight…), and this news couldn’t have come at a better time! This makes it a really usable little computer!
My old computer pulled around 200 – 240 watts of power and was running 24/7, I can now replace it with something that runs at around four watts. I bet I see a difference in my electricity bill over the next few months. :)
Cases like yours intrigue me deeply. Can you describe your day to day computer usage?
Haha oh man now there’s water all over my tablet. Took me by surprise.
You seems like a healthy and mentally stable fellow !
You said you wouldn’t share those pics! I didn’t share yours!! :(
Oh well, at least it wasn’t the one of me and you with the cream pie, and you trying not to fall out from the sex rack. I like that one. So did you, *naughty boy*! :P ;)
Back to topic – So people want to know my day to day use of a computer? OK…whatever.
Mostly It’s looking up datasheets or other info on the ‘net, occasional orders of electronic parts (hobby) or building supplies (my job). Most often when I’m at the computer I will stream some radio or music, more so when I’m working on a a project at the bench – just in the background, helps me focus. Occasional use of office type programs (mostly letters, billing etc.) or making copies of receipts for tax purposes. Maybe check the news, see what crap is heading my way. Same with the weather… If I’m working with the MSP430 or Arduino / AVR etc, then I may be writing some code or trying figure out what isn’t working. I usually use a laptop or netbook for MCU coding as it’s easier to wander off somwhere more comfortable while I ponder what I previously borked or need to do. Testing stuff is always at the bench though.
You know, pretty mundane everyday tasks that you lot probably do also…
If I’m bored, I might hit up YouTube for while, or look around for TV or movie streams (legal). Usually this is running in the background and I’m tinkering with a stalled electronics project. I really don’t watch much TV, when I do I have a decent 42″ LCD that I prefer to watch on, rather than the 19″ LCD computer monitor (which is slowly dying from old age and abuse in the workshop / office).
And the rest of the time – well, while I’m away I would usually leave my computer running as it was running my CCTV system and VOIP phone. The CCTV is being replaced by several Pi 2’s with the PI NOIR cameras, they dump the stream and recorded video over the network, and will end up on a low power NAS. Still being worked on for now.
The VOIP system is a hack job I did about ten years ago, but as of two weeks ago, no longer works properly with the VOIP provider (must have upgraded / changed something), so this is being swapped out for an ATA and possibly a new provider.
I used to do PC gaming, mostly FPS, but I just don’t have the time or interest anymore. I was also heavily into the overclocking / extreme cooling scene, and also ran a small farm of number crunchers for various distributed project teams (SETI, protein folding, etc). However the electricity bill was finally just too high for me to continue to run the number cruncher fleet (yearly bill was over 3 grand for electricity alone! Cops thought I was growing weed…), so I pulled the plug.
So that is why I can replace my desktop PC with a PI 3 – I simply don’t use any demanding programs or activities. If I was getting back into gaming, then it would be a different matter – that would be a full high-end gaming rig in the multiple thousand price range. Overclocked and insane cooling. ;)
Hope that clears it up for everyone. Not that I really care. LOL.
What is your day to day pc that takes near 300W? My god, that is truly awful. My work PC when it was awake, and with a 20″ LCD screen took 92 watts most of the time. A bit more if I was burning something on one of the optical drives, and that had two big magnetic HDD’s in it. My I7 notebook, with 16GB of ram runs off a sub 100W wart. Either you had a real antique or a ferrari that you replaced with the pi.
My day to day is 180W idling, plus 3 27″ monitors and I think it’s reasonable that it takes 300W. Dual xeon octo-cores though and they really come in handy.
Agreed that most desktops use less than people think, it’s only if you go for some particular configuration that can’t use power saving features that it really sucks.
You’ll see a difference in your power bill but I sure wouldn’t make the same decision. I’ve been down that road before. Using such underpowered hardware always ends up making everything feel like a chore. It doesn’t seem that bad at first but after a month or so it gets old.
Seconding that, whenever I’m away from home for less than a month I’ll bring my tablet and its dock to use as a desktop while I’m away. intel i3 CPU, 4GB RAM, 128GB SSD, you’d think it’d be fine but it really gets on my nerves after a while. I find I can’t do any of the things I’d do for fun in a reasonable length of time, which makes them un-fun.
Have you looked into HardKernel’s ODROID-XU4? Seems like a performance upgrade: “Samsung Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPUs” and “2Gbyte LPDDR3 RAM PoP stacked”
I have a couple xu4s along with various pis. It’s a whole new world. They really ARE fast enough for most things.
I dropped their ubuntu, which seemed too buggy and bloaty, and now run a fairly pure Odbrobian (debian 8). Sadly, there’s not as much a community for easy support, but if you’re a linux guy anyway, you can make it all work.
Kinda funny that even a modern led 22″ monitor draws 4x the power of the entire rest of the system…
I have numerous other truly-fast computers as well. Rarely is it worth the power and fan noise to turn them on anymore. FWIW, the xu4 can do G+ vid hangouts and skype seamlessly, as well as run chromium. I’m using a pi-2 as a NAS right now, but I think I’m going to make an xu4 one for the better speed of the LAN and USB3.
Now we need a hat with an SD card, a button battery and a controller that saves the data and shutdown the card properly on Rpi shutdown.
Is it able to boot also from a WiFi network?
“For the Raspberry Pi 1, 2, Compute Module, and Zero, there are two boot modes – SD boot, and USB Device boot, with USB Device boot only found on the Compute Module.”
So you say there’s two boot modes for the RPi1, 2, CM and Zero but immediately afterward you say only the CM has two boot modes.
Which one is it?
I must be the world’s luckiest Raspberry Pi user. Due to a flakey USB power cable that seems to cut power often when I bump or move my Pi, it’s been improperly shut down and rebooted a dozen times in the last couple months, and every time it comes back up just fine. Might this be because I am using Ubuntu MATE instead of Raspian? I don’t know. And yes, I’ve tried to use a different USB cable, but it turns out the flakey one is the only one I have that provides adequate power. I tried about 4 other cables from my box of cables and every one brings out the rainbow low power indicator on the screen when I peg the CPU at 100% use. One even looks like a thick cable but must have hair thin wires inside. Yes, I just need to buy a decent quality cable…
Buy a good cable dammit! :P
Maybe whatever you are doing doesn’t R/W often. I don’t have a RasPi so whatever.
Good article, made me consider issues that I usually ignore.
I have to rethink my backup strategy. (Almost everything vital is on multiple HDDs, but most of my unreplacable family photos are on sdcards.)
Please be kind and respectful to help make the comments section excellent. (Comment Policy)