Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bug in ipxe when multiple NICs present?
2013-06-06, 01:19
Post: #1
bug in ipxe when multiple NICs present?
I'm seeing a possible bug in ipxe where the following occurs using both an embedded script booting from USB and dropping to command prompt (booting from USB) during boot and attempting to run manually.

The script I'm using (scrubbed of sensitive info):

1 #!ipxe
2 echo Performing DHCP on net1
3 prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||
4 ifclose net0 # attempt to forego all use of net0 (wifi)
5 dhcp net1
6 set 210:string host.domain.com
7
8 echo Net0 IP Address: ${net0/ip}
9 echo Net1 IP Address: ${net1/ip}
10 echo AssetID: ${asset}
11 chain http://${210:string}:8002/ipxe/menu.ipxe.cgi?mac=${net1/mac}&assetid=${asset/uristring}

Line 4 was experimental but its purpose was an attempt to disable the wireless NIC, which I don't want to use.

During the boot process, chain is correctly being called and then ipxe *always* attempts to bring up net0, which will fail. Once net0 fails to come up, ipxe fails to chain because it is unable to hit host.domain.com over net0, I surmise. It does not seem to ever try net1.

When running the steps manually, I was able to get ipxe to hit the chained server only once, however, pxelinux.0 did not run. The server returned http/200 while ipxe returned an error. All manual tests before and after that failed and usually ended up causing the host to reboot. The tests consisted of bringing up net1 (dhcp net1), chain, ctrl+c (kill attempt at bringing up net0), chain again.

Obviously, many things seem wrong in this summary. I wish I had more data to display, but I didn't take copious notes. I'm still running through testing, but my first question is how can I get ipxe to stop trying to use net0 or how can I swap interface assignments so that ipxe defaults to LAN vs WLAN? If I can isolate this question, then I can test and see if there are other issues on my side.

TIA
- Jim
Find all posts by this user
Quote this message in a reply
2013-06-07, 14:23
Post: #2
RE: bug in ipxe when multiple NICs present?
(2013-06-06 01:19)cloaked1 Wrote:  During the boot process, chain is correctly being called and then ipxe *always* attempts to bring up net0, which will fail.

"chain" itself won't do anything to the network interfaces. Is it possible that what you're seeing is the chained script loading successfully and then issuing a command such as "dhcp"?

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-06-07, 23:36 (This post was last modified: 2013-06-07 23:38 by robinsmidsrod.)
Post: #3
RE: bug in ipxe when multiple NICs present?
cloaked1: There is a couple of things you could do.

The first I'd do is to enable syslog logging (see http://ipxe.org/console) and ensure that work.

The next thing I'd try is to build with DEBUG=script, which should give you more extensive output on where the script goes wrong and stops.

The last thing I'd do is to build a USB stick that only has the driver for the wireless NIC on it. Something like make bin/ath5k.usb DEBUG=script should do the trick if you're using an oldish Atheros wireless adapter. Substitute as necessary. src/util/niclist.pl --format csv | egrep -i '802.11|wifi' should give you the names of most of the drivers available.

I also believe the 210:string option to pxelinux.0 is a full URL, not just a hostname. You should use set 210:string http://my.host.name:8002/ if that is indeed the root config location for pxelinux.0.
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-06-10, 23:36 (This post was last modified: 2013-06-10 23:36 by cloaked1.)
Post: #4
RE: bug in ipxe when multiple NICs present?
Ah, very useful indeed. I was able to determine the problem wasn't with ipxe or my script. The chainloaded URL hits a gpxe cgi script a team member wrote, which is hard coded to use gpxe's net0. Fixed. Smile Thanks for the tips!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)