PXE bootup issues on Multi-Ethernet CPU

Technical issues/questions of an intermediate or advanced nature.
Post Reply
ARTDGuy
White ninja
White ninja
Posts: 4
Joined: 01 May 2017, 15:20
Distribution: Ubuntu
Location: US

PXE bootup issues on Multi-Ethernet CPU

Post#1 by ARTDGuy » 01 May 2017, 16:19

So,
I have been experimenting with the Porteus PXE boot option (3.1 I believe) , which is really great.
My issue is that the CPU has multiple Ethernet ports. If I boot Porteus from the "primary" Ethernet port on the booting CPU (the lowest one in PCI space), everything works fine and great.

If I choose another Ethernet port on the bootin CPU, the Porteus Boot menu shows up but when it attempts to load in the startup script but after the
searching for porteus-v3.1-x86_64.sgn file
udhcpc (v1.21.1) started

I just get a bunch of
Sending discover...
Sending discover...


So it mostly comes up but when it attempts to get the rest of the system, I believe it goes for the first found Ethernet port and fails to continue. I can prove this by moving the Connection to the first port of the booting CPU and everything continues on fine.
Basically, it boots the startup menu and script from a secondary Ethernet , but then finishes the download from the primary Ethernet.

I hope this makes sense.

I am looking at the initrd package and attempting to modify linuxrc but I don't see where the control section to select the ethernet really comes into play, and I don't have the experience to figure it out.
Anyone know of an easy hack?

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: PXE bootup issues on Multi-Ethernet CPU

Post#2 by Bogomips » 01 May 2017, 19:05

Welcome to Porteus. The network expert should be turning up on next but one TZ, and hopefully you will get some light thrown on this issue. :)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

ARTDGuy
White ninja
White ninja
Posts: 4
Joined: 01 May 2017, 15:20
Distribution: Ubuntu
Location: US

Re: PXE bootup issues on Multi-Ethernet CPU

Post#3 by ARTDGuy » 01 May 2017, 20:12

From what I can figure out , looking at the code in linuxrc, it would seem that the code scans for all the Ethernet ports in lspci, then attaches the driver to them. Then I can't figure out how one is picked to become the one, and udhcpc is executed.

There is an ifconfig in the same area, but it is after the udhcpc call, it kind of seems to be called before it is required.

There is a part where it appears to be going through every network card and trying to attach a driver to them. That seems to be some kind of catch-all.

ARTDGuy
White ninja
White ninja
Posts: 4
Joined: 01 May 2017, 15:20
Distribution: Ubuntu
Location: US

Re: PXE bootup issues on Multi-Ethernet CPU

Post#4 by ARTDGuy » 01 May 2017, 20:48

Ok , there is another script for udhcpc under /usr/share/udhcpc/default.script that I wasn't aware of, so it looks like my issue may reside in there.

burdi01
Black ninja
Black ninja
Posts: 65
Joined: 18 Aug 2013, 12:09
Distribution: Slackware, Xubuntu
Location: The Netherlands

Re: PXE bootup issues on Multi-Ethernet CPU

Post#5 by burdi01 » 02 May 2017, 09:40

I do not have a Porteus 3.1 version anymore - 3.2 is current for quite some time now.
When looking at a running Porteus Mate 3.2.2 I do not think that the scripts are very different though.
If you are technically up to it have a look at the /opt/porteus-scripts/pxe-server script and especially the /srv/pxe/boot/pxelinux.cfg one: the server puts the "additionals" channels on the first nic.
If things go over your head then do not boot your clients from a non-first nic. 8)
:D

ARTDGuy
White ninja
White ninja
Posts: 4
Joined: 01 May 2017, 15:20
Distribution: Ubuntu
Location: US

Re: PXE bootup issues on Multi-Ethernet CPU

Post#6 by ARTDGuy » 02 May 2017, 15:19

Hey,
The /opt/porteus-scripts/pxe-server and the /srv/pxe/boot/pxelinux.cfg seem to be server side. It is interesting to see how the /opt/porteus-scripts/pxe-server creates and packages the initrd.xz, but my issue is client side.

The client has multiple Ethernet ports, but the script just attaches to eth0 it appears.
I was hoping to find some iterative script that could perhaps check the /sys/class/net/*/ properties on the client to find which one is actually connected to Ethernet , which is sufficient at this point because only one port is in use for this case.
Its too bad there isn't some passed in option from the PXE BIOS that says, "i was using PCI 01:00:00 ethernet port" and then it would be easy.

Anyways, thanks for pointing me at the server side stuff.

Tony

Post Reply