Surface 3 - Unable to obtain DHCP
-
@Wayne-Workman No luck with ipxe7156.efi
Same adapter as the one Nicolas was using in this thread - https://forums.fogproject.org/topic/6268/pxe-surface-pro-3/11 However I’m not really sure whether he got it working or if the adapter was at fault or not.
From looking at the other threads, a more generic usb2 Adapter might be the way to go if that does appear to be the issue.
-
@dylan123 While I’m not absolute here, but can you place a dumb (unmanaged) switch between the building switch and this pxe booting computer. I’m trying to apply a spanning tree issue we’ve seen before to this issue. I’m not very confident that its spanning tree, but it may explain the randomness of it working and then not working in a short period of time.
-
@george1421 Hey George, after posting yesterday (and reading other threads) I turned off spanning tree so our network connects to devices rather quickly now which is nice.
I just tried going from surface 3 > dumb switch > network switch > fog server but I’m still getting the same error unfortunately.
Wayne might be right with the adapter, I just find it strange it’s able to hit the FOG menu as it would need to be working via the adapter in the first place to get that far. It is a USB 3 adapter though which going through the threads, people seem to have had issues with. Do you guys think I could buy any USB 2 adapter or is there a particular model/version I should be looking for. I’ve gone through many of the threads Wayne has linked and I’ve only seen one model linked from Amazon (https://www.amazon.com/AmazonBasics-USB-Ethernet-Network-Adapter/dp/B00M77HLII/ref=sr_1_4?ie=UTF8&qid=1455902388&sr=8-4&keywords=ethernet%2Busb%2B2.0%2Badapter&th=1) and I was wanting to see whether I could find anything local before having to go down that route just as it would take a little while to be delivered before I could test to see whether that fixes the issue.
-
@dylan123 said in Surface 3 - Unable to obtain DHCP:
I turned off spanning tree so our network connects to devices rather quickly now which is nice.
Just a word of caution. Spanning tree was turned on for a reason. I don’t recommend that you turn it off. One of the functions of spanning tree is to detect network loopbacks and shut them down. With spanning tree off you loose that protection. That is why I recommended using one of the fast spanning tree protocols. They start forwarding right away and then listen for the bpdu packets.
As for the network adapter, I don’t have a surface pro on my campus so I can’t really give a recommendation. I can say from what I’ve seen so far with uefi and pxe booting, only usb 3 adapters have been mentioned. The uefi firmware has to support the network adapter and the network adapter must support pxe booting for everything to work. With uefi you can’t just grab some random network adapter and expect it to pxe boot.
-
@george1421 Thanks, will keep that in mind about STP.
As for the network adapter, I basically got the USB 2 one from this thread - https://forums.fogproject.org/topic/6515/surface-pro-4-won-t-get-to-registration-menu/158 where Sarge mentions being able to get it to boot with the Amazon usb 2 adapter but not having any luck with a USB 3 one. The one I’ve got is the official Microsoft Surface one which is a USB 3 1Gb adapter.
I have tried through the docking station but I get the same error I get when I try using the USB adapter although I am unable to ping anything when in the fog section so it obviously isn’t working once it loads it up.
-
I don’t want to assume anything, but have you added the kernel argument for the Surface? Try and add “has_usb_nic=1” (minus the quotes).
I am able to image Surface Pro 3s and 4s, using the Microsoft Surface Ethernet adapter. Now, if only FOS could understand to look for USB nics without forcing it to search for them, that would be great.
I should also mention that since the Surface has only 1 USB port, you will need to have a USB keyboard handy. After you are able to boot to the Ethernet Adapter, it will tell you to unplug the usb nic, plug it back in, and press Enter.
Once you pull it out, plug in your USB Keyboard and hit Enter (once in FOS, the Surface keyboard will not be usable). After hitting Enter, unplug the keyboard and plug the USB adapter back in. You will have roughly 5 seconds to complete these tasks (no joke).
Hope this helps.
-
@Scott-Adams Unfortunately, the issue is in “release” back to the system when iPXE starts up. I’ve already tried to figure out a way to “reset” the nic without having the user do anything, and it just doesn’t work, which was more or less WHY the has_usb_nic option was introduced.
-
@Scott-Adams While this comment is based on my experiences with the intel stick computers, to solve your issue use a USB 2.0 powered hub. This will let you connect multiple usb devices to that single usb port on your device. I just have a cheap iogear usb hub as well as several Dell multimedia keyboards (that have a 2 port hub built in). With the intel stick computers, this solution gives me a chance to run a keyboard, mouse, and usb ethernet adapter off the same single device usb port.
-
@Scott-Adams Thanks for the suggestion Scott, to be able to add the kernel argument, you need to be able to register the host first right? I’m unable to register my surface with either the quick or the full register (get the same error back as seen in the 3rd picture). Or is there another way to add the kernel argument?
Also since you’ve had success with your adapter, what model is it? I’ve got the 1663 so just curious as to whether we’re using the same one or not as it would help determine whether that’s part of my issue or there’s something else that needs to be done.
-
@dylan123 You can add, temporarily, to the FOG COnfiguration Page->FOG Settings->Expand All->search for KERNEL_ARGS
Add has_usb_nic=1 there.
-
@Tom-Elliott Thanks Tom, added that in the section you suggested however it’s still not behaving as it should.
Boots to the FOG menu and with the countdown I plug in the surface keyboard so I’m able to select one of the options - any time I unplug the USB Ethernet adapter and put in a keyboard, the keyboard will not respond. Also tried from the docking station with the keyboard and USB adapter but same issue as below.
Once I select my option (whether it’s through using the dock or the surface keyboard), I do get the unplug/replug message as Scott mentioned. When I unplug it, it says "startusb usb2-port1: cannot disable (err = -32). Hit enter and it sleeps for 5 seconds before I get the "Failed to get an IP via DHCP! Tried on interfaces(s): " Also tried not removing the USB adapter and just hitting enter but It’s still unable to get a DHCP address.
When I check to see whether the machine is compatible with FOG, it’s still not able to determine its own mac address when I select that setting so the change to the kernel hasn’t appeared to have helped.
-
@dylan123 FYI, we use the 1663 adapters as well. The way I do this in my environment is I manually added a registration for each of my surface nics (I have two of them). So, when I go to image a Surface, I search for one of my mac addresses for my adapters, change the pertinent information (name, image, etc). Then, I set a deploy task to that client. From there, I can go through the steps of swapping keyboards/usb adapter (@george1421 I know I could use a powered USB hub, but I just don’t).
You could also set up a capture the same way, just choose Capture instead of deploy from the Basic tasks section.
Below are the steps that I wrote up for my environment that does work with imaging Surfaces:
- Search FOG hosts for the Surface MAC address for the Ethernet adapter you are using.
- Rename the host to the desired name and save changes.
- Hold down the Volume UP button, press the power button, then release the power button. When you see the Surface logo appear center screen, release the Volume UP button.
- In BIOS : Select Security. Under Secure Boot, change configuration, select None, click OK. Under Trusted Platform Module, change Enable TPM-Change to Off. Select Boot Config. Verify that all items are selected. Select Exit. Click Restart while holding down the Volume DOWN.
- When the red bar shows up, release the Volume DOWN button. The device should PXE boot and go to the FOG menu.
- Select Deploy Image.
- Select the Surface Pro 4 image.
- When prompted to unplug your USB NIC, unplug the NIC and plug in a USB Keyboard. Press Enter.
- Immediately unplug the USB Keyboard and plug back in the USB NIC. YOU WILL ONLY HAVE 5 SECONDS TO ACCOMPLISH
- Allow the device to image.
- When the device finishes imaging, do not try to join a wireless network, just hit NEXT. Move the device to the correct OU. Run gpupdate on the device.
YRMV, but this works for us.
-
@Scott-Adams Thanks for the clear instructions Scott, gave it a shot but didn’t work unfortunately.
-
Added mac address manually by going host > create new host, as suggested and it skips the countdown window like it knows the task it has been assigned (capture).
-
It says it received DHCP answer on interface net0, speaks to fog server before going to next page
-
message at top says - i8042: Can’t read CTR while initializing i8042
-
continues on, says to unplug your device and replug as you suggested.
-
Unplug and replug although when I unplug it says "usb2-port1: cannot disable (err = -32)
-
hit enter and plug usb Ethernet back in quickly
-
Failed to get an IP via DHCP! Tried on interfaces(s):
-
Says to check network set up and try again. Eventually says press enter to continue.
-
ssh-keygen generating new host keys
-
starting sshd: ok
-
then I get these four lines -
In: failed to create symbolic link ‘/dev/fd/fd’: No such file directory
In: failed to create symbolic link ‘/def/stdin’: File exists
In: failed to create symbolic link ‘/dev/stdout’ : File exists
In: failed to create symbolic link ‘/dev/stderr’: File exists
Running post init scripts… -
Next page, No network interfaces found (verifyNetworkConnection)
args passed:
Kernel variables and settings - which is rather long so I won’t bother typing unless it will be of use.
ev/fd/fd no such file or directory
failed /dev/stdin: file exists.
These were all tried with ‘has_usb_nic=1’ in the host kernel arguments and I tried ipxe.efi, ipxe7156.efi, snp.efi and snponly.efi
When it says it failed to get DHCP, tried on Interface(s): and it doesn’t list any, I feel that is where it might be going wrong but that’s just a guess on my part.
-
-
@dylan123 If you mentioned this already, I apologize. But, are you working with a Surface 3 or a Surface Pro 3? Everything in my environment is a Pro. I’m just wondering if we can take different hardware types out of the mix.
-
@Scott-Adams There are also sub-models of each series. Surface Pro 3 has different sub models.
-
@Scott-Adams Yeah Surface Pro 3.
Build version is 14393 for both the 3’s based on what it says in system information.
-
Just giving this a bump to see if anyone else has any other ideas of what I can try?
Ran the latest update again to get 1.4.3 but still no luck.
Using USB ethernet, I get to the stage of unplugging and replugging before getting the error message -
Unplug and replug although when I unplug it says "usb2-port1: cannot disable (err = -32)
Failed to get an IP via DHCP! Tried on interfaces(s):Using the dock with only ethernet connected it just fails to speak with the DHCP.
Both attempts have gone through a dumb switch as well just to ensure they don’t hang without connection to the network.
Maybe it just won’t work with the surface’s I’ve got, just thought I’d give this one final try.
-
@dylan123 Have you tried George’s suggestion about a powered usb 2.0 hub ? You should be able to get one for less than ten dollars online.
-
@Wayne-Workman said in Surface 3 - Unable to obtain DHCP:
@dylan123 Have you tried George’s suggestion about a powered usb 2.0 hub ? You should be able to get one for less than ten dollars online.
I haven’t yet Wayne mainly due to the fact Scott had success with the same adapter I’ve been attempting to use.
That said, I’m willing to buy one to test with as it would be great to be able to create images of our Surface 3/4s with FOG if possible
I imagine I should be able to buy any USB 2.0 to Ethernet adapter or is there a particular model/brand I should be looking at? I’ve been through some of the threads, particularly the one I linked earlier in this thread with Sarge and his Surface 4. He linked an Amazon 2.0 USB to Ethernet adapter but that’s currently no longer stocked so I can’t purchase that (probably take a while for it to be shipped to Aus anyways).
Think I’ll just go with this if I don’t need to be going for a particular brand/model - http://www.msy.com.au/peripherals/15841--edimax-eu-4208-usb20-10-100-ethernet-adapter.html
I could get one with USB ports as well but I’m thinking that might be a chance to cause another issue although it would be nice not having to swap from keyboard to Ethernet quickly!
-
Finally have some success!
I think it’s been a mixture of things that have made it work this time compared to other attempts. I just tried with ipxe7156.efi instead of ipxe.efi which is what I was trying the other day (I know I previously used ipxe7156.efi with no success) and I was able to quick register it and begin the capture process, rather interesting that it was able to do the quick register and create it’s own host kernel argument of the - has_usb_nic=1 without me having to put that in which is nice. Also had a dumb switch in the middle along with doing more updates so I’m not sure what part has fixed it for me but it appears to be working!
Process for mine which is basically very similar to Scott’s well written instructions but will add everything I’ve done in case it helps someone in the future:
DHCP Server Settings
067 - ipxe7156.efiFog Client Version
Upgraded to FOG 1.4.0-RC-4
Upgraded Kernel Versions so both bzImage and bzImage32 versions are 4.10.9Connection Setup
Network > dumb switch > Microsoft Surface Ethernet to USB Adapter (model:1663) > Surface 3/4 (4 I’ve got to the quick register page, haven’t tested further yet).
Left Surface keyboard plugged inSurface BIOS Settings
Turn Trusted Platform Module off
Turn Secure Boot off
Change boot so network is allowed rather than just SSD - Network > SSDChoose whether to quick register a client or capture/deploy an image.
Once all the above is set up then it’s basically how you do any other FOG image apart from having to disconnect and reconnect the USB network adapter.
Steps -
- Ensure setup is plugged in as mentioned in the connection setup above
- Hold volume down, press power on and hold volume down until red Surface screen appears then let go
- Surface should start booting into fog
- When prompted to unplug USB Nic, plug back in and hit the enter on Surface keyboard
- If you’re quick registering, you should be able to select that option. If you’re capturing/deploying, it should automatically begin that process as you’ve set in the task manager on your FOG system.
Thanks for your assistance @Scott-Adams @george1421 @Tom-Elliott @Wayne-Workman
Thinking aloud, I suppose there isn’t really a way to register all my Surface machines because since I’m using the USB adapters and they’re the device that contains the MAC address (as I found out when I tried register the Surface 4 only to find it was listed as the Surface 3 model I did the quick register for before). Not really the end of the world if that’s the case as I can still create the images required and then just deploy it to the Surface as I wish.