Author Topic: Running FOG (Free Open Ghost) PXE server on the same machine as Zentyal  (Read 7161 times)

B0UJI

  • Zen Apprentice
  • *
  • Posts: 30
  • Karma: +3/-0
    • View Profile
Hey all,
          This is really late but I had some experience late last year setting up FOG to work on the same PC as Zentyal.  This is good because you can have it all package in one server to network boot installations or useful utilities you might need on the network (i.e my Automated Windows Install).

However, there is one CATCH!   I have noticed subsequent to my FOG install, all the pictures in the Zentyal interface are gone!  Nothing is broken as far as I can tell it all works just as it did, but the Zentyal logo and little pictures in options are no longer showing  :o

First up, you need to have a Zentyal install!  Definitely with DHCP and DNS running.

Download FOG 0.32 from here:http://sourceforge.net/projects/freeghost/files/ onto your Zentyal Server

- Go to the advanced options in DHCP on the Zentyal Server
     -Under the "Thin Client" option (Swear in Zentyal2.2 this was called something else)
             -Next Server = Host
             -Host = (IP of your FOG Server)
             -File Path = pxelinux.0

That's it!  I've successfully had Images booting from FOG for a while now.

BUT!  If anyone wants to do this as well and help me on my lost images problem I would be most grateful!!!

lotomas

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Running FOG (Free Open Ghost) PXE server on the same machine as Zentyal
« Reply #1 on: February 27, 2013, 09:16:13 pm »
Oh, now I understand what you mean with "image problem"... After installing FOG the static images from the Zentyal administration panel have disapeared, you can work with the panels but it doesn't show any image at all....

What could happen for this sympthoms??

lotomas

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Running FOG (Free Open Ghost) PXE server on the same machine as Zentyal
« Reply #2 on: February 28, 2013, 10:51:38 pm »
Wow, a lot of hours later finally I've get fog working into Zentyal 3!! The problems I've found:
1. TFTP configuration during installation

During installation appeared:
  * Setting up and starting TFTP and PXE Serverscp: accessing `/tftpboot/': Not a directory
../lib/ubuntu/functions.sh: line 251: /tftpboot/pxelinux.cfg/default: Not a directory
...OK

Solution:
$ sudo rm /tftpboot
$ sudo mkdir /tftpboot
$ sudo cp -r FOT_INSTALLATION_DIR/packages/tftp/* /tftpboot/
$ find /tftpboot -type d -exec chmod 755 {} \;
$ find /tftpboot ! -type d -exec chmod 644 {} \;
$ sudo chown -R fog:root /tftpboot
$ sudo vim /tftpboot/pxelinux.cfg/default #Here you need to check that the dns and web IPs are correct (it will be incorrect for sure)

If you don't have this problem, may be you are asked for a password when trying to operate with Fog, the password is in the begining of this file and you need to set it manually
If the previous solution doesn't work you can also copy the contents of the /tftpboot/pxelinux.cfg/default from the contents of the script ./lib/ubuntu/functions.sh (line 179). In this case you need to manually set the ${dnsbootimage} and ${ipaddress} to get it working.

In case of more problem is useful this link: http://www.fogproject.org/wiki/index.php/Modifying_the_Init_Image

2) Read with detail this howto about how to upload images to the server http://www.fogproject.org/wiki/index.php/Booting_into_FOG_and_Uploading_your_first_Image
3) Configure the firewall to accept ports 111 and 2049 (or temporary close it with $ sudo /etc/init.d/zentyal firewall stop) to be able to upload the image to the server


Next step, solve the administration problem with the images  ;)


lotomas

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Well, I think I've solved the problems with the pictures.

By some reason in the apache2.conf is ignoring the configured DocumentRoot, and the RewriteRule is not working propertly. You can see the generated apache2.conf here: /var/lib/zentyal/conf/apache2.conf

This file is generated automatically every restart of the zentyal apache module, so, to modify it we need to change the /usr/share/zentyal/stubs/core/apache.mas file, and replace the line 271 from:
    RewriteRule ^/data(.*) $1 [L]
to:
    RewriteRule ^/data(.*) /usr/share/zentyal/www$1 [L]

After the change you need to restart the admin server with:
- /etc/init.d/zentyal apache start
- /etc/init.d/zentyal apache stop

Anyway, since the change I'm experiencing some cpu load problems, but I can't assure that the reason of the load is this change.
(5 minutes later)
The problem was the log module, kworker was generating a lot of cpu usage... I will investigate it.

Cheers!

lotomas

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Another problem, if you have the Zentyal FTP server enabled you need to set the SSL support as optional, if you set it as strict you will get the error: "Unable to start task, Unable to connect to tftp server"