Hi,
I had read some tutos and understood many things but its not working correctly …
Informations about my stuff :
Server :
FOG Version : Running Version 1.3.5-RC-8 ; SVN Revision: 6066
OS : Debian GNU/Linux 8
Specifications : all images are on a Synology NAS storage : mounted with NAS_ip:/images
The AIM : create universal image. After a deploy, want to FOS will able to install drivers for the good model. Her, just a test with an Optiplex 7010.
Other informations : upload and dowload tasks work like a charm. This topic is only for a downloadpostscript problem.
On NAS, there is :
/images : many images of differents devices
/images/dev/postinitscripts/fog.postint with
Code : /dev/postinitscripts/fog.postint
#!/bin/bash
## This file serves as a starting point to call your custom pre-imaging/post init loading scripts.
## <SCRIPTNAME> should be changed to the script you're planning to use.
## Syntax of post init scripts are
#. ${postinitpath}<SCRIPTNAME>
/images/postdownloadscripts with 2 files : fog.postdownload and fog.drivers :
Code : fog.postdownload :
#!/bin/bash
## blabla
if [ $osid == "5" -o $osid == "6" -o $osid == "7" ]; then #only handling Win7/8/8.1
clearScreen;
mkdir /ntfs &>/dev/null
ntfs-3g -o force,rw $part /ntfs #mount image
dots "Mounting Device";
if [ "$?" = "0" ]; then
echo "Done";
. ${postdownpath}fog.drivers # run fog.drivers script
umount /ntfs; # unmount when all is done :-)
else
echo "Failed To Mount Device";
sleep 30;
fi
fi
Code : fog.drivers :
#!/bin/sh
ceol=`tput el`;
machine=`dmidecode -s system-product-name`; # Gets machine model
machine="${machine%"${machine##*[![:space:]]}"}" #Removes Trailing Space
system64="/ntfs/Windows/SysWOW64/regedit.exe"; # dirty way to determine if it's 64bit or not
if [ -f "$system64" ]; then
setarch="x64"
else
setarch="x86"
fi
#############################################
if [ $osid == "5" ]; then
osn="Win7"
elif [ $osid == "6" ]; then
osn="Win8"
elif [ $osid == "7" ]; then
osn="Win8.1"
fi
#############################################
dots "Preparing Drivers";
mkdir /ntfs/Windows/DRV &>/dev/null;
echo -n "In Progress";
cabextract -d /ntfs/Windows/DRV "/images/Drivers/$osn/${machine}"/*.CAB &>/dev/null;
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
EOFREG
echo -e "\b\b\b\b\b\b\b\b\b\b\b${ceol}Done"; # this just removes "In Progress and replaces it with done :-)"
folder with the Dell .CAB file : /images/Drivers/Win7/OptiPlex 7010/7010-win7-A09-NWJXJ.CAB (i checked the folder name with the FOG interface, Inventory section of the host)
i created a win7 image with VirutalBox with :
- small install of win7
- folder C:\Windows\DRV
- not in domain
I saved this image with FOG on the NAS.
When i tries to deploy it on my OptiPlex 7010, they are some issues : (debug task mode)
- ntfs-3g : No mountpoint is specified : where the value $part is defined ?
- Préparing Drivers …… Done
- umount : can’t umount /ntfs : invalid argument
- Mounting Directory ……… Done
- /usr/share/fig/lib/funcs.sh : line 895 → 905 : write error : No Space Left On Device
- Mounting Directory ……… Done
- Changing hostname ………………………………… < Freeze
After a “CTRL+C” break :
- ls /ntfs/Windows/DRV : 0 files
If i run manually ./images/postdownloadscript/fog.drivers :-
- fog.drivers : line 23 : dots : command not found
- hard disk computer seem to write some datas …. « Done »
- ls /ntfs/Windows/DRV : 7010 with
–> win7/x64
–> audio
–> chipset
–> ect
After a reboot by ctrl+alt+suppr : i can run Windows 7 but there are 0 files into C:\Windows\DRV
What’s wrong with my setup ?