HP EliteBook 840 G9 - Cannot deploy image
-
@DC09 Fun fact, the latest dev-branch is currently the same as the just released fog 1.5.10 in the master branch, so you’re techncially on the newest stable branch. Less fun fact, that didn’t instantly fix the problem.
I’m using kernel version 5.15.68 and I know that is working on the 840 g9 aio. I am using ipxe.efi for the bootfile. I believe fog 1.5.10 ships with 5.15.93 and it appears you’ve updated to the 5.15.98 version with the kernel update tool. Is that correct?
Do you still get the
legacy NIC Wrapper
during pxe boot with the new version?Are there any bios updates available for the laptops?
Are there any bios settings related to mac address passthrough or alternate mac? I’ve only ever seen that on lenovo’s that have an embedded ethernet nic that requires a proprietary adapter to connect to, but maybe it’s a thing for more manufacturer’s now?
-
@george1421 Thanks for the reply. I have tried doing a full registration and it completes successfully. I will attempt to schedule a deployment and see if that works, as you recommended. I’ll report back with more details. Thank you!
-
@JJ-Fullmer Thanks for the reply. You’re correct; I did update the Kernel files using the FOG Web GUI, after the dev-branch upgrade. I noticed that the update tool was no longer stating that the kernel files needed to be updated manually, so I gave that a try but it did not change the outcome. The G8 laptops still image properly with the newer kernel as well.
I do still see the legacy NIC wrapper warning during PXE boot. Below is a screen cap of the PXE boot process, showing ipxe.efi as the bootfile and the legacy NIC wrapper message. The new ipxe build is also shown.
I will check on any available BIOS updates and if we have any MAC passthrough settings in the BIOS. The only thing that we typically need to do on HP laptops is to disable Secure Boot, in order to use FOG. I appreciate your help.
Thank you!
-
@DC09 said in HP EliteBook 840 G9 - Cannot deploy image:
I have tried doing a full registration and it completes successfully
That is great news that the mechanics of FOG Imaging works. The same OS that does registration also does imaging. Now we need to understand why deploy image is failing. Your deploy from within the gui will test the imaging code.
I’m thinking that there may be an issue with the image definition you are trying to send with the deploy image from iPXE. But lets see if you can deploy from withing the gui.
-
@george1421 I’ve tried the scheduling deployments from the FOG GUI a couple of times and it fails. The host shows as registered in the GUI and I can schedule the deployment task, but when the laptop boots up in iPXE, it shows that it is not registered. I’ve deleted the host from the GUI and ran full registration again. It shows that the registration completes successfully, but then I have the same issue when deploying a task from the GUI where it shows that it is not registered. Please see the screenshots below. I appreciate your assistance.
Registered Host
Scheduled Deploy Task
iPXE Host not registered
Re-run registration shows host already registered
Thank you!
-
@DC09 said in HP EliteBook 840 G9 - Cannot deploy image:
I will check on any available BIOS updates and if we have any MAC passthrough settings in the BIOS.
Did you check the BIOS settings?
-
@Sebastian-Roth Thank you for reminding me about that. I just went through the BIOS settings and found MAC Pass Through set to “System.” I disabled it and rebooted. The laptop then picked up the imaging task right away and started imaging! At this point, I’m not sure how many of these changes were required, but disabling MAC Pass Through was definitely one of them. I appreciate everyone’s help with this. Thank you!
-
-
-
@Sebastian-Roth So I think I found something related to this that may be a bug.
We recently got some Lenovo x1 yoga gen7’s. They have an internal mac with the pass through option, but usb-c or usb adapter is the only option.
When I have pass through on and register the host with a usb-c mac it registered the host with the passed-through address.
When I then reboot to re-image, the pxe boot menu detected the usb mac instead and said the host wasn’t registered
I added the usb mac to the host manually as a second mac and then it worked fine.
So at different points in the process of pxe boot, it gets a different mac when pass-through is enabled, I’d expect it to always use the passed-through mac.I don’t know if this is a new hardware behavior or new fog behavior. I have another lenovo laptop I need to image today that also does the mac passthrough. I’ll do some testing with that one if I have the time.
-
@JJ-Fullmer said in HP EliteBook 840 G9 - Cannot deploy image:
So at different points in the process of pxe boot, it gets a different mac when pass-through is enabled, I’d expect it to always use the passed-through mac.
Unfortunately there is not much we can do about it if we stick to relying on MACs as the (only) source of identifying hosts. This happens because FOG uses different “compontents” for the PXE booting and imaging process. The PXE menu (and first host recognition) happens with iPXE while when registering/imaging the Linux kernel is doing the job. Each using their own drivers and they can behave differernetly (not have to). Especially the USB adaoters and MAC pass-through bring up this as an issue more and more.
Probably someone with more time in the next months needs to dig into this old Github issue and give it a go: https://github.com/FOGProject/fogproject/issues/198
-
Hello,
I have a similar problem with a laptop: HP ProBook 450 G9 Notebook PC
I can register the workstation on FOG and then deploy my image.
But I can’t deploy the image without registering the host first
When I select “Deploy an image”, I don’t have any compatible one, so I get the same interface as the author of the post. -
-
As for the Windows computers that need an external ethernet adaptor, I took a powershell script the FOG team made and added some lines to lookup the HP computer by serial and update the primary MAC to the HP MAC instead of the adaptor to avoid the “computer already exists” problems. When this is working, I leave the computer on the same adaptor until it’s all imaged and joined to my AD domain before moving the adaptor to another computer to start another image, at which point the script should have fixed the MAC address in the FOG database.
I believe you have to install the FOG powershell API in the base image, and then have this powershell script run after sysprep. I use the Setupcomplete.cmd method by putting a cmd file in %WINDIR%\Setup\Scripts. On an HP, I make sure and have the MAC Address Manager app installed and the service is running before the API script runs.
NOTE I have not used this method since FOG 1.5.6. I’m trying to get my servers updated with 1.5.10.
Setupcomplete.cmd:
Start "Starting HP Services" /wait /separate /realtime CMD /C c:\windows\system32\sysprep\services.cmd Start "Updating MAC Address" /wait /separate /realtime CMD /C powershell -executionpolicy bypass -file c:\windows\system32\sysprep\macupdate.ps1 exit
services.cmd
for /F "tokens=3 delims=: " %%H in ('sc query "HPMAMSrv" ^| findstr " STATE"') do ( if /I "%%H" NEQ "RUNNING" ( net start "HPMAMSrv" timeout /nobreak 3 ) )
macupdate.ps1
<# This script updates the primary MAC address in the FOG database POST sysprep. This is for computers that use the Host-Based-MAC-Address feature to overwrite the MAC address of an attached ethernet dongle (ie the HP x360 which does not have an integrated NIC.) Invoke-FogApi written by the FOG development team. Updated 9-26-2017. #> function Invoke-FogApi { <# .SYNOPSIS a cmdlet function for making fogAPI calls via powershell .DESCRIPTION takes a few parameters with a default that will get all hosts Makes a call to the api of a fog server and returns the results of the call The returned value is an object that can then be easily filtered, processed, and otherwise manipulated in poweshell. i.e. you could take the return value of the default all hosts and run $(invoke-fogapi).hosts | where name -match "$(hostname)" to get the host information for the current computer .PARAMETER fogApiToken a string of your fogApiToken gotten from the fog web ui. Can be set in the function as a default or passed to the function .PARAMETER fogUserToken a string of your fog user token gotten from the fog web ui in the user section. Can be set in the function as a default or passed to the function .PARAMETER fogServer The hostname or ip address of your fogserver, defaults to the default fog-server .PARAMETER uriPath Put in the path of the apicall that would follow http://fog-server/fog/ i.e. 'host/1234' would access the host with an id of 1234 .PARAMETER Method Defaults to 'Get' can also be .PARAMETER jsonData The jsondata string for including data in the body of a request .EXAMPLE #if you had the api tokens set as default values and wanted to get all hosts and info you could run this, assuming your fogserver is accessible on http://fog-server Invoke-FogApi; .Example #if your fogserver was named rawr and you wanted to put rename host 123 to meow Invoke-FogApi -fogServer "rawr" -uriPath "host/123" -Method "Put" -jsonData "{ `"name`": meow }"; .Link https://news.fogproject.org/simplified-api-documentation/ .NOTES The online version of this help takes you to the fog project api help page #> [CmdletBinding()] param ( #took out my api tokens, you can default apitoken strings here or pass them to the function [string]$fogApiToken = 'token...', [string]$fogUserToken = 'token...', [string]$fogServer = "x.x.x.x", [string]$uriPath = "host", #default to get all hosts [string]$Method = "Get", [string]$jsonData #default to empty ) begin { # Create headers Write-Verbose "Building Headers..."; $headers = @{}; $headers.Add('fog-api-token', $fogApiToken); $headers.Add('fog-user-token', $fogUserToken); # Set the baseUri Write-Verbose "Building api call URI..."; $baseUri = "http://$fogServer/fog"; $uri = "$baseUri/$uriPath"; } process { Write-Verbose "$Method`ing $jsonData to/from $uri"; if ($Method -eq "Get") { #don't include body with get $result = Invoke-RestMethod -Uri $uri -Method $Method -Headers $headers -ContentType "application/json"; } else { $result = Invoke-RestMethod -Uri $uri -Method $Method -Headers $headers -Body $jsonData -ContentType "application/json"; } } end { Write-Verbose "finished api call"; return $result; } } # Get MAC addresses of local ethernet adapters, should return only the live (plugged into switch and lit) ethernet MAC. # Will fail if no live adapters found or more than one found. Should ignore WiFi. $colItems = get-netadapter | where {$_.name -like "ethernet*" -and $_.status -match "up"} | select -expandproperty macaddress $c = 0; foreach ($objItem in $colItems) { $c++; $hostMAC = $objItem; } if ($c -ne 1) {exit;} # Remove dashes from get-netadapter for simple match later. Replace the dashes in the MAC with colons, and make lower case for FOG format. $hostMACsimple = $hostMAC -replace '-',''; $hostMAC = $hostMAC.ToLower() -replace '-',':'; # Grab the computer serial number from the BIOS, really only works on brand name computers. $theserial = gwmi win32_bios | select -expandproperty serialnumber if ($theserial -eq $null) {exit;} # Find the database host id number on the FOG server. $hostId = ((Invoke-FogApi -uriPath "inventory").inventorys | Where-Object sysserial -match "$theserial").hostID; if ($hostId -eq $null) {exit;} # With the host id get the primary mac association that matches that host id. $primacitem = (Invoke-FogApi -uriPath "macaddressassociation").macaddressassociations | Where-Object {$_.hostID -match "$hostId" -and $_.primary -eq 1}; $primac = ((Invoke-FogApi -uriPath "macaddressassociation").macaddressassociations | Where-Object {$_.hostID -match "$hostId" -and $_.primary -eq 1}).mac; if ($primac -eq $null) {exit;} $primac = $primac -replace ':',''; # If the MACs are different, update the fog database if ($hostMACsimple -match $primac) {exit;} else { $primacitem.mac = $hostMAC; Invoke-FogApi -jsonData ($primacitem | ConvertTo-Json) -Method "Put" -uriPath "macaddressassociation/$($primacitem.id)/edit"; }
-