PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Pi 3 Network Boot won't work. Driving me nuts.

Sun Mar 18, 2018 1:10 pm

Hello,

I've followed the "Network Boot Your Raspberry Pi" tutorial precisely repeatedly but just can't get it to boot my Pi 3 client. This is the second full evening I've spent trying, so I decided I'd better finally ask for help. I am using two Pi 3s on my local area network. I started this activity with Raspbian Lite Stretch freshly installed on my SD.

I think the big clue may be at the point in the tutorial where it says:

"Now start tcpdump so you can search for DHCP packets from the client Raspberry Pi:

sudo tcpdump -i eth0 port bootpc

Connect the client Raspberry Pi to your network and power it on. Check that the LEDs illuminate on the client after around 10 seconds, then you should get a packet from the client "DHCP/BOOTP, Request from ..."

IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb...


I power up my client Pi but my system just sits there, nothing being displayed. One LED on the client board flashed once (only) a few seconds after I powered it up. I completed the tutorial but am not surprised it didn't boot for me because of issues at this point. If I can get past this I am confident everything will start working.

Some ideas please about what I should try.

Thanks much!

epoch1970
Posts: 2011
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Pi 3 Network Boot won't work. Driving me nuts.

Sun Mar 18, 2018 4:22 pm

Verify the usb_boot OTP bit is programmed and this is a Pi 3, not a Pi 2.
Remove any SD or USB device from the Pi. You want to make sure it boots from ethernet.

Then simplify your network topology (up to a simple direct link) and check you hear the Pi looking for a server.
If you hear nothing, power it down, wait a bit and power it up again. If the initial frames are not sent by the Pi every time, at least they should be most of the times.

Then gradually reinstate the network topology to what it should be and see if you still hear the Pi. If there is a switch in the way and it is of the manageable kind, check that various port settings don’t make a difference: energy management (green Ethernet), link management (auto select), port management (fast forward).

Once you’re there it’ll be a matter of verifying the DHCP servers hear the Pi and cooperate, and the TFTP server sends the right files.
Overall it should work, just not every single time.

Booting with an SD containing only a special (?) boot.bin -reformat an SD to VFAT, put this file and nothing else-, or with the new Pi 3b+ is said to be less temperamental. You can try that if your Pi 3 stays mute yet the OTP is set.
Many PCs, virtual machines can be set to boot through the network. If you’re making no progress at all, verify such a device actually boots when connected just like the Pi (same cable, same switch port...)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Mon Mar 19, 2018 9:32 am

...Then simplify your network topology (up to a simple direct link) and check you hear the Pi looking for a server. If you hear nothing, power it down, wait a bit ... etc.

Jeez, I am embarrassed! I never heard the term "network topology" until now and can only guess what that means. I have a router which is cable connected to my local area network in the adjacent room. My Pi 3B network booting server is connected and running on static address 192.168.1.122 as set up in the /etc/network/interfaces file per the instructions. I can't have more of a "direct link" than that, can I? My client Pi 3B is connected on a different port (yet to be assigned by DHCP I assume? So it can't also be set up as static? Oops?).


=============
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto eth0
iface eth0 inet static
address 192.168.1.122
netmask 255.255.255.0
gateway 192.168.1.1

============

"...check you hear the Pi looking for a server.
If you hear nothing, ... etc..."


I almost spit out my coffee
, "check you hear the Pi looking for a server?" :o I should listen to my Pi? Put my ear down there? My hearing isn't that great these days you know. Plug a headset into my Pi? And listen for my Pi "looking for a server"? You mean like hearing little beeping tones? I can't believe I am typing these things! :oops: :lol: Can I be this poorly informed or poorly learned about my Pi or am I just this damned dense to correctly follow a tutorial? :roll: Wouldn't be the first time though....I bet I don't have a 10% first attempt tutorial success rate.

Thanks for trying to solve my dilemma. Sorry I can't comply better. Perhaps you could try again?
Last edited by PorterDon on Mon Mar 19, 2018 11:35 am, edited 11 times in total.

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

Re: Pi 3 Network Boot won't work. Driving me nuts.

Mon Mar 19, 2018 9:40 am

92.168.1.122 as set up in the /etc/network/interfaces
which instructions are you following post a link so we can see how out of date they arfe
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


epoch1970
Posts: 2011
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Pi 3 Network Boot won't work. Driving me nuts.

Mon Mar 19, 2018 11:40 am

PorterDon wrote:
Mon Mar 19, 2018 9:32 am
I never heard the term "network topology" until now and can only guess what that means. I have a router which is cable connected to my local area network in the adjacent room. My Pi 3B network booting server is connected and running on static address 192.168.1.122 as set up in the /etc/network/interfaces file per the instructions.
Well now. http://lmgtfy.com/?s=d&q=wiki+network+topology
In your case:
a) Hook the Pi server to a keyboard and screen,
b) Take the client Pi next to your server,
c) Put an ethernet cable in the ethernet ports of the Pis. Direct connection.
d) On the Pi server make sure the OS sees eth0 is up, then "sudo tcpdump -vvv -i eth0 port bootps" in the console
e) Power up your Pi client and look at the console. At least a few lines should print out.
Power it off/on again a few times and see how repeatable it is.

Now, disconnect your Pi client, reconnect it to the switch in the router. Reconnect the Pi server to the switch in the router.
Power up the client. Try a few times varying the amount of time the Pi stays powered off. Check whether powering down the client for more than 5 minutes causes a different outcome. On the console of the Pi server, do you see the same traces as before?
a) No traces at all or very little traces => your switch gets in the way, look at its settings or try another one.
b) Yes same traces => your network topology is ok. The problem resides in how the Pi receives (or not) a reply from the DHCP servers. If dnsmasq on the Pi and the DHCP in the router fight each other usually dnsmasq loses the battle and your Pi client stays there waiting. I would suggest you shutdown the DHCP service in your router, and setup dnsmasq in the Pi to take care of all computers on the LAN.

Good luck.
Last edited by epoch1970 on Mon Mar 19, 2018 11:54 am, edited 6 times in total.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

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

Re: Pi 3 Network Boot won't work. Driving me nuts.

Mon Mar 19, 2018 11:49 am

If you have a spare laptop it's far easier to use Rpi x86 Desktop for the server side, at least for testing
as that's all pre-setup correctly for you (Piserver menu)

https://www.raspberrypi.org/downloads/
Android app - Raspi Card Imager - download and image SD cards - No PC required !

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Mon Mar 19, 2018 1:15 pm

I do have a spare laptop as a matter of fact Mike. I'll check that route out too. If this way turns out to be too unreliable I'll consider it. I'm building a cluster and wanted to use ethernet booting as much as practical. I have 9 Pi in the cluster so far with 4 more Zeroes to add. I also have an ODROID stack (2 XU-4, 2C2, 1HC1), then an additional stack with dozen or two miscellaneous boards including an 18-core Parallella, Intel Atom, an Intel NUC3700 with an UDOO Quad enroute. In the end I'll have about 40 or so micros, then I'll try to use my programming background to do something with it. Ultimately I want a cluster which is completely heterogeneous in terms of micros and operating systems. My extensive Fortran background should come in handy when looking at parallel processing options.
Attachments
rsz_gert_3-19(1).jpg
rsz_gert_3-19(1).jpg (132.59 KiB) Viewed 1075 times
Last edited by PorterDon on Tue Mar 20, 2018 4:56 am, edited 1 time in total.

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Tue Mar 20, 2018 4:44 am

From epoch97:

In your case:
a) Hook the Pi server to a keyboard and screen,
b) Take the client Pi next to your server,
c) Put an ethernet cable in the ethernet ports of the Pis. Direct connection.
d) On the Pi server make sure the OS sees eth0 is up, then "sudo tcpdump -vvv -i eth0 port bootps" in the console
e) Power up your Pi client and look at the console. At least a few lines should print out.
Power it off/on again a few times and see how repeatable it is.

Now, disconnect your Pi client, reconnect it to the switch in the router. Reconnect the Pi server to the switch in the router.
Power up the client. Try a few times varying the amount of time the Pi stays powered off. Check whether powering down the client for more than 5 minutes causes a different outcome. On the console of the Pi server, do you see the same traces as before?
a) No traces at all or very little traces => your switch gets in the way, look at its settings or try another one.
b) Yes same traces => your network topology is ok. The problem resides in how the Pi receives (or not) a reply from the DHCP servers. If dnsmasq on the Pi and the DHCP in the router fight each other usually dnsmasq loses the battle and your Pi client stays there waiting. I would suggest you shutdown the DHCP service in your router, and setup dnsmasq in the Pi to take care of all computers on the LAN.

The above test was sent to me by epoch1970. I performed it just now.

Results: a) no traces at all.

So my router is screwing things up somehow. Now I know where to look next. The direct link between the server and client worked fine.

My next challenge would be to determine how my router, a Huawei VDSL HG630 v2 4 port WiFi) should be configured for this scenario. All I've done in the past is to set up port forwarding for port 80 to my LAN static port 97. My LEMP webserver works flawlessly for my Wordpress site. I would suggest the official tutorial be enhanced to include router/switch settings.

Your patience is recognized and your help is much appreciated. (BTW, I've been programming/software all my life, very little hardware and no networking whatsoever before getting my Pi several years ago. Surely no surprise.)
Last edited by PorterDon on Thu Mar 22, 2018 10:38 am, edited 1 time in total.

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Wed Mar 21, 2018 11:03 am

From Mikerr

"If you have a spare laptop it's far easier to use Rpi x86 Desktop for the server side, at least for testing
as that's all pre-setup correctly for you (Piserver menu)

https://www.raspberrypi.org/downloads/"


Here I go again. I just can't take a hint, run with it, and actually get somewhere. That link is for general Raspi downloads, I see nothing regarding or leading to a "Piserver meno" unless it contained in NOOBS somehow. Please give me a link which more specifically leads me how to use RPi x86 Desktop as a server to network boot a Pi.

Thanks for the idea.
Last edited by PorterDon on Wed Mar 21, 2018 11:39 am, edited 1 time in total.

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

Re: Pi 3 Network Boot won't work. Driving me nuts.

Wed Mar 21, 2018 11:09 am

That page has Rpi x86 desktop download:

"DEBIAN STRETCH WITH RASPBERRY PI DESKTOP" (their caps)
https://www.raspberrypi.org/downloads/r ... i-desktop/

how to use the included PiServer:

https://www.raspberrypi.org/blog/piserver/
Android app - Raspi Card Imager - download and image SD cards - No PC required !

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 9:59 am

Thanks for another helpful nudge. <failed to find a Thai "wai" thank you bow gif>

Ok, I'm downloading the Rpi x86 desktop as we 'speak'. I looked over the PiServer write-up and it sounds great. But after reviewing the documentation, ( :oops: not surprisingly) I am unsure if it and the network can be configured to accomplish what I want to do.

Once the x86 PiServer has booted the devices, is it still needed? Can it be shut down or suspended, in any event, somehow be put it out of the way and let the other PI happily do their own normal thing? After booting the network, I simply want to be able to SSH into any Pi (from an admin Pi I use to manage my cluster) and otherwise just do usual SSH local area activities. I'm not asking for much, am I? :roll: Perhaps, if not straight-forward, there is a creative way this can be done.

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

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 10:37 am

The x86 server boots the devices by giving access to the whole filesystem on-demand over the network (instead of on SD)
So no, you can't shutdown the server, as then every netbooted pi will find itself without any filesystem access and crash.

You can still SSH into individual pi as normal.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 10:49 am

OK, so be it. Answer: Yes, it was too much to ask for. :( I guess I am back to the original Pi 3 Network Boot route. Once I get it to work on one Pi 3 it should work on all of them and it will be a good, simple solution. I don't need 100% reliability. I won't be booting up a Pi often. Any hints what to look for regarding router settings?

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

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 11:02 am

I'd still advise you to use x86 PiServer, at least for testing as it's preconfigured and guaranteed to work easily.
(you can return to using your own DHCP server once you have the basics working)

Similarly use an SD card with only the single file bootcode.bin on (for testing), as that will netboot without the ROM code and also work on all pi models (I see at least one old model B in your pic)
Android app - Raspi Card Imager - download and image SD cards - No PC required !

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 11:20 am

Makes sense, will do. I am, however, very curious to eventually determine why my original Pi network boot attempts didn't work. If I find anything out I will post here. Anybody else out there with ideas for me to try, please chime in.

Mike -- Thanks kindly,

epoch1970
Posts: 2011
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Pi 3 Network Boot won't work. Driving me nuts.

Thu Mar 22, 2018 1:21 pm

PorterDon wrote:
Thu Mar 22, 2018 10:49 am
Any hints what to look for regarding router settings?
Difficult question. You'd better have a look at the available documentation. In general:
- 1st off we are talking of the switch settings (colocated with the router, in this case.) If server and client are not in the same IP network, no go. Not router between client and server.
- If your switch has an option for defining "fast ports" or something that says "special for DHCP clients" in it, try to enable that.
- If your switch has power-saving options ("green ethernet" or something like that) try to disable that.
- If your switch has port communication options, try setting 100Mbps/full-duplex instead of auto-negociation. Try half-duplex as well.

The simplest is probably to try with a dumb 100mbps switch (the $10, plastic kind) and see how it works. These do not block traffic.
To make it clear the setup would look like that:

Code: Select all

    +-------------------+
    | Router            |
    | Integrated switch |
    +-+------------+----+
      |            |
      +      +-----+-------+
To the LAN   | Dumb switch |
             +-+---------+-+
               |         |
         +-----+--+ +----+---+
         | Rpi    | | Rpi    |
         | Client | | Server |
         +--------+ +--------+
The other option is to find a manageable switch and play with the settings it offers.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 24 guests