Automatic hardware detection & driver installs in FOG
-
#!/bin/sh
ceol=
tput el
;
machine=dmidecode -s system-product-name
;
machine=“${machine%”${machine##[![:space:]]}“}” #Removes Trailing Space
if [ $osid == “5” ]; then
osn=“Win7”
elif [ $osid == “6” ]; then
osn=“Win8”
elif [ $osid == “7” ]; then
osn=“Win8.1”
fi
dots “Downloading Drivers”;
mkdir /ntfs/Windows/DRV &>/dev/null;
echo -n “In Progress”;
cabextract -d /ntfs/Windows/DRV “/fog/Drivers/$osn/${machine}”/.CAB &>/dev/null;
echo -e “\b\b\b\b\b\b\b\b\b\b\b${ceol}Done”;
regfile=“/ntfs/Windows/System32/config/SOFTWARE”
key=“\Microsoft\Windows\CurrentVersion\DevicePath”
devpath=“%SystemRoot%\inf;%SystemRoot%\DRV”
reged -e “$regfile” &>/dev/null <<EOFREG
ed $key
$devpath
q
y
EOFREGcode above will do what you want - change the paths to match your environment or wherever you want to store the cabs but using code example above. you’d put a copy of the cab into /fog/Drivers/Win7/OptiPlex 7010 for example then it will extract the cab and drivers will be installed during sysprep… shouldn’t need any postscripts
-
Great, thanks for the quick reply I will try this!
-
Hello
Thanks for this great work
Where can we get the 2 scripts ? (machinedrivers.sh and driverinstall.sh) the link in: http://www.fogproject.org/wiki/index.php/Auto_driver_Install is brokenCan you repost it ?
Thanks in advance ! -
@giejo63
Link redirect in WIKI http://tinyurl.com/qe58fo2driverinstall.sh -> http://tinyurl.com/qxuxsnj
machinedrivers.sh -> http://tinyurl.com/oqtymea -
@Tom-Elliott said:
@giejo63
Link redirect in WIKI http://tinyurl.com/qe58fo2driverinstall.sh -> http://tinyurl.com/qxuxsnj
machinedrivers.sh -> http://tinyurl.com/oqtymeaSorry but the links doesnt work ?
i can’t access to them -
It works for me. My guess, somebody is filtering the link at your site.
-
@Tom-Elliott said:
It works for me. My guess, somebody is filtering the link at your site.
no i’m not filtered…
I’ve tried from work, from home, from my phone
or maybe the site is unavailable for France … -
That could be a possibility.
Are you able to access:
https://rightclick.fsdnet.ca/display/ -
@Tom-Elliott said:
That could be a possibility.
Are you able to access:
https://rightclick.fsdnet.ca/display/no…
neither from work or from smartphone.
Thanks for your help ! -
@giejo63 give me a few minutes and I’ll host the files for you.
-
@Tom-Elliott said:
@giejo63 give me a few minutes and I’ll host the files for you.
Thanks in advance !!
-
http://tinyurl.com/q4pta4s machinedrivers
http://tinyurl.com/oy5pdm4 driverinstall
-
@Tom-Elliott said:
http://tinyurl.com/q4pta4s machinedrivers
http://tinyurl.com/oy5pdm4 driverinstall
It works
Thanks a lot ! -
Hi,
My postdownloadscript driverinstall.sh is executable (chmod a+x) i’ve modified fog.postdownload but after image deployment (successfully) it doesn’t seem to run fog.postdownlad and driverinstall.sh .
So nothing is put inside c:\Drivers (i ve put some drivers)Any ideas ?
-
@Lee-Rowlett said:
#!/bin/sh
ceol=
tput el
;
machine=dmidecode -s system-product-name
;
machine=“${machine%”${machine##[![:space:]]}“}” #Removes Trailing Space
if [ $osid == “5” ]; then
osn=“Win7”
elif [ $osid == “6” ]; then
osn=“Win8”
elif [ $osid == “7” ]; then
osn=“Win8.1”
fi
dots “Downloading Drivers”;
mkdir /ntfs/Windows/DRV &>/dev/null;
echo -n “In Progress”;
cabextract -d /ntfs/Windows/DRV “/fog/Drivers/$osn/${machine}”/.CAB &>/dev/null;
echo -e “\b\b\b\b\b\b\b\b\b\b\b${ceol}Done”;
regfile=“/ntfs/Windows/System32/config/SOFTWARE”
key=“\Microsoft\Windows\CurrentVersion\DevicePath”
devpath=“%SystemRoot%\inf;%SystemRoot%\DRV”
reged -e “$regfile” &>/dev/null <<EOFREG
ed $key
$devpath
q
y
EOFREGcode above will do what you want - change the paths to match your environment or wherever you want to store the cabs but using code example above. you’d put a copy of the cab into /fog/Drivers/Win7/OptiPlex 7010 for example then it will extract the cab and drivers will be installed during sysprep… shouldn’t need any postscripts
@Lee-Rowlett - Where is it this script is supposed to be placed on the server and its name?
-
@ArchFan
Under: /images/postdownloadscripts/
Name: driverinstall.shJust make sure you call the script from fog.postdownload
${postdownloadpath}/driverinstall.sh
-
@cml said:
@ArchFan
Under: /images/postdownloadscripts/
Name: driverinstall.shJust make sure you call the script from fog.postdownload
${postdownloadpath}/driverinstall.sh
Shouldn’t entering
echo ${postdownloadpath}/driverinstall.sh
on the server output /images/postdownloadscripts/driverinstall.sh, or no? I was having some issues at first and ended up putting the absolute path to rule that out as an issue -
@ArchFan I don’t think so. Not on the server. The client/host during imaging or in the init process itself, yes, the server no.
-
@Tom-Elliott said:
@ArchFan I don’t think so. Not on the server. The client/host during imaging or in the init process itself, yes, the server no.
Gotcha - I’ve had some other issues getting it to work as intended, so it probably wasn’t an issue after all. Thanks Tom
-
@giejo63 I’m running into the same issues. I have a sysprepped Win 7 image that has the C:\drivers location set to look for drivers. I have the drivers on the FOG server in /images/drivers and the scripts are executable. The postdownload file is set to run the script, and I have SetupComplete.cmd on the image set as described in Andrew’s wiki page.
Anyone have some ideas?