User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: USB boot now working on Pi3

Sun Jul 02, 2017 8:44 pm

Long story short, I decided to try USB boot this evening.
New Midsummer Raspbian on SDCard, add line to program USB boot, all easy.
Copy OS (actually Ubuntu Mate in this case) to WD 1TB USB HDD -- not so easy. Had to mess with Partition Manager to delete the previous partition and put on a FAT32 partition; so the Windows would recognise the drive and I could write the image using Win32DiskImager. (Etcher still could not see it.)
Booted SDCard, all OK. OTP programmed OK. Raspbian can see the HDD, apparently properly written. (I'm a bit cautious because Imager baulked, but it seemed after everything was copied.)
BUT Mate will not boot. Not even a rainbow screen. Presumably the boot files are too old. Does anyone know if I can make it work by copying boot files from the SDCard to the HDD? Which ones? Any edits necessary?
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

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

Re: USB boot now working on Pi3

Mon Jul 03, 2017 6:45 pm

Are you able to boot your RPi 3 with Ubuntu from an SDCard?

Get that running, connect the USB HDD and use dd to copy the SDCard to the first 8GB of the HDD. Use gparted to fsck everything on the HDD, create a swap partition and expand the ext4 partition to fill the rest of the available space.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

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

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: USB boot now working on Pi3

Mon Jul 03, 2017 11:07 pm

Thanks Dougie, I'll try that next time I have some play time. Maybe by then Mate will be 17.04 instead of 16.04 and the issue might be solved anyway.
(Don't hold your breath for a report, it took a year to find one evening to play :o :( )
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

WF_LM
Posts: 1
Joined: Thu Mar 02, 2017 8:41 pm
Location: Belarus

Re: USB boot now working on Pi3

Wed Jul 05, 2017 9:27 pm

Hello!

I use my Raspberry Pi 3B without a microSD. I use only a USB flash (Transcend JF780).
The USB flash parted as: first partition is boot (vFAT), second partition is root (ext4), third partition is NTFS for non-RPi things.

I bound root in cmdline.txt and fstab to UUID. And I bound /boot to PARTUUID in fstab (because RPi can not boot when /boot bound by UUID (vfat-problems maybe, I don't know)).

But I have some problems, but I think that they are linked:

1) The RPi starts not every time. It can starts and boots fine, or it can does not start at all. This can be fixed by turning the RPi power from on to off and back once or twice or by changing USB port once or twice. I tried to change the "program_usb_timeout" and "rootdelay" constants in cmdline.txt, but this action did not give me 100% result.
How to fix it?

2) If I insert other USB MSD in the RPi, the RPi can not starts at all.
I read here (https://www.raspberrypi.org/documentati ... ootflow.md) that RPi must reads each USB MSD until he finds partition with boot-files and must to start. But it does not.
Why? How can I fix it?

Thanks.

julyjim
Posts: 58
Joined: Tue Jan 31, 2017 5:04 am

Re: USB boot now working on Pi3

Sat Jul 15, 2017 2:36 pm

Caveat emptor
as of now configuring Pi to boot from USB is irreversible (!)
(OK it is after all beta, right?)
As of now Pi boot from SD is much faster then USB 2.0 will ever be.
It is not boot speed only the user should be concerned about, it is operating speed also.
The USB ports are ( allegedly ) limited to 100 mA per port.
16 GB flash drive I just acquired needs 200 mA to function.

User avatar
fruitoftheloom
Posts: 16211
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: USB boot now working on Pi3

Sat Jul 15, 2017 2:46 pm

julyjim wrote:Caveat emptor
as of now configuring Pi to boot from USB is irreversible (!)
(OK it is after all beta, right?)
As of now Pi boot from SD is much faster then USB 2.0 will ever be.
It is not boot speed only the user should be concerned about, it is operating speed also.
The USB ports are ( allegedly ) limited to 100 mA per port.
16 GB flash drive I just acquired needs 200 mA to function.
USB Boot is irreversible because it is not feasible to reprogram the OTP, BUT it will always seek the SD Card first:

https://www.raspberrypi.org/documentati ... ootflow.md


Regards USB mA that is totally wrong, the 3B has 1200mA total, see:

https://www.raspberrypi.org/help/faqs/#topPower
""understanding the theoretical, but not always the end goal""

My other Devices are the ChromeBit CS10, ChromeCast & Huawei Mate 10 Pro SmartPhone

JusttryingtolearnPi
Posts: 5
Joined: Mon Aug 07, 2017 10:35 pm

Re: STICKY: USB boot now working on Pi3

Mon Aug 07, 2017 11:45 pm

I'm a babe, so please be patient with my ignorance. I have a dilemma. I want to put Kali Linux on my RasPi. I saw this sticky and it seemed a Godsend, except... 1] if I enable USB booting, will that then mitigate my SDCard from booting with Raspian
2] Does Kali actually need to be on the same SDCard or Flash drive with Raspian and in either situation, would I then have to leave it inserted for each session I spend on the RasPi? Like if Kali's on the SDCard it runs every time, this would also apply to the flash drive, correct?

User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: STICKY: USB boot now working on Pi3

Tue Aug 08, 2017 8:21 am

AIUI, you should be able to install a USB bootable Kali on the hard disk (check that on their forum). That will boot by itself with no SDCard.
But the Pi will look for a bootable SDCard before booting the USB drive, so if you have an SDCard with a bootable Raspbian, and it is in the slot when the Pi starts, you will get Raspbian.
There are many other arrangements possible, dig through the boot documentation and ask questions. I'm not sure anyone outside Pi Towers has worked out all the options yet....
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

JusttryingtolearnPi
Posts: 5
Joined: Mon Aug 07, 2017 10:35 pm

Re: STICKY: USB boot now working on Pi3

Wed Aug 09, 2017 1:56 am

Thank you so much for your swift response. You definitely answered part of my question and led me in the right direction to continue moving forward. I think I was under the impression that Raspian must run and Kali would run on top of that, but does Kali replace Raspian?

User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: STICKY: USB boot now working on Pi3

Wed Aug 09, 2017 4:39 pm

Again AIUI, Kali is a complete Debian distribution in its own right, it does not depend on Raspbian.
But I haven't used it, so I may be wrong.
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

JusttryingtolearnPi
Posts: 5
Joined: Mon Aug 07, 2017 10:35 pm

Re: STICKY: USB boot now working on Pi3

Thu Aug 10, 2017 2:48 am

Ok, thank you. I appreciate your time and response.

BeauSlim
Posts: 2
Joined: Mon Jul 31, 2017 10:02 am

Re: STICKY: USB boot now working on Pi3

Fri Aug 18, 2017 8:37 am

So, here's some strangeness...

I decided I wanted to try booting from USB because I have a bunch of keys laying around.

I've found only 1 stick that boots no problem with no uSD. It's a Transcend 8GB USB3.

BUT I have quite a few that will boot but ONLY if I have also plugged in the wireless dongle that came with a Stellar Labs / Rii K12+ keyboard that came with my pi3 as part of a kit from MCM electronics. No dongle, no boot. With dongle, boot works every time. Weird.

OSes that work this way include a dual Raspbian/Libreelec Noobs (installed, booted and configured only on the USB stick), and a recent (daily) unmodified Ubuntu Core 16 image dd'ed to the USB.

This makes me wonder if there's something that could be changed in the boot files that would allow more USB devices to boot. What difference is the keyboard dongle making?

User avatar
jadro
Posts: 309
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: STICKY: USB boot now working on Pi3

Fri Aug 18, 2017 8:59 am

Hi,

I have one question about booting from USB...
I read link https://github.com/raspberrypi/document ... des/msd.md .
There is written this:
Note that any change you make to the OTP is permanent and cannot be undone.
What this means? Will this affect raspberry pi hardware?
Thanx,
Jadro
Oracle back-end database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
RaTTuS
Posts: 9840
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: STICKY: USB boot now working on Pi3

Fri Aug 18, 2017 9:00 am

jadro wrote:
Fri Aug 18, 2017 8:59 am
Hi,

I have one question about booting from USB...
I read link https://github.com/raspberrypi/document ... des/msd.md .
There is written this:
Note that any change you make to the OTP is permanent and cannot be undone.
What this means? Will this affect raspberry pi hardware?
Thanx,
Jadro
yes the bit is set and is not changeable - you can still boot from a sdcard though
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
RaTTuS
Posts: 9840
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: STICKY: USB boot now working on Pi3

Wed Aug 23, 2017 9:25 am

Wallace33 wrote:
Wed Aug 23, 2017 8:38 am
Hi..

Woah. That is the most awesome thing ive seen all day. Would this work with a pi 2

James
new PI-2's not old ones
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe


User avatar
ab1jx
Posts: 566
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: USB boot now working on Pi3

Fri Sep 08, 2017 12:23 pm

andrum99 wrote:
Sun Apr 16, 2017 5:18 pm
linux_author wrote:tks! i finally figured it out (a slap of the forehead - i should have known better):

had to point /boot/cmdline.txt and /etc/fstab to /dev/sda !!!
I should also point out that using /dev/sda is not guaranteed to always work, since if you plug in another mass storage device at the same time then it could get allocated /dev/sda, and your boot drive /dev/sdb instead. The preferred method is to do what the 2017-04-10 release of Rasbian and Raspbian Lite do, which is to use the PARTUUID of the boot partition on the kernel command line (/boot/cmdline.txt) and the PARTUUID of the boot and root partitions in /etc/fstab. This ensures that whichever order the devices end up getting enumerated, your system should always boot and be able to mount the root filesystem correctly.

That "another mass storage device at the same time" bit may be complicated. I have an Huawei e3372 LTE modem and one of 3 modes it comes up in is as a mass storage device. usb_modeswitch can change that but maybe not permanently. Also it doesn't happen until udev rules get checked later in the boot process.

So with them both plugged in it boots up and does a kernel panic. If I unplug the modem it boots from the USB hard drive, then I can plug the modem in. Using the PARTUUID should help, I just thought it was some weird USB bus conflict. Of course, it's the order of drives, it's trying to boot from the modem's storage space. The modem's made that way because it's trying to push out a Windows driver, I don't know yet if that can be disabled in EEPROM or not.

RichardS
Posts: 3
Joined: Sat Mar 25, 2017 2:40 am

Re: STICKY: USB boot now working on Pi3

Mon Sep 11, 2017 4:16 pm

RaTTuS wrote:
Wed Aug 23, 2017 9:25 am
new PI-2's not old ones . . .
Good point --> NEW ONES<-- Be nice to be able to tell the difference don't you think???

I am aware of the RPI command :

vcgencmd version

-- but this just seems to list the version of the second stage boot code that loads from the SD, USB, etc. while the Pi is booting, not the first stage boot loader itself.

-- so how exactly do you find out the FW version of the embedded 32KB HW ROM first stage boot loader???

User avatar
rpdom
Posts: 12302
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: STICKY: USB boot now working on Pi3

Mon Sep 11, 2017 8:00 pm

RichardS wrote:
Mon Sep 11, 2017 4:16 pm
Good point --> NEW ONES<-- Be nice to be able to tell the difference don't you think???
There are various ways to find the model of your Pi. One of the simplest (in Raspbian) is to check the contents of /sys/firmware/devicetree/base/model, which for the older Pi 2B will return "Raspberry Pi 2 Model B Rev 1.1" and will be something different for the later one (sorry, I don't have one of those so I can't check it). Probably something like "Raspberry Pi 2 Model B Rev 2.1".

RichardS
Posts: 3
Joined: Sat Mar 25, 2017 2:40 am

Re: STICKY: USB boot now working on Pi3

Mon Sep 11, 2017 10:55 pm

rpdom wrote:
Mon Sep 11, 2017 8:00 pm
There are various ways to find the model of your Pi. One of the simplest (in Raspbian) is to check the contents of /sys/firmware/devicetree/base/model
Thanks that's good info.

Assuming that the Pi Foundation is smarter than most, and NEVER changes boot code without at least bumping the minor model revision number, then knowing the HW rev number should go a long way in helping track down any mysterious "Why does this image boot on my new board, but not on my old one" type issues.

User avatar
rpdom
Posts: 12302
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: STICKY: USB boot now working on Pi3

Tue Sep 12, 2017 6:31 am

RichardS wrote:
Mon Sep 11, 2017 10:55 pm
Assuming that the Pi Foundation is smarter than most, and NEVER changes boot code without at least bumping the minor model revision number
Remasking the boot ROM code requires a partial chip redesign at least. That costs a huge amount of money. The RPF/RPT aren't likely to change the code until a new Pi is ready to release, and that could be a couple of years yet.

vladimir111
Posts: 2
Joined: Fri Jul 21, 2017 10:43 am

Re: STICKY: USB boot now working on Pi3

Tue Sep 12, 2017 11:06 am

So you can control which boot devices to check via GPIOs, or only enable certain modes in the OTP in the first place.
I don't know whether just having USB mass storage enabled is faster than, but at least it would avoid some of the timeouts

gomovies
Last edited by vladimir111 on Fri Mar 02, 2018 6:45 am, edited 3 times in total.

chengjianwen
Posts: 4
Joined: Tue Mar 04, 2014 12:08 am

Re: STICKY: USB boot now working on Pi3

Tue Sep 12, 2017 11:33 am

I tried with my pi3 + pi-driver foundation edition HDD + raspbian-stretch-lite yestoday, it can work. I tried with berryboot then, it worked too. The berryboot support usb-boot and you can append "program_usb_boot_mode=1" to /boot/config.txt to enable it.

Sometimes it can't boot when I hot rebooted it use reboot command. I must cold reboot (pull out and then in the power line). Any way, it worked till now.

Best Regards.

feelslikeautumn
Posts: 171
Joined: Wed Aug 09, 2017 9:51 pm

Re: STICKY: USB boot now working on Pi3

Tue Sep 12, 2017 1:39 pm

new PI-2's not old ones
To clear up confusion, can a pi 2 bought now boot from USB?

evangelyul1
Posts: 6
Joined: Sat Mar 25, 2017 12:37 pm
Location: Athens, Greeece

Re: STICKY: USB boot now working on Pi3

Fri Sep 15, 2017 6:02 am

hi all

so it works for me WITHOUT SD card (RPi 3) just the USB stick (old Transcend 16gb) albeit slower
than booting from combo SD.--redirect to sda2 (USB). I used WinImage
to create SD and USB.
1. created SD card with Jessie light (2017-07-05-raspbian-jessie-lite.img)
2. created USB stick with same image
3. booted from SD card, updated, upgraded and added on config.txt the line:

Code: Select all

 program_usb_boot_mode=1 
4. rebooted and checked USB boot enabled with:

Code: Select all

  vcgencmd otp_dump | grep 17:  
i got the OK message : 17:3020000a
5. powered-off and removed SD
6. powered-on and after ~ 15 sec it came on-line, resized automatically the 2nd partition (sda2), rebooted again and it runs OK

HTH ED1: i also confirm the full pixel image of last April working on a Nextech 16gb USB in Canada.

evangel in YUL
RPi 3 B owner / user

Return to “General discussion”

Who is online

Users browsing this forum: uilfut and 9 guests