@devrick Ok lets start a crash course in FOG debugging.
First of all the error message with a \r
I think is telling. Did you use a windows computer at any time when you created or edited these scripts? Of so that is why things are a bit crazy. Windows Notepad add a carriage return \r
to the end of every line. This drives linux crazy. You will need to find and load the dos2unix for your fog server’s distro and scrub your post install bash files. If you want to edit these files on a windows computer use notepad++ and your life will be much easier.
Now to the debugging steps.
Using vi or nano add this just below the #!/bin/bash
in fog.custominstall
echo "Running my script"
debugPause
What this will do is display “Running my script” during image deployment then wait. When its waiting hit ctrl-c to exit out of the script. This will toss you back to the FOS Linux command prompt.
Now how to get there.
If you have any open image deployment tasks for this specific target computer cancel them .
Schedule a new deployment task for this target computer, but before you hit the schedule task button, tick the debug checkbox then schedule the task.
PXE boot the target computer. After a few screens of text you will be dropped to the fos linux command prompt.
Key in ip a s
and get the IP address of the target computer
Now give root a password with passwd
make it something simple like hello. This password will be reset on the next reboot so no worries. Now you have the IP address and the root password set you can use Putty or SSH to connect to this target computer remotely. This will help with debugging, copying and pasting.
Now that you have connected remotely, or working right from the target computer’s console lets start the debugging process. Key in fog
at the fos linux command prompt. This will start the imaging process. The system will pause at each debugPause
statements in the deployment process. You will need to hit enter to move to the next step.
After you see the partclone screens close out the next step is your post install script. When you see “Running my script” you can hit ctrl-c and exit the script. Your post install scripts will be in /images/postinstall directory on the target computer. Only vi
is loaded on the target computer, but you can also edit the scripts via the fog server so you can use vi there or nano. If you want to test the deployment scripts again (without needing to reboot) just key in fog
at the FOS Linux command prompt and it will deploy again without needed to touch the FOG WebUI. You can do this over and over again until the target computer reaches the end of the deployment task and tells the FOG server its done. Then the task will be removed from the queue.
My bet is that once you get the extra carrage