I’m having a related problem. The delayed deployment works but the time is wrong. For example if I tell it to deploy anything less than 6 hours from now it says that the time specified is in the past.
Posts made by mecsr
-
RE: Schedule Delayed Deployment is not working anymore
-
RE: Bugs in FOG 1.0.0
I figure I should mention this. I’m not sure if this was on purpose to encourage a better default password or not, but in the /var/www/fog/commons/config.php there was a password in the ftp and tftp password field that looked like it was left in by accident perhaps. I recall before the default was either blank or “password”
Thanks,
-JJ -
RE: Bugs in FOG 1.0.0
I downgraded to the official release of 1.0.1 and I was still having the same problem.
So I tried again doing an install without my script and re-editing and moving the files. According to the error I found in the apache error.log it had to do with not connecting to the database. I believe that the line in my script
“wget -O - --post-data=“confirm=yes” “[url]http://{FOGWEBIP}/commons/schemaupdater/index.php[/url]” 2>/dev/null”
was the problem. It’s the only thing I didn’t do. I also made a symlink from /var/www/fog to /var/www/html/fog instead of moving the folder to satisfy the ubuntu 14.04 webroot.Thanks for the help.
-JJ -
RE: Bugs in FOG 1.0.0
I found that and changed it but it’s still broken
Any other thoughts? -
RE: Bugs in FOG 1.0.0
I had posted this in a new thread for Fog 1.0.1 bugs, but I figured it might get more attention in here and that other thread might be redundant for bug reports anyway, so I’ll go delete it.
I just updated to the latest trunk (1696) with my update script ([url]http://fogproject.org/forum/threads/automating-fog-0-33b-svn-updates-in-ubuntu-14-04-with-cron-easily-adapted-to-other-linux-distros.10409/#post-26438[/url]) that has been working just fine for the last 2 weeks. It did update to the first release of 1.0.1 just fine, but I was getting a TFTP can’t find the file error so I figured I could just try updating it to the latest release in case that fixed it. But now all of a sudden I can’t get to the fog management web page and still get the TFTP error when I try to get into the PXE boot. When I try to go to the FOG management webpage all I get is an that says “Content Encoding Error” in firefox and [COLOR=#000000]“[FONT=Helvetica]ERR_CONTENT_DECODING_FAILED” in chrome.[/FONT][/COLOR]
So, in summary, even though all my settings are as they’ve been with everything working perfectly (I’ve double checked this) I suddenly have this content encoding error. According to what I’ve found on the web it probably has something to do with gzip encoding something something.
Any thoughts?
Thanks,
-JJ -
RE: DNSMASQ kills DNS lookup on FOG server
Ok, I think I found what fixed it. It has to do with the /etc/resolv.conf file. I’m running Ubuntu 14.04 server x64 and it defaulted the nameservers to 127.0.0.1 or something of that localhost address sort. All you need to do is make the dns servers you want to connect to appear in there. The trouble is, if you try to edit the /etc/resolv.conf file, your changes will magically disappear.
Lucky for you I already spent the time researching this and know how to get around it. I probably should have posted it somewhere when I did fix it.
Now, this is one of those problems where I tried so many things that I’m not actually sure which fixed it. So I’ll start with the method that I think did the trick and put all the other changes I did too. If you would be so kind as to try them one at a time so everyone knows the important part and I don’t end up telling people to edit more system files then needed and breaking any networks or anything.
[B]Symlink method[/B]
-
delete the current /etc/resolv.conf file with this command “sudo rm /etc/resolv.conf”
-
edit the master resolv.conf file with the command “nano /run/resolvconf/resolv.conf”
The format of the file is nameserver definitions…
For a dns server definition, you use nameserver, you can define more than one, each has its own line
nameserver [I]your.Network’s.DnsServer.Address [/I]
For example, if you wanted the server to use google public dns, you would have one line say
nameserver 8.8.8.8If you are on a enterprise type network that has a domain name you use the search line and the supersede statement The "search" line syntax - search [I]your.appended.domainName[/I] The supersede statement, this is a multiple line statement with the second line indented with a space- supersede domain-name "[I]your.appended.domainName[/I]"; (Quotes are apart of the syntax) prepend domain-name-servers [I]your.primary.dnsServer.address[/I];
(in case anyone hasn’t used nano before, to save and close the file, ctrl + x, then y )
-
Create the symlink to the master file with the command “sudo ln -s /run/resolvconf/resolv.conf”
-
Restart the resolvconf service and the dnsmasq service with “sudo service resolvconf restart” and “sudo service dnsmasq restart”
[I]Note: If the “port=0” line in /etc/dnsmasq.d/ltsp.conf is still commented out, go uncomment it before your restart the dnsmasq[/I] [I]service[/I] -
Do a quick test with “sudo apt-get update” if it succeeds than hooray! otherwise try the next method.
[B]resolvconf interfaces file[/B]
[I]If the symlink method alone didn’t work, it may be necessary to edit the files specific to each network interface, these instructions assume you only have one ethernet device named eth0, but these steps can easily apply to any additional interfaces.[/I]-
Edit the eth0 dhclient file with “sudo nano /run/resolvconf/interfaces/eth0.dhclient”
If you have a domain name, you need a domain line. It is the same as the “search” line in resolv.conf,
except you domain instead of search. i.e. “domain your.appended.domainName” (without quotes)The only other lines you need are the nameserver lines which use the same syntax as the resolv.conf file shown above
so just put in your nameserver definitions the same as before
-
Edit the eth0.inet file with “sudo nano /run/resolvconf/interfaces/eth0.inet”
In this file you only need one line defining your primary dns server with a single nameserver line -
Restart the resolvconf service and the dnsmasq service with “sudo service resolvconf restart” & “sudo service dnsmasq restart”
-
Do a quick test with “sudo apt-get update” if it succeeds than hooray! otherwise try the next method.
[B]resolvconf interface order and base config files[/B]
[I]If the above 2 methods still didn’t do the trick, try editing these 2 more config files. You may try restarting the service after each file to see if you only needed to edit one of them rather than both.[/I]-
Edit the base file with “sudo nano /etc/resolvconf/resolv.conf.d/base”
The syntax of this file is the same as the master resolv.conf file -
Edit the interface order with “sudo nano /etc/resolvconf/interface-order”
This file should already have lots of information in it. I edited so that the top two interfaces are
eth0.dhcp
eth*
It is likely that you only need to have eth* at the top, but this is what I have working. Keep all the rest of the interface order
as it is. -
Restart the resolvconf service and the dnsmasq service with “sudo service resolvconf restart” & “sudo service dnsmasq restart”
-
Do a quick test with “sudo apt-get update” if it succeeds than hooray! otherwise, the problem is something different or the linux distro your using uses the resolvconf service completely differently than ubuntu 14.04 and would require additional research.
I hope this helps. Good luck
Thanks,
-JJ -
-
RE: DNSMASQ kills DNS lookup on FOG server
in /etc/dnsmasqd/ltsp.conf comment out the “port=0” line and it should work with it running. I had this problem too and I did fix it so you don’t have to turn off the don’t function as a dns server option, but I can’t remember what I did. When I find that I’ll post that here too, but I figured a temporary fix that will allow you to still do the pxe boot is better than nothing.
-
Bugs in FOG 1.0.1
I just updated to latest trunk and now I can’t get to the fog management web page.
All I get is an error page that says “Content Encoding Error” in firefox and [COLOR=#000000]“[FONT=Helvetica]ERR_CONTENT_DECODING_FAILED” in chrome.[/FONT][/COLOR]I also started having problems with the pxe boot. I keep getting a TFTP can’t find the file error. All my settings and such are as they’ve been with everything working.
Any thoughts?Thanks,
-JJ -
RE: Automating Fog 0.33b SVN updates in Ubuntu 14.04 with cron (Easily adapted to other linux distros)
This command
wget -O - --post-data=“confirm=yes” “[url]http://${FOGWEBIP}/commons/schemaupdater/index.php[/url]” 2>/dev/null
Seems to have stopped working after the recent updates. -
RE: Clients online.
I didn’t set that up, it’s just the way the network administrators set it up at the university many years ago before I was even here.
But, it looks like none of that matters now. After updating FOG to the most recent update it magically works the way it is. Because someone, most likely Tom Elliott, is a super hero magician server fixing machine and did something in the most recent commit that fixed my problem.
Now onto my subnet and snapin adventures.
Thanks for all the help
-JJ
-
RE: Automating Fog 0.33b SVN updates in Ubuntu 14.04 with cron (Easily adapted to other linux distros)
Adding that line worked beautifully!
I didn’t try adding the schema comparison though. But even if it did try to update the database, wouldn’t it just report back something like 0 rows affected and not be a problem?Also I just noticed that it now shows FOG 1.0 as the version, I don’t know if I just missed that for the past week, but either way that’s awesome. Should I start putting FOG 1.0rc as my version in these posts?
-
RE: Clients online.
Turning off windows firewall doesn’t change anything. The only windows firewall issue is the stealth mode, which is why I made a .reg file that I run with the fog service installer on each computer, and when the hostname on the dhcp server and the netBios/computer name match it does show the host as up, so I’ve ruled out windows firewall. Not to mention, the security people above me wouldn’t be fans of no firewalls on our computers.
Let me try to break down my problem better.
- I want to name my computers based on what building and room it’s in and I want to be able to change that hostname by only changing the computer name with FOG when it moves to another room or elsewhere in the room.
- The dhcp server gives a hostname based on the ip address it gives the computer, which can change when its lease ends.
- For example, I have a computer named b34-20, the dhcp server gives it the ip 10.2.114.179 and assigns it the hostname of tmplab-114-179.
- If I ping b34-20 from the fog server, I get a reply from the tmplab hostname, which I believe has to do with the dns server in some way.
- When I ping b34-20 I get a reply from an ipv6 address (If I turn ipv6 off on the computer I get the ipv4 address). And I can remote in to the computer in remote desktop with the b34-20 name.
- When I do a nslookup, from windows or linux, on b34-20 I get an answer with the dns server name and address but not a fully qualified answer, it just says the dns server can’t find that hostname.
- It currently only works when I have a set name on the dhcp server with a matching netBios/computer name. I did try changing the hostname in just the fog host management entry for testing, but that didn’t do the trick. Even though setting hostnames to each computer would work, I’d like to avoid the extra maintenance of having two inventory systems, because if someone forgets to put a ip’s entry on the dhcp server back that ip won’t go to anyone and it can cause other ip conflicts when the mac address of a leftover computer is on the same subnet. So looking for a different work around, because being able to see in one spot whether or not any host on the network is up or not would be extremely useful.
I’d try using the FOG dhcp, as that would likely fix the problem, but that would be rather complicated to get working properly with an existing DHCP server connected to switches in the ceilings and walls I don’t have access to, it would probably break the network and such.
Sorry that this is such a complicated problem and thanks for the help. Once this is conquered I can try more on my next desire of getting the ipxe boot to boot to computers on the different subnets in different buildings that are on the same network/domain. Setting the dnsmasq/ltsp.conf dhcp-range to an address and netmask that would see all the addresses 10.2.112.x - 10.8.33.x doesn’t due the trick. i.e. 10.0.0.0,proxy,255.240.0.0 I also tried 255.0.0.0, the actual dhcp server address, the gateway of the fog server, the ip of the fog server, and a bunch of other stuff too. But that’s a problem for another day, unless fixing that somehow helps this other problem, which is possible because it has some to do with dhcp.
Thanks,
-JJ -
RE: Automating Fog 0.33b SVN updates in Ubuntu 14.04 with cron (Easily adapted to other linux distros)
The only thing I haven’t yet figured out (not that I’ve tried very hard to just yet) how to automate in this script is the schema update php script that pops up the first time you open the web interface after the update. Every time it checks and then sees that you don’t need the update. If someone else knows a way to do this by maybe using that php file as a quick check without opening the browser, or opening a terminal based browser and automate clicking the two buttons, or just run the mysql command the php script uses in the sh script. Once that is figured out then our journey to the automated side would be complete (Dark side, automated side, same thing right?).
Thanks,
-JJ -
RE: Clients online.
Sorry to reopen a couple month old thread, but I figured it’s better to making a new one if something close already exists.
I’m running FOG 0.33 on Ubuntu Server 14.04.
When you say NetBios rules need to be enabled, is that on the linux or windows side?
I’m trying to find a way for FOG to resolve the netBios name instead of the hostname, specifically in the web interface under host management. Currently fog can’t resolve any of the hostnames because the hostnames are defined by each ip addresss on our DHCP server with . I can add a host name to a ip and mac address for each computer, but to do that and maintain it on top of the FOG inventory would be rather tedious. I did discover in that same dhcp server interface I can add dhcp options like next-server and filename to individual ip addresses, but that’s the extent of my access to the dhcp server settings.
So I have got the server to ping a client with its netBios name, but it shows the dhcp’s temporary hostname as where the packets are received from. I did this by installing the samba and libnss-winbind packages with sudo apt-get install and editing the /etc/samba/smb.conf file to have
workgroup = WORKGROUP uncommented and adding the line
name resolve order = wins bcast host
also edited /etc/nsswitch.conf by changing the hosts: line to
hosts: files dns wins
Those changes get the Fogserver to ping by netBios and to get the first half of a nslookup too.Is there any setting somewhere for us poor users under a separate dhcp dictatorship to use the Fog given hostnames when inventoried that are actually NetBios names?
Hopefully that wasn’t too much information and it made sense, let me know if I need to simplify or clarify my question.
Thanks,
-JJ -
RE: Switching to Gpxelinux
In case anyone was reading this and hoping for an answer to making ubuntu 14.04 (Or any other distro really) Fog 0.33b svn updates easier, smoother, and automated even, I figured out how to do it and put it in a new thread linked below, enjoy
-
Automating Fog 0.33b SVN updates in Ubuntu 14.04 with cron (Easily adapted to other linux distros)
So I had asked in a different forum post (But the conversation had become irrelevant to the original topic so I made a new one) about making the 0.33b updates smoother in Ubuntu 14.04, since there were so many little things that needed to be changed every time.
I managed to solve the problem myself with a script, and since there are updates everyday, I wrote it with running it in cron on a daily basis. I figured I’m probably not the only one that might want something like this and I didn’t see it anywhere else.
The script backs up and restores a few files that are overwritten by a update and moves ones put in the wrong place, it also downloads and runs the most recent update as well as some other little maintenance tasks.
I attached the script and the content of it is below. I tried to be as detailed as possible with my comments and show other options. You have to put your sudo/user password in the script and the cron entry as cleartext, which could be a security risk if your fog server’s files are exposed to the outside world in someway, but it’s the easiest way I found to use sudo commands unattended.
Note: If you were using an older ubuntu with the /var/www webroot you could probably just take out the bit about moving the fog folder to the proper webroot. I hope this helps somebody out[I]Edits:[/I] I found there were a few things I missed and just added such as
- Making the mysql database check run without opening the browser (Thanks to Tom Elliot)
- changing the permissions of the /images folder so that the fog can rename/move the image from the dev folder
- Adding the symlink for the undionly so that ipxe still works.
- Updated the attached script with this
- Note: You may need to run dos2unix on the script before running it
- Edited some formatting in the script comments in the forum post
- Note: This script will still work with Fog 1.0.x because the svn address is still the same and it does work for upgrading from 0.33b to 1.0.x
This script is designed to run an automated update
of the latest FOG server SVN trunk release-amajig through a cron entry
(crontab -e to edit cron entries) on ubuntu 14.04
the cron entry to run this everyday at 3 am for example would be
0 3 * * *
echo "sudoPassword" | sudo -S /home/fog/UpdateFog33bCronJob.sh
Once a week at 3 am on sunday would be
0 3 * * sun
echo "sudoPassword" | sudo -S /home/fog/UpdateFog33bCronJob.sh
-------------------------------------------
[U][B]# Some prereqs for this script[/B][/U]
Already have an existing working install/configuration of FOG 0.33
svn is installed, can be done with “sudo apt-get install subversion”
A folder for the installs in your home folder, for example it can be created with
mkdir /home/fog/fogInstalls
dos2unix is installed, can be installed with “sudo apt-get install dos2unix”
-------------------------------------------
Now to start installing
First, run ubuntu updates and enter sudo mode
echo “[I]yourSudoPassword[/I]” | sudo -S apt-get update -y
sudo apt-get upgrade -y-------------------------------------------
Copy the latest versions of any files you’ve changed that will be overwritten by the update.
For example
the necessary ones are the config.php files with your corrected webroot and stored credentials (i.e mysql)
If you’ve updated the kernel, the bzimage for that kernel and any extra custom kernels you may have
If you have a custom background for the pxe menu, the bg.png file
It’s a good policy to also have backups of these outside of your server via ftp, in case the config file somehow
gets reset to the default and starts copying that as the backup.
sudo cp /opt/fog/service/etc/config.php /home/fog/fogInstalls
sudo mv /home/fog/fogInstalls/config.php /home/fog/fogInstalls/optConfig.php
sudo cp /var/www/html/fog/commons/config.php /home/fog/fogInstalls
sudo mv /home/fog/fogInstalls/config.php /home/fog/fogInstalls/commonsConfig.php
sudo cp /var/www/html/fog/service/ipxe/bzImage /home/fog/fogInstalls
sudo cp /var/www/html/fog/service/ipxe/bg.png /home/fog/fogInstalls-------------------------------------------
If you want to have a folder for each installer follow my example below
Otherwise, if you want to save harddrive space and not have to delete folders all the time,
skip that part and just use rm -rf on the last installer folder
And make a new one and download it there, I just like having backups.
if you wanted to make a cron job to delete the old folders automatically it would look like this
for deleting any folders 2 weeks old at 4:44 am every sunday
44 4 * * sun
echo "yourSudoPassword" | sudo -S find /home/fog/fogInstalls -type d -mtime 14 -exec rm -rf # {} \
This would find all directories that have been modified at least 14 days ago and execute the command rm -rf
If you want to see what folders it will delete for testing take out everything from -exec on -------------------------------------------
Single Folder Method (You can uncomment this next section to reuse the same folder)
cd /home/fog/fogInstalls
rm -rf /home/fog/fogInstalls/currentInstaller
mkdir currentInstaller
cd currentInstaller
-------------------------------------------
New folders with time and date method (Comment out this section if you use the above method)
cd /home/fog/fogInstalls
time_stamp=$(date +%Y_%m_%d_%H_%M_%S)
mkdir ${time_stamp}
cd ${time_stamp}-------------------------------------------
Download latest fog with svn to that folder
Also change the permissions of the fogInstalls folder
So that you have permission to run the install script and move the
backup files later
sudo svn checkout [url]https://svn.code.sf.net/p/freeghost/code/trunk[/url]
sudo chown -R fog /home/fog/fogInstalls
sudo chgrp -R fog /home/fog/fogInstalls
sudo chmod -R 777 /home/fog/fogInstalls-------------------------------------------
Navigate to the new bin folder and run the installer with auto yes prompt
cd ${PWD}/trunk/bin
sudo yes | ${PWD}/installfog.sh-------------------------------------------
remove the old fog webroot folder and move the new one to the html webroot folder
sudo rm -rf /var/www/html/fog
sudo mv /var/www/fog /var/www/html/fog-------------------------------------------
copy the backed up files to their proper places and make sure they’re formatted correct
also recreate the ipxe undionly.0 symlink
sudo dos2unix /home/fog/fogInstalls/.
sudo rm /opt/fog/service/etc/config.php
sudo cp /home/fog/fogInstalls/optConfig.php /opt/fog/service/etc
sudo mv /opt/fog/service/etc/optConfig.php /opt/fog/service/etc/config.php
sudo rm /var/www/html/fog/commons/config.php
sudo cp /home/fog/fogInstalls/commonsConfig.php /var/www/html/fog/commons
sudo mv /var/www/html/fog/commons/commonsConfig.php /var/www/html/fog/commons/config.php
sudo cp /home/fog/fogInstalls/bzImage /var/www/html/fog/service/ipxe
sudo cp /home/fog/fogInstalls/bg.png /var/www/html/fog/service/ipxe
sudo ln -s /var/www/html/fog/service/ipxe/undionly.kpxe /var/www/html/fog/service/ipxe/undionly.0-------------------------------------------
Then change the permissions of the webroot so it can be accessed from the browser
sudo chown -R fog /var/www/html/fog
sudo chgrp -R fog /var/www/html/fog
sudo chmod -R 775 /var/www/html/fog-------------------------------------------
change permissions of images folder
sudo chown -R fog /images
sudo chgrp -R fog /images
sudo chmod -R 775 /images
#--------------------------------------------I find I have to restart apache2 and mysql to get it to finish the job
Alternatively, you could also have it restart the server at this point with
shutdown -r now
sudo /etc/init.d/apache2 restart
sudo service mysql restartRun the database schema check without having to open the browser
wget -O - --post-data=“confirm=yes” “[url]http://${FOGWEBIP}/commons/schemaupdater/index.php[/url]” 2>/dev/null
[url=“/_imported_xf_attachments/0/720_UpdateFog33bCronJob.zip?:”]UpdateFog33bCronJob.zip[/url]
-
RE: Switching to Gpxelinux
Also, is there anyway to make the updates for .33 releases smoother.
For example the default webroot on ubuntu 14.04 is /var/www/html and I have the move the folder everytime. And I have to add in the mysql password in a few spots. I tried putting some of the settings in the /opt/fog/.fogsettings but it didn’t seem to work for everything.Should I be posting this stuff in a different forum post, it seems to have gone rather off topic from the gPxe/iPxe setup stuff.
Thanks,
-JJAlso, you sir Tom Elliott, are a superhero.
-
RE: Switching to Gpxelinux
Thank you very much.
I updated to the latest release and gave that a try.
It didn’t get to the menu I created with that example. It tried to load a background from a 10.0.7.1 (Or something like that) address and then went back to the original menu with an all blue background. I can’t find a setting anywhere that points to that address.I’m giving the partclone a try on a rather large image (~250 GB) and it’s going slower than it had before. ~900 MB/min instead of ~1.3 GB/min. Though the first smaller partition uploaded in seconds at a speed of ~5 GB/min. Do you know of anyway to set up imaging through http, I understand it’s much faster. I haven’t found any working tutorials just yet.
Though ultimately, I’m just happy it’s working again, and with iPxe and everything. Thanks for all your help.
-JJ
-
RE: Switching to Gpxelinux
I see that now. What would the syntax for that be for booting from an image from a folder at
http://[I]fogIP[/I]/fog/service/ipxe/images/[I]image.iso[/I]How do I know whether or not it’s imaging with http? Is that the default of iPxe or is there some other setting I still need to do?
And is it normal for everything on the server to slow down tremendoulsy when imaging one computer, I feel like that shouldn’t be the case.
Sorry to bombard you with questions, and thank you for your helpful answers.
Thanks,
-JJ