underscore
Posts: 9
Joined: Thu Sep 15, 2016 7:35 am

Re: USB boot now working on Pi3

Mon Sep 19, 2016 1:27 pm

mikerr wrote:I've had a USB booting Jessie Lite image up for a while at
https://sourceforge.net/projects/pi-usb-root/

That can be written direct to USB disk with win32diskimager
Miker, thank you. but I came to that point already following step by step the booting from usb guide.
Then i saved myself one with dd to save the hassle of rsync it again in case i need it.

What i wasn't able to achieve so far is netbooting a Pi3.
I tried with the guide on the website and it didn't netboot the client.
I tried with Dougie alternative way and it didn't netboot the client.
I tried to read an alternative website but that was using different software and i had to google translate it from german.

Either i'm encountering a bug or my new pi3s are broken (but the do usb boot)
or some passages of those netboot howto were not explained clear enough for beginners.

I just want to see the magic happen once, then i can try to adapt one variable at the time.
In this way, an image of a running os for pi3 capable to boot another pi3 would be gold.
As an example, i read somewhere that the fixed ip in pi3 / jessie must be put in dhcpcd.conf instead of the usual debian /etc/network/interfaces
So i did, but in this way i got some complaints when i tried to test my two pi3 (the server and the client) detached from the rest of the network as one Dougie suggestion was.

mikerr
Posts: 2824
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: USB boot now working on Pi3

Mon Sep 19, 2016 4:36 pm

Here's a raspbian lite based tftp server image:

4GB min card
Raspbian Jessie Lite based
Dnsmasq for DHCP and TFTP
NFS with a copy of Jessie Lite

networked client will boot into raspbian lite

https://sourceforge.net/projects/pi-network-boot/

That'll run on any model pi, and a pi3 should then network boot from it.

Best to just connect the two by a single RJ45, or spare network switch to avoid the dhcp messing up your network though :)
Last edited by mikerr on Thu Sep 22, 2016 5:31 pm, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

schnabelvieh
Posts: 4
Joined: Mon Sep 05, 2016 7:01 pm

Re: USB boot now working on Pi3

Tue Sep 20, 2016 2:34 pm

levelcrow wrote:Can anybody get this working with f2fs partitions for root?

Also, is there any way to use PUUIDs instead of /dev/sda2? Or perhaps this doesn't matter, since the /boot is always on /dev/sda1? Is this the case?

I tried running this with the standard instructions, using the fat32 /dev/sda1 and ext4 /dev/sda2 - the boot process works up until trying to mount /boot - which fails and stops the boot process. Has anyone else had this?

I am using an USB 2.0 PNY Attache 8.0GB flash drive.
Hi,

might be to late, but did you adjust /etc/fstab .... ?
After powering on my Pi3 spun up the hdd i've connected via usb. Mounting /boot it stopped like yours.
I did copy the wrong bootcode.bin and start.elf. It was not from the next-branch.
Reverting to the firmware from the next branch helped.

Cheers,

schnabelvieh

malvcr
Posts: 50
Joined: Mon Apr 13, 2015 3:31 am

Re: USB boot now working on Pi3

Tue Sep 20, 2016 2:41 pm

I have another open question, that I think it is extremely important.

To the people that already have the booting process working, did you test if the Raspberry can reboot reliably after the first boot?

And a secondary related question. How many times the reboot process, after the first boot took place, are successful? (reboot can be triggered with a "shutdown -r" command or by pressing ctrl-alt-delete in a connected keyboard).

What I am behind is that, although to boot from the hard disk or another USB connected device could work, it is possible that to reboot the machine (there are many cases where this is necessary), will let to an unstable situation that it is not acceptable and it is important to know that.

In my case, no matter how many different types of devices or how many fresh installations I do (Jessie Lite), I can't keep alive a trustworthy set of rebootings, although usually the first boot after providing electricity for the first time is successful (I even used different power supplies for the disk and for the RPI3, so this is not about lack of electricity).

underscore
Posts: 9
Joined: Thu Sep 15, 2016 7:35 am

Re: USB boot now working on Pi3

Wed Sep 21, 2016 6:21 am

I know that we are probably poking around with some very very 'beta' features
but i do have same Malvcr concern about usb boot reliability.

Something in the shutdown/reboot process is not working properly...usb sticks even when perfectly in use for days
(well at least mine, which are verbatim not listed) as unique memory mass,
got filesystem corrupted in few reboot attempt to the point of not being bootable anymore.
I got better luck into that with an external hd with an extra chord for power.

shutdown -r shouldn't be an issue for a linux machine.

I switched my interest into netbooting (and still i didn't managed!) because should theoretically be more trustable.

I do hope we are helping to build some stable stuff for next sw release but if we don't fix those in a short time i will probably resign to use pi3 with microsd cards at least for the boot process.

I feel like having a beautiful commodore 64 with a disaligned datasette for saving my basic code

neo2121
Posts: 1
Joined: Thu Sep 22, 2016 8:04 pm

Re: USB boot now working on Pi3

Thu Sep 22, 2016 8:11 pm

I have a similar issue. I'm using an external SATA to USB3 enclosure to boot from a hard drive. The first time it booted just fine, then I did some updates, installed some software and rebooted. It refused to boot from then on, the Pi is fine, boots fine off an SD card, the hard drive is fine, it mounts in my Ubuntu system and doesn't have any corruption issues. They refuse to work from then on.

Weird.

underscore
Posts: 9
Joined: Thu Sep 15, 2016 7:35 am

Re: USB boot now working on Pi3

Thu Sep 22, 2016 8:41 pm

I would like to thank Dougie and Mike for the help given into netbooting process.
Key suggestions for not going insane was
keeping tftp-root in dnsmasq.conf pointing to the boot folder *inside* the "client1" folder used as nfsroot

I hope that would be changed in the website guide.

Now back to reliability.
After i have used the netbooted client, what should i do if i want to turn it off.
Is it just a matter of using sudo poweroff ?
Do i have to do something on the server level like maybe restarting dnsmasq or nfs-kernel-server or rcpbind?
I'm asking this because the client1 system does not seems to come up again after being rebooted with shutdown -r now

Also, Dougie told us how to keep multiple clients based on the pi serial code.
What's the best way to give static ip's to those clients ?
Can we use something like
dhcp-host=b8:27:eb:4c:d8:be,192.168.100.15

in dnsmasq.conf ?




safe instructions were keeping th
raspberrypi rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

User avatar
DougieLawson
Posts: 38504
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB boot now working on Pi3

Sat Sep 24, 2016 7:55 am

underscore wrote: I hope that would be changed in the website guide.
You can change it on github and do a pull request.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jr3us
Posts: 22
Joined: Wed Sep 18, 2013 6:34 pm

Re: USB boot now working on Pi3

Thu Sep 29, 2016 8:27 pm

Using the newest image for 09-23-16, the sudo BRANCH = NEXT rpi-update fails as follows:
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** No hash received from github: https://api.github.com/repos/Hexxeh/rpi ... heads/NEXT
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}

Is it a safe assumption that the newest kernel now has usbboot working from the standard kernel in the latest rasbian image?

Thanks in advance.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: USB boot now working on Pi3

Thu Sep 29, 2016 11:08 pm

underscore wrote: Also, Dougie told us how to keep multiple clients based on the pi serial code.
Actually, the original instructions told us how to do that, not sure why it was removed.
underscore wrote:What's the best way to give static ip's to those clients ?
Can we use something like
dhcp-host=b8:27:eb:4c:d8:be,192.168.100.15
The ip address is specified in the cmdline.txt, for dhcp it's

Code: Select all

root=/dev/nfs nfsroot=10.42.0.2:/nfs/client1 rw ip=dhcp rootwait elevator=deadline
For even more 'exotic' things like iscsi, it still uses the same parameter (here it's given 192.168.0.10)

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 ip=192.168.0.10 netmask=255.255.255.0 netroot=iscsi:@192.168.0.30::::iqn.1991-05.com.microsoft:winnas-pdisk-target root=PARTUUID=b104dad1-0172-4fd8-b626-592862348e34 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

User avatar
RaTTuS
Posts: 10549
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: USB boot now working on Pi3

Fri Sep 30, 2016 6:44 am

neo2121 wrote:I have a similar issue. I... then I did some updates, ....

Weird.
what sort of updates - you have probably replaced the kernel
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

pws
Posts: 92
Joined: Mon Apr 11, 2016 4:16 pm

Re: USB boot now working on Pi3

Fri Sep 30, 2016 4:42 pm

Is there any update on where things are at with the USB Boot? I just downloaded the latest updates (with Pixel) to the SD card and attempted to update the USB drive but the USB drive will not boot at all now.

Is msd.md up to date?

Thanks,
Paul

* UPDATE *
I spent quite a bit of time trying to get this to work - starting from scratch (reformatting HD). The current version of "bootcode.bin" is apparently the latest (USB Boot support). Following "msd.md", I simply could not come up with a USB setup that would boot - at all - ever!

I would be willing to try whatever is suggested - I would like to see this resolved.

pws
Posts: 92
Joined: Mon Apr 11, 2016 4:16 pm

Re: USB boot now working on Pi3

Thu Oct 06, 2016 1:31 pm

No responses in days! Has this effort been abandoned? Or, did I miss something?

mikerr
Posts: 2824
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: USB boot now working on Pi3

Thu Oct 06, 2016 1:42 pm

The usb boot firmware is still on branch next

Code: Select all

sudo BRANCH=next rpi-update
https://www.raspberrypi.org/blog/introd ... nt-1264048
Android app - Raspi Card Imager - download and image SD cards - No PC required !

pws
Posts: 92
Joined: Mon Apr 11, 2016 4:16 pm

Re: USB boot now working on Pi3

Thu Oct 06, 2016 10:08 pm

I had previously done this - doesn't seem to change anything.
mikerr wrote:The usb boot firmware is still on branch next

Code: Select all

sudo BRANCH=next rpi-update
https://www.raspberrypi.org/blog/introd ... nt-1264048

datajerk
Posts: 7
Joined: Tue Sep 16, 2014 3:52 pm

Re: USB boot now working on Pi3

Fri Oct 07, 2016 1:27 am

ric96 wrote:
6by9 wrote: 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.
Now this, i like, good old jumper days...
Can anybody tell me exactly how to actually do this? I've read https://www.raspberrypi.org/documentati ... ootflow.md multiple times, but it is not clear (to me) how I'd use the GPIO pins to toggle between SD card and USB boot. E.g. "Subsequently, the boot ROM checks to see if program_gpio_bootmode OTP bit is set, if it is then it reads either GPIOs 22-26 or 39-43 (depending on the value of program_gpio_bootpos)" Where are GPIO pins 39-43? How do I set either program_gpio_bootmode or bootpos and with what values? etc...

I've got USB boot working. And I can boot via SD if I insert it, but I need a way to boot the USB even if the SD card is inserted. Control via the GPIO pins would be perfect.

Thanks.

User avatar
DougieLawson
Posts: 38504
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB boot now working on Pi3

Fri Oct 07, 2016 6:14 am

There's no way to toggle once the one time programmable bit is set.

If the machine has a bootable SDCard, it will boot it. If the SDCard is not present or not bootable it will scan the USB devices to see if any of them are bootable and boot the first it finds. If the bootable USB devices are not present it will send a PXE request out on the eth0 network interface.

That's how it works, there are no external controls to alter that behaviour. Except crudely renaming bootcode.bin so the GPU can't find it.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: USB boot now working on Pi3

Fri Oct 07, 2016 6:35 am

Dougie - the link in datajerk's post contradicts what you say. There is a method to toggle boot modes by way of GPIO pulls, eg you can have it ignore an inserted SD card & boot from USB.

Before setting the relevant OTP bit to enable this you'd better have some ~5k resistors at hand to pull up the GPIO corresponding to your preferred boot vector enable, or the Pi won't boot at all. That's likely why the line used to set that OTP bit hasn't been published.

GPIO's 39-43 aren't accessible on the Pi3, so you'll be using GPIOs 22-26 on the 40-pin header.

datajerk
Posts: 7
Joined: Tue Sep 16, 2014 3:52 pm

Re: USB boot now working on Pi3

Fri Oct 07, 2016 12:25 pm

gregeric wrote:Dougie - the link in datajerk's post contradicts what you say. There is a method to toggle boot modes by way of GPIO pulls, eg you can have it ignore an inserted SD card & boot from USB.

Before setting the relevant OTP bit to enable this you'd better have some ~5k resistors at hand to pull up the GPIO corresponding to your preferred boot vector enable, or the Pi won't boot at all. That's likely why the line used to set that OTP bit hasn't been published.

GPIO's 39-43 aren't accessible on the Pi3, so you'll be using GPIOs 22-26 on the 40-pin header.
Gregeric, that makes sense. Thanks.

Are there any hacks to have the RPI3 not see the SD card? E.g. I have my SD card in a breakout adapter and can manipulate any of the pins.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: USB boot now working on Pi3

Fri Oct 07, 2016 12:51 pm

You could mimic what the compute module does to disable boot from emmc ie disconnect the CMD line from the SD card. The compute module ties the emmc's CMD to Vdd while it's disabled. See https://www.raspberrypi.org/documentati ... EMATIC.pdf

datajerk
Posts: 7
Joined: Tue Sep 16, 2014 3:52 pm

Re: USB boot now working on Pi3

Fri Oct 07, 2016 8:34 pm

gregeric wrote:You could mimic what the compute module does to disable boot from emmc ie disconnect the CMD line from the SD card. The compute module ties the emmc's CMD to Vdd while it's disabled. See https://www.raspberrypi.org/documentati ... EMATIC.pdf
Thank you! Yes this works, just connecting Vcc to CMD has the SD registered as removed and the RPI only boots from USB, if I remove the short, then the SD card boots.

So, next step. Using another system's GPIO pins what would a circuit look like to use GPIO from another system to short these pins? Something as simple as and LED example? Can the Vcc come from another source/system?

Thanks again.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: USB boot now working on Pi3

Sat Oct 08, 2016 4:31 am

Sounds like you aren't breaking the connection between 2837 CMD & SD CMD before pulling SD CMD to 3V3? I wouldn't recommend that.

See the switch at lower left of sheet 3 of the CM schematic - that's what you need to replicate. Yes the GPIO to activate the switch could come from another system. No need to used the other system's 3V3, just connect ground & the control GPIO.

pws
Posts: 92
Joined: Mon Apr 11, 2016 4:16 pm

Re: USB boot now working on Pi3

Sun Oct 09, 2016 4:44 pm

I have reformatted the PiDrive and SD card, started again from scratch, and now have the USB PiDrive booting again with the latest Raspian [Pixel].

All seems well, but I will be hesitant to do any updates to it as that is what broke it all in the first place.

Has anyone come up with a reliable way to update the USB HD so it continues to boot?

Thanks!

Tinderbox (UK)
Posts: 53
Joined: Sat Oct 08, 2016 8:56 pm
Location: England, United Kingdom

Re: USB boot now working on Pi3

Tue Oct 11, 2016 9:44 am

Sounds great, I have only had my Pi3B for a day and i have already had the microsd out a couple of dozen time and was starting to worry about the microsd card reader getting damaged, booting the OS from an usb port would be amazing.

John.
Raspberry Pi 3 Model B

sihui
Posts: 3
Joined: Tue Oct 11, 2016 10:04 am

Re: USB boot now working on Pi3

Tue Oct 11, 2016 10:10 am

DougieLawson wrote: Use sudo apt-get update && sudo apt-get -y dist-upgrade && sudo BRANCH=next rpi-update
DougieLawson wrote: You may need to remove /boot/.firmware_revision to encourage sudo BRANCH=next rpi-update to re-install the USB MSD & PXE bootcode.
Thx a lot, those to posts solved the upgrade problem for me.

Return to “General discussion”