Postinstall scripts, driver package not found.
-
Hello,
I’ve deploying a single golden image, like the tutorial of george1421, i want to deploy the drivers like the other tutorial (Using FOG Postinstall scripts for Windows Driver injection 2017 ed.).
I followed rigorously the tutorial but when the image is reconstruted, i’ve got an error:- Preparing Drivers…failed
! Driver package not found for ¤HPCompaqPro6305SFF¤/win10/x64 !
I’ve trying with the folder name with space without any change.
I try different files in the drivers folders whitou any results…
It’s under ubuntu server 20.04 and fog project 1.5.9.Thank you in advance for your help.
- Preparing Drivers…failed
-
@fred06 Well I’m wondering if there are unprintable characters around the name like in your OP. I only really tested the script on Dells.
If we use this document as a reference: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed
In the fog.copydrivers script
This is the code that builds the source directory
remotedriverpath="/images/drivers/$machine/$osn/$arch"
The variable in question here is
$machine
$machine
is built from a dmidecode call in this section of codecase $manu in [Ll][Ee][Nn][Oo][Vv][Oo]) machine=$(dmidecode -s system-version) ;; *[Dd][Ee][Ll][Ll]*) machine=$(dmidecode -s system-product-name) ;; *I[Nn][Tt][Ee][Ll]*) # For the Intel NUC and intel mobo pick up the system type from the # baseboard product name machine=$(dmidecode -s baseboard-product-name) ;; *) # Technically, we can remove the Dell entry above as it is the same as this [default] machine=$(dmidecode -s system-product-name) ;; esac
Since the computer isn’t a Lenovo or a Dell this code is what is called.
machine=$(dmidecode -s system-product-name)
So now we know where to look here is what we need to do to debug this.
- Reschedule a deployment but before you hit the schedule button tick the debug checkbox.
- Schedule the deploy and then pxe boot the target computer (the hp one causing the problem). After a few screens of text on the target computer you should be dropped to a linux command prompt.
- Change roots password with
passwd
give it something simple like hello - Get the IP address of the target computer using
ip a s
- Now you have root’s password change and the target computer’s IP address use putty or ssh and connect to the target computer. This will aid in debugging and capturing the output so you can copy and paste. Once connected vi putty…
- Key in the following command into
dmidecode -s system-product-name
Pay attention to any unprintable or extra space characters. Use putty copy to catch the exact output.
We may need to alter this command to remove more than spaces in the name if extra junk is outputted with the command.
# Removes Spaces in machine name, works better with path definitions machine="${machine%"${machine##*[![:space:]]}"}";
-
@george1421 hello and thank you for your answer and your clarification on the scripts.
I will debug the problem on HP computers as soon as possible (probably Wednesday), if that can make your scripts evolve !! -
Hello,
I make the debug mode, I don’t have suspicious thing:I wonder if the requested files are not present in the folders in fog.
What file extensions do I need? -
@fred06 ok so we now know what dmidecode is outputting. What does the output of
ls /images/drivers
look like? -
the name of the file seems correct to me …
-
@fred06 OK give me a minute to collect a few things. We are going to do a debugging session to see if we can understand what is going wrong with the script.
-
@fred06 It will be a bit easier than I first thought because I have a break point already in the code a the right spot.
- Setup another deployment to this HP computer, but before you hit the schedule task button, tick the checkbox for Debug. Then schedule the task.
- PXE boot the target computer
- After several screens of text where you need to clear with the enter key you will be dropped to the FOS Linux command prompt.
- (for remote debugging do the following 3 steps) Change roots password with
passwd
give it a simple password like hello - Get the IP address of the target computer with
ip a s
- Connect to the target computer with putty or a ssh connection. Remotely connecting to the target computer will help you in the debugging because you can copy and paste commands to the target computer.
- Back to debugging. At the FOS Linux command prompt either locally on the computer or remotely via putty key in
fog
to start the imaging process. - You will need to press the enter key to pass each break point in the imaging process.
- After the partclone screens FOG will call the post install scripts. After you see the text “Preparing Drivers” there will be a break point. Press Crtl-C here to exit the install script. You will dropped to the FOS Linux command prompt once again with the environment at the point where its looking for the files on the fog server.
- This should work, but I’m not sure if the run time variables are kept in place or discarded after you hit the crtl-C. Key in the word
set
if you see variables like clientdriverpath and remotedriverpath then these are the variables in the code at the point where the script is looking for the source files on the fog server. Make sure there are no extra characters in the paths. Use putty to copy the text out and paste it into this thread so I can see what the variables are. - If they are not set then you will have run this command
ls /images/drivers/HPConpaqPro6305SFF/win10/x64
and see if you can see the content of the directory. There has to be something amiss here. Make sure the case of the path is correct. With linux case is important.
If you find something either in the file path or the script you can fix it and restart imaging by just keying in
fog
again. If you need to fix the script for some reason, you will edit the script on the fog server, change was is necessary then restart the imaging process withfog
to see if the script runs as expected. You can restart imaging as long as the target computer doesn’t tell the FOG server its done at the very end of the imaging script. -
When I send the debug mode, I have this message (in normal mode it works…)
-
@fred06 You need to use an imaging Task. You selected “Debug” task, which was not what @george1421 was requesting.
Host -> Tasks -> Deploy -> Check the box for Schedule as Debug
-
@tom-elliotthello,
Excuse me for the long time to do the tests, I don’t have much at the moment for this project.
Here is the photo of the debug (the error message comes up over and over again countless times).