@Tom-Elliott Sorry, for some reason when I posted I didn’t see everyone else’s responses (only Quazz’s).
I’ll give this a go Thanks!
Posts made by RobTitian16
-
RE: Rolling FOG out to US Site
-
RE: Rolling FOG out to US Site
@Quazz Yeah, I could copy it during the postdownload stage. But how would I do so? /var/www/html/fog/client/FOGService.msi doesn’t in the terminal in debug. I can only go as far as /var/www/ and that’s it (I’m not even sure if that’s on the FOG Server or where it’s looking to be honest…)
-
RE: Rolling FOG out to US Site
@Quazz I’ve just tried this with the debug mode enabled and I’ve realised the path to the Fog Service msi is incorrect (I’ve been going down a rabbit hole I dug myself).
I need to get the FOGService.msi from the FOG server (/var/www/html/fog/client/FOGService.msi). How would I go about doing this in the SetupComplete.cmd?At the moment I literally have:
echo "msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
Where “FOG Service Installer.msi” is, I need it to be the location mentioned above so it will pull the msi from the server (if that’s possible).
-
RE: Rolling FOG out to US Site
@Quazz Unfortunately it’s still not copying the msi across.
I wonder if it’s because of the quotations and if it doesn’t like them there.I’ve also noticed that with the following line, it doesn’t put “FOG Service Installer.msi” in quotes in the SetupComplete.cmd:
echo "msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
-
RE: Rolling FOG out to US Site
@Quazz Thanks - will give this a go and see what happens.
-
RE: Rolling FOG out to US Site
@george1421 Yep, sorry - I responded at 1am which is really not a good idea as I had no idea where I was or what I was doing.
I realised after your post I didn’t actually have a section that would copy across the FOG client msi to the Windows system. I tried to add a couple of lines that would copy across the FogService.zip from /root/trunk/packages/web/client and then unzip it, but it never worked when run (it always said it couldn’t unzip /ntfs/Windows/Setup/Scripts/FogService.zip [.zip]"
So, I’ve now unzipped the FogService.zip on the FOG server and try to copy across the “Fog Service Installer.msi”. However, this doesn’t appear to be working, either. Perhaps I’ve missed something? Or perhaps there’s an easier way to get the msi across to the target computer?
# Check if the file FOG Service Installer.msi exists in the source folder and then copy it to the destination on the C: drive. if [ -f "/root/trunk/packages/web/client/FogService/Fog Service Installer.msi" ]; then cp "/root/trunk/packages/web/client/FOGService/FOG Service Installer.msi" "/ntfs/Windows/Setup/Scripts/FOG Service Installer.msi"; fi # Check if the file SetupComplete.cmd exists in the source folder and then copy it to the destination on # the C: drive. if [ -f "/images/drivers/Common/SetupComplete.cmd" ]; then cp /images/drivers/Common/SetupComplete.cmd /ntfs/Windows/Setup/Scripts/SetupComplete.cmd; # append the msiexec command to the end of the setupComplete.cmd file echo "msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd # just in case we edited the setupcomplete.cmd file in unix lets filter it to make it DOS compatible unix2dos /ntfs/Windows/Setup/Scripts/SetupComplete.cmd fi
-
RE: Rolling FOG out to US Site
@george1421 Thanks for the help so far
The SetupComplete.cmd doesn’t seem to be working still - when running it through an elevated command prompt, it says: “the installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor…” -
RE: Rolling FOG out to US Site
@george1421 Thanks, George. Definitely not going to give up here - if anything I’m actually craving more understanding of the coding, etc. which I’ll hopefully gain in time
So I’d have to create this folder structure inside the image first? Can I not do it through the script whilst it’s in FOS? -
RE: Rolling FOG out to US Site
@george1421 Thanks!
Not sure why, but it’s still not copying the SetupComplete.cmd… I wonder if it’s because I made it on the FOG Server itself by just typing: “sudo vi SetupComplete.cmd” and then filling in the file with what I needed for the msi installer. -
RE: Rolling FOG out to US Site
@george1421 haha, I thought that but just wanted to confirm before fiddling
-
RE: Rolling FOG out to US Site
@george1421 Yep, I remembered it from last time.
I did download the file and transfer it to my FOG Server, which is when I had to use dos2linux to convert it as it was giving some unusual errors.
Apparently it really doesn’t like:$sitelocal = "en-GB"; $uilang = "en-US";
As I’m getting this error:
-
RE: Rolling FOG out to US Site
@george1421 p.s. I’m not using the unattend.xml at the moment so those lines can be ignored.
-
RE: Rolling FOG out to US Site
@george1421 I wonder if the syntax of the {print} command is incorrect. I’m getting the following:
Also, as a note, there were a couple of issues with no spaces in the lines with [[! - one I had added the space (to be like [[ ! ) it was working.
-
RE: Rolling FOG out to US Site
@george1421 Thanks for that. I get a couple of errors at the beginning, and it doesn’t copy over the Setup.cmd file (quite possibly because of said errors).
Edit: I’ve noticed the errors I received were because I had copied the file across using Windows, so it couldn’t run the script correctly. I’ll try again now.
-
RE: Rolling FOG out to US Site
@Wayne-Workman Thanks for that.
I thought it would connect to the C drive though as osdiskpart is set to /dev/sda2, which, when looking at the partitions through Parted Magic, shows that is the C drive. -
RE: Rolling FOG out to US Site
@george1421 Also, I seem to be running into an issue with the part (with the error: failed to mount C):
# windows 7 osdiskpart="/dev/sda2";
Edit:
Here’s a screenshot (it does say that the Windows partition is on /dev/sda2 so I’m not entirely sure why it can’t mount it. -
RE: Rolling FOG out to US Site
@george1421 Thanks, George.
Sorry, I should have looked at the wiki first as that explained where it was/what it was.So far, I have the following:
#!/bin/bash . /usr/share/fog/lib/funcs.sh # Windows 10 osdiskpart="/dev/sda2"; mkdir /ntfs 2>/dev/null mount.ntfs-3g "${osdiskpart}" /ntfs 2>/tmp/mntfail # This last section checks to see if the mntfail file exists and if it does then it means the mount failed # so there is no need to continue on with the script. mntRet="$?"; if [ ! "mntRet" = "0" ]; then echo "Failed to mount C:"; # Display what happened. cat /tmp/mntfail; # Give the reader a chance to see what the error was sleep 12; # Terminate the post install script exit 1; fi # This next section determines the IP of the host system, cuts the last two octects and sets the FOGIP variable to # the correct IP address of the FOG server depending on the location (as the subnets are designed by location - i.e. # 10.1 is for the UK, 10.2 is for the US, etc.) myip='ip route get 8.8.8.8 | awk 'NR==1 {print $NF}' | cut -d "." -f1-2'; case "${myip}" in 10.1) sitecode="UK"; timezone="Greenwich Mean Time"; FOGIP="10.1.0.102" ;; 10.2) sitecode="US"; timezone="Eastern Standard Time"; FOGIP="10.2.1.103" ;; *) # Default code for the unknowns - we set the FOGIP to the development server in the UK. sitecode="CompanyName"; timezone="Greenwich Mean Time"; FOGIP="10.1.0.102" ;; esac # Check if the file SetupComplete.cmd exists in the source folder and then copy it to the destination on # the C: drive. if [ -f "/images/drivers/Common/SetupComplete.cmd" ]; then cp /images/drivers/Common/SetupComplete.cmd /ntfs/Windows/Setup/Scripts/SetupComplete.cmd; fi
I’ve made the two necessary directories in: /images/drivers/Common and have created the SetupComplete.cmd there with the following:
msiexec.exe /i FOGService.msi /quiet USETRAY="0" WEBADDRESS="${FOGIP}"
I guess my only question is how would the system then run SetupComplete.cmd? Do I need to add an extra line in the post install script to get it going?
-
RE: Rolling FOG out to US Site
@george1421 Thanks for the suggestion and links - much appreciated!
So, I’ve set the variables depending on IP address in the post-installation script (I can post it if it helps to see what I’m doing).
Now, how do I go about editing the setupcomplete.cmd script? Is this hidden away in FOS somewhere? I just need to add the line you mention in the other thread:msiexec.exe /i FOGService.msi /quiet USETRAY="0" WEBADDRESS="${FOGIP}"
(I wonder if the variable would work like that? It’s my first time doing this).
-
RE: Rolling FOG out to US Site
I wonder if anyone can help me with a further question I have about the US FOG server and the FOG client.
As it stands, I need the US images to have the FOG client installed which then connect to the US FOG server. However, because replication is occurring between the UK (which is the main server) and the US, it’s replicating the images with the FOG client which are configured to connect to the UK server.
I don’t want to turn replication off, but I need the FOG client on the US images to connect to the US FOG client. Is this possible at all? i.e. perhaps through a script or is there a way that FOG can install the client on a newly imaged system that’s configured for the server it pulled the image from? How do others work around this issue? -
RE: RC21 - Can't Deploy Images From GUI. "Image does not exist on any node"
@Tom-Elliott Yep, both have the location plugin installed.