espresso1736
Posts: 19
Joined: Fri Jan 22, 2016 11:43 pm
Location: El Cerrito, CA USA

Pi 3A+ won't boot from USB flash drive

Fri Mar 08, 2019 6:03 am

Just received a couple of new 3A+ Pi's from Adafruit. They boot just fine from an sd card with the latest Raspbian (2018-11-13-raspbian-stretch.img) however they both fail to boot from the flash drive (a 16GB SanDisk Cruzer Fit) which was burned with the exact same image.

I followed the instructions at: https://www.stewright.me/2017/06/instal ... cos-linux/ which had worked for one of my 3B+ Pi's. The same flash drive which fails to boot the two 3A+'s, boots just fine in the 3B+. Also, they are all running off the same power supply - not at the same time, I switch back & forth :)

What I see is that the green ACT light comes on for a second or two, the goes into a pattern where it flashes 4 time, rapidly, about once a second. About every 5 seconds, the light in the flash drive briefly comes on.

User avatar
Gavinmc42
Posts: 7501
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 3A+ won't boot from USB flash drive

Fri Mar 08, 2019 6:55 am

I just saw a similar thing with the LEDs with latest 4.19 PiCore.
http://tinycorelinux.net/10.x/armv7/test_relases/RPi/
4? flashes every second or so.

It seemed to boot to command line.
However becuase the Lexar 32GB USB stick is in the USB socket I could not do anything with a keyboard.

I use PiCore as a SD card tester, it is much smaller and less fussy than Raspbian.
SD card PiCore booting is fine.
Have not used the 3A+ much yet so there could be tweaks.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Pi 3A+ won't boot from USB flash drive

Fri Mar 08, 2019 9:05 am

That tutorial is old and poorly written. Also, their claim that USB flash drives are faster and more reliable is just plain nonsense (see notes at end).

The 3B+ and 3A+ have the USB boot OTP bit already set from the factory. All you need to do is write the latest Raspbian image directly to your USB drive (preferably using Etcher), then plug that into your Pi and boot. I've done this many times with my 3B+ (don't have an A+ but it should work the same). Note that USB boot is slower, and there is a long(ish) pause before anything happens.

I've booted my 3B(+) from flash drives, SSD and HDD this way. With the older 3B and 2Bv1.2 you need to set the USB boot OTP bit first (which requires it to boot from a specially prepared SD card once), and then the procedure is the same for them as well.

Now after all that has been said, the Raspberry Pi boot-loader is not compatible with all USB drives. Some will work fine, some will cold boot but not reboot, and some will not boot at all. Upgrading the firmware in Raspbian may help, and you can also USB boot other models by placing just the bootcode.bin file on a FAT32 formatted SD card (which can also help boot problems with the Pi 3 computers).

Booting from SD card will always be faster than USB, regardless of the drive (even SSD). It's only after the system has booted that you will (or won't) see any difference in performance.


Notes:
Most USB flash drives use similar technology to SD cards, and when compared to the A1 rated SD cards, USB flash drives will be slower. The problem is the same with both USB flash drives and SD cards. Most are highly optimized for sequential I/O and have terrible random I/O performance (IOPS). This is great for a camera, but bad for a computer OS. Poor random I/O is what the A1 rated micro SD cards have addressed, but most USB flash drives still suffer from. The only exceptions I am aware of are a couple of high priced SanDisk models, and, of course, USB SSD (which can really excel at random IOPS).
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
Gavinmc42
Posts: 7501
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 3A+ won't boot from USB flash drive

Fri Mar 08, 2019 11:30 am

USB SSD (which can really excel at random IOPS).
Yep, makes using Gentoo64 much more pleasant.
SSD are also have more memory for the same price and have better controllers.

I don't really expect to run big OS's on 3A+, hopefully tiny ones on SLC uSD cards.
It took me a long time to get a method of coding for Zero's, I expect 3A+'s will take time too.

My older 3B's have all had their USB bits programmed ;)
Have not really played with dual uSD/USB booting or even network booting.
Lots still to learn about these Pi's.

One day trillion cycle write/read memory will be available, by then we might survive the cyborg process.
Second Renaissance? All the World's knowledge can be on an implanted chip.
Hopefully search engines will be open source by then?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Pi 3A+ won't boot from USB flash drive

Fri Mar 08, 2019 11:59 am

I've had difficulty with my 3A+ too, I found out that I couldn't boot with a USB hub having a pendrive & both keyboard & mouse attached, but it would boot OK if only the keyboard or the mouse was attached - but I overcame that problem by using a mini wifi keyboard & trackpad. 8-)

I was using the latest version of Raspbian from last year, (13-11-18 I think).

espresso1736
Posts: 19
Joined: Fri Jan 22, 2016 11:43 pm
Location: El Cerrito, CA USA

Re: Pi 3A+ won't boot from USB flash drive

Sat Mar 09, 2019 11:28 pm

@k-pi: thanks, but I'm not using a hub, the flash drive is plugged directly into the USB port. I'm also using the 13Nov2018 image, so that's the same. Would you tell me what size and brand/model of USB flash drive is working for you? Also, the revision of my board is 9020e0 (as reported by cat /proc/cpuinfo) - what is yours? It seems unlikely that there would be multiple board revisions with a new model, but it's one more thing to check.

@HawaiinPi: I updated the firmware (from 4.14.98-v7+ to 4.19.27-v7+) but it made no difference in terms of booting from the flash drive.

espresso1736
Posts: 19
Joined: Fri Jan 22, 2016 11:43 pm
Location: El Cerrito, CA USA

Re: Pi 3A+ won't boot from USB flash drive

Sun Mar 10, 2019 1:52 am

SOLVED!

After my last post, I decided to try a routine update of Raspbian:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
These had the effect of reversing my rpi-update, so that uname -a now again reports 4.14.98-v7+, however the flash drive successfully boots in both of the 3A+ Pi's. Guess I was lucky to have the 3B+ around to be able to do the updates. Anyway, a happy ending :)

Return to “General discussion”