User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

No bootcode.bin only USB boot on new 3B+ ?

Thu Mar 29, 2018 6:22 am

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?
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?

User avatar
PeterO
Posts: 4237
Joined: Sun Jul 22, 2012 4:14 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu Mar 29, 2018 8:00 am

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.

Code: Select all

[email protected]:/boot $ ls -l bootcode.bin 
-rwxr-xr-x 1 root root 52064 Mar 28 22:47 bootcode.bin
[email protected]:/boot $ md5sum bootcode.bin 
17efaf1c1ef89289168d71cdc8194982  bootcode.bin
[email protected]:/boot $ 
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

zardoz99
Posts: 165
Joined: Fri Jan 13, 2012 2:25 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu Mar 29, 2018 3:34 pm

Also confirmed here as that's exactly what I trying to do given the slow spin up response on my test HDD.

User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu Mar 29, 2018 7:12 pm

Tried the next branch bootcode.bin and no joy there either. Model 3B boots. Model 3B+ does not boot. :(

Code: Select all

SHA256 hashes:
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7 *bootcode.bin master
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7 *bootcode.bin stable
f46ae0af15048c3b133599f97363a6d7771569d95cca42d5a76706c2d678aa10 *bootcode.bin next
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.
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?

User avatar
DougieLawson
Posts: 33628
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu Mar 29, 2018 8:54 pm

Current kernel & bootcode gets the same bootcode.bin

Code: Select all

[email protected] /boot # sha256sum bootcode.bin
63f47f4d7d0c0ed80a85ab01caac501ea73ab784c0158b3cae2baab5fb4132d7  bootcode.bin
[email protected] /boot #
That's github commit 2148253d340d7c646583cb8f0be6403511522cc4 which you'll get with sudo rpi-update.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

zardoz99
Posts: 165
Joined: Fri Jan 13, 2012 2:25 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Fri Apr 20, 2018 4:04 pm

Any updates on this issue? It's really something of a show stopper for my requirements.

User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: No bootcode.bin only USB boot on new 3B+ ?

Fri Apr 20, 2018 4:32 pm

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?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5242
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: No bootcode.bin only USB boot on new 3B+ ?

Fri Apr 20, 2018 4:42 pm

HawaiianPi wrote:
Fri Apr 20, 2018 4:32 pm
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.
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.

fanoush
Posts: 336
Joined: Mon Feb 27, 2012 2:37 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu Apr 26, 2018 10:43 am

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.

Tinue
Posts: 34
Joined: Fri Dec 05, 2014 12:48 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Fri May 04, 2018 12:34 pm

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:

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
On a Raspberry Pi 3 it looks different:

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

aRBemo
Posts: 3
Joined: Sat Mar 31, 2018 1:13 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Sun May 06, 2018 8:42 am

I also have the same issue, I really need USB boot for my SSD. Please sort us out Raspberry!

B.Goode
Posts: 6363
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: No bootcode.bin only USB boot on new 3B+ ?

Sun May 06, 2018 9:07 am

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+ ?

User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: No bootcode.bin only USB boot on new 3B+ ?

Sun May 06, 2018 9:19 am

aRBemo wrote:
Sun May 06, 2018 8:42 am
I also have the same issue, I really need USB boot for my SSD. Please sort us out Raspberry!
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?

k-pi
Posts: 533
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: No bootcode.bin only USB boot on new 3B+ ?

Sun May 06, 2018 9:34 am

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.

aRBemo
Posts: 3
Joined: Sat Mar 31, 2018 1:13 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Sun May 06, 2018 3:41 pm

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.

zardoz99
Posts: 165
Joined: Fri Jan 13, 2012 2:25 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Wed May 09, 2018 6:53 pm

k-pi wrote:
Sun May 06, 2018 9:34 am
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.
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.
The lack of an operational "bootcode.bin" from SD-CARD precludes the use of many HDD USB drives.

User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 2:51 am

zardoz99 wrote:
Wed May 09, 2018 6:53 pm
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. The lack of an operational "bootcode.bin" from SD-CARD precludes the use of many HDD USB drives.
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.

Code: Select all

program_usb_boot_timeout=1
This sets bit 24 in row 66 which increases the wait time for USB devices to appear on the USB bus. If your USB HDD takes longer than 5 seconds to get ready, then it is way out of spec and not suitable for USB boot.
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?

Tinue
Posts: 34
Joined: Fri Dec 05, 2014 12:48 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 8:19 am

HawaiianPi wrote:
Thu May 10, 2018 2:51 am
There is another OTP bit that can be used to increase the USB wait time from 2 seconds to 5 seconds.
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.

The issue with bootcode.bin / Rpi3+ is apparently known and fixed, but not yet available: https://github.com/raspberrypi/firmware/issues/988

n67
Posts: 788
Joined: Mon Oct 30, 2017 4:55 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 9:42 am

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...
"L'enfer, c'est les autres"

If a post offends you, just put that poster on your foes list, and be done with it (and with them).

To do otherwise, risks being banned.

User avatar
PeterO
Posts: 4237
Joined: Sun Jul 22, 2012 4:14 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 9:51 am

n67 wrote:
Thu May 10, 2018 9:42 am
Could somebody refresh my memory on what the point of "bootcode.bin only" is?
https://www.raspberrypi.org/documentati ... bootmodes/
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Tinue
Posts: 34
Joined: Fri Dec 05, 2014 12:48 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 9:56 am

n67 wrote:
Thu May 10, 2018 9:42 am
Could somebody refresh my memory on what the point of "bootcode.bin only" is?
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

User avatar
PeterO
Posts: 4237
Joined: Sun Jul 22, 2012 4:14 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 10:20 am

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
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.

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),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Tinue
Posts: 34
Joined: Fri Dec 05, 2014 12:48 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 10:25 am

PeterO wrote:
Thu May 10, 2018 10:20 am
While that is a useful feature it's not the whole story.
If you look at the full Raspberry Pi landscape, you are right. But in relation to the thread topic "No bootcode.bin only USB boot on new 3B+ ?" it actually is the whole story ;)

User avatar
PeterO
Posts: 4237
Joined: Sun Jul 22, 2012 4:14 pm

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 10:32 am

Tinue wrote:
Thu May 10, 2018 10:25 am
PeterO wrote:
Thu May 10, 2018 10:20 am
While that is a useful feature it's not the whole story.
If you look at the full Raspberry Pi landscape, you are right. But in relation to the thread topic "No bootcode.bin only USB boot on new 3B+ ?" it actually is the whole story ;)
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),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
HawaiianPi
Posts: 2663
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: No bootcode.bin only USB boot on new 3B+ ?

Thu May 10, 2018 6:36 pm

n67 wrote:
Thu May 10, 2018 9:42 am
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) ?
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?

Return to “General discussion”

Who is online

Users browsing this forum: Bing [Bot] and 58 guests