PSD icon indicating copy to clipboard operation
PSD copied to clipboard

BUG: Problems with USB Network Adapter on step "Checking for a valid network configuration"

Open Tenster opened this issue 1 year ago • 8 comments

I have an issue where systems using a USB network adapter simply stop at this step.

In the powershell prompt, it's evident that there is a DHCP timeout. Once a release and renew are performed, the script continues after starting it again.

To address this problem, I added the following line in the PSDStart.ps1 file:

# Check Network
            Write-PSDBootInfo -SleepSec 1 -Message "Checking for a valid network configuration"
            Write-PSDLog -Message "$($MyInvocation.MyCommand.Name): Invoking DHCP refresh..."    
                        $Null = Invoke-PSDexe -Executable ipconfig.exe -Arguments "/release"
			$Null = Invoke-PSDexe -Executable ipconfig.exe -Arguments "/renew"

Tenster avatar Jan 15 '24 16:01 Tenster

From what you described, have you seen if the usb network adapter is not ready at the time the dhcp request is initiated?

GeoSimos avatar Jan 15 '24 22:01 GeoSimos

Good point, I will look into it again. What I find strange is that it already gets an IP before it even starts the job of checking the connection and trying to establish one.

Tenster avatar Jan 15 '24 23:01 Tenster

Well the WinPE boot image is created as it does via MDT, nothing sketchy there, standard WinPE boot image.

GeoSimos avatar Jan 16 '24 19:01 GeoSimos

Sorry for any confusion in my previous message and the late reply.

Upon observing the setup, I noticed that the IP address field begins empty and is filled during the gather step before the actual network check begins.

Upon further investigation, I found no indications that the USB adapter wasn't ready.

The PSD logs abruptly end with it attempting to access the IIs, suggesting the network check step has completed successfully, though it hasn't.

This becomes apparent only upon manually invoking PSDStart again. An error is displayed during the execution of the "ipconfig /renew" task during the Network Check, showing that the DHCP request timed out.

I would be surprised if this issue is related to WinPE.

Tenster avatar Jan 17 '24 15:01 Tenster

What you can do to troubleshoot further, is to run the PSDHelper.ps1 script in your WinPE session and use the commandlets to check parts of the solution. After running the script, you will have the following PoSh modules imported:

  1. Microsoft.BDD.TaskSequenceModule (MDT Task Sequence module)
  2. PSDUtility
  3. PSDDeploymentShare
  4. PSDGather By running "Get-Command - Module ModuleName (names are in the list) you will see the commandlets available. Play a bit with them to reproduce the issue and report back when done. As far as I remember, if the NIC doesn't have a valid IP configuration, the solution is not moving further to the PSDWizard.

Another handy script you can use is PSDPrestart.ps1 which is under X:\Deploy\Prestart in WinPE mode, I suggest that you check it out as it is customizable and as is, it contains some handy functions. That one you can check it first, before the PSDHelper.ps1. Please view the code and it's references as it will give you a good idea how it works.

GeoSimos avatar Jan 17 '24 21:01 GeoSimos

Hi @Tenster, any progress to report?

GeoSimos avatar Feb 04 '24 21:02 GeoSimos

Hello, please excuse my delay in replying. I was unfortunately working on several other projects and didn't get to test. I'll try to test it in the coming weeks as I have to remove my customizations that make it work now.

Tenster avatar Feb 05 '24 17:02 Tenster

We are in the process of adding a better validation module in total, that will solve this is issue long term

DeploymentBunny avatar Feb 09 '24 14:02 DeploymentBunny