- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
No bootcode.bin only USB boot on new 3B+ ?
I've been trying different things on my new 3B+ and noticed today that when booting from a FAT32 micro-SD card with only bootcode.bin, my bootable USB SSD drive with fully upgraded 2018-03-13 Raspbian Stretch fails to boot. I get the repeating pattern of 4 green flashes, which if I remember right, means start.elf cannot be found. However, if I remove the SD card it boots right up, so it's not a problem with the SSD or OS on the drive.
In addition, if I replace the 3B+ with my older 3B it boots just fine with the bootcode.bin only SD card.
Same SD card. Same SSD drive. Same PSU. Same everything, except the 3B+ vs 3B.
So, is bootcode.bin only USB boot not supported on the new 3B+ ... and if not, is that documented anywhere?
In addition, if I replace the 3B+ with my older 3B it boots just fine with the bootcode.bin only SD card.
Same SD card. Same SSD drive. Same PSU. Same everything, except the 3B+ vs 3B.
So, is bootcode.bin only USB boot not supported on the new 3B+ ... and if not, is that documented anywhere?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: No bootcode.bin only USB boot on new 3B+ ?
I just tried it here on a 3B+ with latest bootcode.bin and I can confirm it does not work.
Green LED sequence is 3 short, 1 long flash.
PeterO
Green LED sequence is 3 short, 1 long flash.
Code: Select all
pi@raspberrypi:/boot $ ls -l bootcode.bin
-rwxr-xr-x 1 root root 52064 Mar 28 22:47 bootcode.bin
pi@raspberrypi:/boot $ md5sum bootcode.bin
17efaf1c1ef89289168d71cdc8194982 bootcode.bin
pi@raspberrypi:/boot $
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: No bootcode.bin only USB boot on new 3B+ ?
Also confirmed here as that's exactly what I trying to do given the slow spin up response on my test HDD.
- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: No bootcode.bin only USB boot on new 3B+ ?
Tried the next branch bootcode.bin and no joy there either. Model 3B boots. Model 3B+ does not boot.
The master and stable versions are the same as the one currently installed by my apt upgraded Raspbian.
EDIT:
I don't expect this will be a problem for many, since the new 3B+ comes pre-configured for USB boot, and the bootcode.bin SD card was for older models (or the 3B without the boot bit set). It may very well be that this is by design, but if that's the case the documentation should be updated to reflect the change.

Code: Select all
SHA256 hashes:
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7 *bootcode.bin master
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7 *bootcode.bin stable
f46ae0af15048c3b133599f97363a6d7771569d95cca42d5a76706c2d678aa10 *bootcode.bin next
EDIT:
I don't expect this will be a problem for many, since the new 3B+ comes pre-configured for USB boot, and the bootcode.bin SD card was for older models (or the 3B without the boot bit set). It may very well be that this is by design, but if that's the case the documentation should be updated to reflect the change.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
- DougieLawson
- Posts: 42154
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: No bootcode.bin only USB boot on new 3B+ ?
Current kernel & bootcode gets the same bootcode.bin
That's github commit 2148253d340d7c646583cb8f0be6403511522cc4 which you'll get with sudo rpi-update.
Code: Select all
root@viking /boot # sha256sum bootcode.bin
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7 bootcode.bin
root@viking /boot #
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: No bootcode.bin only USB boot on new 3B+ ?
Any updates on this issue? It's really something of a show stopper for my requirements.
- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: No bootcode.bin only USB boot on new 3B+ ?
No official word from the usually helpful RPF folks here. However, since it has been confirmed by multiple people I think it's pretty safe to say that bootcode.bin-only USB boot is not supported by the new 3B+ model. What's unclear is whether or not that was by design.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6382
- Joined: Fri Jul 29, 2011 5:36 pm
Re: No bootcode.bin only USB boot on new 3B+ ?
It's not by design. I think there hasn't been any word because Gordon (who works on most of the USB and network boot stuff) is currently looking at other issues.HawaiianPi wrote: ↑Fri Apr 20, 2018 4:32 pmNo official word from the usually helpful RPF folks here. However, since it has been confirmed by multiple people I think it's pretty safe to say that bootcode.bin-only USB boot is not supported by the new 3B+ model. What's unclear is whether or not that was by design.
Re: No bootcode.bin only USB boot on new 3B+ ?
Just found this thread after experiencing same issue. I was first thinking there is something wrong with the card but later found it boots with same card and ssd in Pi3. Even if 3B+ boots without card I tried this because of
- possibly shorter boot time
- cpu usage seems to be higher with no card present in slot viewtopic.php?f=28&t=211912#p1307781
- after sudo poweroff there is difference, with pure usb boot with no card the usb interface and LED on my usb-sata adapter stays on while with card in slot it seems to be powered off as part of shutdown (not sure if this is bug or feature)
However when thinking about it now maybe it would boot with empty card with no bootcode.bin at all? Will try.
- possibly shorter boot time
- cpu usage seems to be higher with no card present in slot viewtopic.php?f=28&t=211912#p1307781
- after sudo poweroff there is difference, with pure usb boot with no card the usb interface and LED on my usb-sata adapter stays on while with card in slot it seems to be powered off as part of shutdown (not sure if this is bug or feature)
However when thinking about it now maybe it would boot with empty card with no bootcode.bin at all? Will try.
Re: No bootcode.bin only USB boot on new 3B+ ?
Same here; I am trying to debug an SSD which only boots every 2nd or 3rd time.
This is the output of the Raspberry Pi 3 Plus on the serial console if the SSD is not plugged in:
On a Raspberry Pi 3 it looks different:
This is the output of the Raspberry Pi 3 Plus on the serial console if the SSD is not plugged in:
Code: Select all
Found SD card, config.txt = 0, start.elf = 0, recovery.elf = 0, timeout = 1
Trying USB
USB Host enumeration failed, no device detected at root
Code: Select all
Found SD card, config.txt = 0, start.elf = 0, recovery.elf = 0, timeout = 1
Trying USB
Hub device found at addr 4, enumerating HUB
Initialise hub
Found 5 ports, multi_tt = 1
Setting interface 0
Enabling PORT POWER on port 1
Enabling PORT POWER on port 2
Enabling PORT POWER on port 3
Enabling PORT POWER on port 4
Enabling PORT POWER on port 5
Waiting for devices to respond to reset
Found device on port 1
Found highspeed device
Device found: type = Ethernet adapter, addr = 5
Found device on port 5
Device failed to respond to reset
Trying booting from Ethernet device addr 5
Initialise ethernet with MAC b8:27:eb:6d:a4:07
Wait for Link up
Re: No bootcode.bin only USB boot on new 3B+ ?
I also have the same issue, I really need USB boot for my SSD. Please sort us out Raspberry!
Re: No bootcode.bin only USB boot on new 3B+ ?
I also have the same issue, I really need USB boot for my SSD.
Why does the issue being discussed here prevent you using usb boot, which is enabled by default on the production lline for an RPi3B+ ?
- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: No bootcode.bin only USB boot on new 3B+ ?
If the SSD is properly configured it should boot without an SD card. The 3B+ has the OTP boot bit programmed by default (at the factory), so you should just be able to write a Raspbian image to your SSD and boot it on your Pi.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: No bootcode.bin only USB boot on new 3B+ ?
Setting the OTP bit on a RPi3B, & the RPi3B+ as it comes, will boot both SSD & HDD, as well as pendrives, if you put the image on them, as you would for a microSD card. It's the way I use mine.
However, there can sometimes be power supply issues, not enough supplied through the USB ports, so I mainly use self powered HDDs, or both RPi & disk powered through a USB hub.

However, there can sometimes be power supply issues, not enough supplied through the USB ports, so I mainly use self powered HDDs, or both RPi & disk powered through a USB hub.
Re: No bootcode.bin only USB boot on new 3B+ ?
Thanks for the replies, I suspect a power issue as my Chinese 30GB SSD will not power from USB 3.0 on my PC either, I need the right lead to power it I guess. It is branded KingFast and it is when it is working! This is strange as it works on my other 3B.
Re: No bootcode.bin only USB boot on new 3B+ ?
Many USB connected HDD devices require an extended settle/spinup/come-ready time after the USB port that they are attached to comes live. This breaks many HDD boots, which bootcode.bin might address. SSD devices mostly, but not always, have a shorter "come-ready" time and will boot.k-pi wrote: ↑Sun May 06, 2018 9:34 amSetting the OTP bit on a RPi3B, & the RPi3B+ as it comes, will boot both SSD & HDD, as well as pendrives, if you put the image on them, as you would for a microSD card. It's the way I use mine.![]()
However, there can sometimes be power supply issues, not enough supplied through the USB ports, so I mainly use self powered HDDs, or both RPi & disk powered through a USB hub.
The lack of an operational "bootcode.bin" from SD-CARD precludes the use of many HDD USB drives.
- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: No bootcode.bin only USB boot on new 3B+ ?
There is another OTP bit that can be used to increase the USB wait time from 2 seconds to 5 seconds. That may not fix all hard drive boot problems, but it should help with some. Add the following to config.txt on a Raspbian SD card and boot it once to program the timeout bit.zardoz99 wrote: ↑Wed May 09, 2018 6:53 pmMany USB connected HDD devices require an extended settle/spinup/come-ready time after the USB port that they are attached to comes live. This breaks many HDD boots, which bootcode.bin might address. SSD devices mostly, but not always, have a shorter "come-ready" time and will boot. The lack of an operational "bootcode.bin" from SD-CARD precludes the use of many HDD USB drives.
Code: Select all
program_usb_boot_timeout=1
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: No bootcode.bin only USB boot on new 3B+ ?
That's very helpful, thanks! I knew that this option exists when using bootcode.bin, but I had no idea that this can also be enabled without an SD card.HawaiianPi wrote: ↑Thu May 10, 2018 2:51 amThere is another OTP bit that can be used to increase the USB wait time from 2 seconds to 5 seconds.
The issue with bootcode.bin / Rpi3+ is apparently known and fixed, but not yet available: https://github.com/raspberrypi/firmware/issues/988
Re: No bootcode.bin only USB boot on new 3B+ ?
Could somebody refresh my memory on what the point of "bootcode.bin only" is?
I mean, if you need an SD card to boot, why not go with the normal "full /boot on SD card" method, which works so much better and reliably (better than any other method of USB boot) ?
The point of the "pure USB" method is that you don't need an SD card at all, but if you're going to have one anyway, then, well, see previous paragraph...
I mean, if you need an SD card to boot, why not go with the normal "full /boot on SD card" method, which works so much better and reliably (better than any other method of USB boot) ?
The point of the "pure USB" method is that you don't need an SD card at all, but if you're going to have one anyway, then, well, see previous paragraph...
"L'enfer, c'est les autres"
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:
Epmu Sn!
J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!
Re: No bootcode.bin only USB boot on new 3B+ ?
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: No bootcode.bin only USB boot on new 3B+ ?
It's to debug boot problems. One can attach a UART to USB cable to the Pi, and then you see the very early boot messages from the boot loader.
The built-in boot loader does not do this, unfortunately.
Once everything is debugged and working, there is no point at all in keeping the SD card, of course
Re: No bootcode.bin only USB boot on new 3B+ ?
While that is a useful feature it's not the whole story. The original purpose was to enable some PIs that have old or buggy firmware that stops USB booting from working to be able to USB boot with newer code contained in bootcode.bin.Tinue wrote: ↑Thu May 10, 2018 9:56 am
It's to debug boot problems. One can attach a UART to USB cable to the Pi, and then you see the very early boot messages from the boot loader.
The built-in boot loader does not do this, unfortunately.
Once everything is debugged and working, there is no point at all in keeping the SD card, of course
For example I have one older troublesome USB HDD that won't boot on a 3B "as is" but works fine with an SD card inserted that has just bootcode.bin on it.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: No bootcode.bin only USB boot on new 3B+ ?
The latest question being answered is "What is the point of bootcode.bin ?" Your answer (as I said) was not the original "point".
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
- HawaiianPi
- Posts: 7118
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: No bootcode.bin only USB boot on new 3B+ ?
Actually, it depends on what you mean by "better". Automatic resizing of the rootfs partition does not work with /boot on SD and the rootfs on USB, but it does work with bootcode.bin only. Also, you need to edit /etc/fstab to ensure kernel/firmware updates are applied correctly when /boot in on SD, but again, everything just works with only bootcode.bin on SD. You just image your USB drive, copy bootcode.bin the SD and go.
The bootcode.bin only method solves boot problems with some drives, and works exactly like pure USB boot (everything runs from the USB drive after bootcode.bin is executed). So if you happen to have a problematic drive, bootcode.bin only is easier and arguably "better" than /boot on SD.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?