• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Automatically Reimage on Reboot

Scheduled Pinned Locked Moved
General
2
5
2.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    albero
    last edited by Feb 3, 2014, 3:38 PM

    Hello all,

    I was wondering if it was possible to set up FOG in a way that every time a host reboots it fog will reimage the host.

    I have been thinking about how to get this to work and some of my ideas are below:
    Periodically add tasks (for reimaging a host) to the queue so that there is always a task ready for when the host reboots.

    On the FOG server, determine when a reimage task has been completed and then create a new task for the host that has just been reimaged
    

    If you think any of these solutions are plausible or have a better one I would love to hear about it.

    albero

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Feb 3, 2014, 4:07 PM

      The question have, before delving into this concept, is why would you need a system to be re-imaged every reboot?

      Obviously you feel the need, but I’d just like to understand the why. Wouldn’t this mean you’d constantly need to make sure the image is up to date? Also, do you use the FOG Client on the systems?

      If you do use FOG Client, I don’t know how good it will be to do such a thing as the FOG Client (unless you turned it off) will reboot a system if it finds a non-snapin task for the client.

      Does it really have to be re-imaged on every reboot? If not, why not setup a scheduled task that repeats at the same time everyday, or as often as you need it to?

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • A
        albero
        last edited by Feb 11, 2014, 5:11 PM

        Hello,

        Sorry for the extremely late reply. I had quite a few incidents come up and I completely forgot about this thread.

        I would like to re-image the system each time because I am using it as a physical sandbox. I would like to be able to run a malicious sample on the machine for analysis then afterwards re-image it in order to return it to a clean state.

        I don’t believe I use the FOG Client as I did not explicitly install it. I do not want to manually create a new task each time as I would like the process streamlined and automation would be best as it isn’t possible to know when or how often a task will be needed.

        albero

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Feb 11, 2014, 5:24 PM

          You may have to setup a logout script on the system then. Have that script generate the task for you automatically.

          Basically you would need to be able to use MYSQL and FTP. Get a copy of the PXE Task Generated file and place that (via FTP) on the FOG Server in the location: /tftpboot/pxelinux.cfg/

          The MYSQL you would need should contain something along the lines of:
          [code]INSERT INTO tasks (taskHostID,taskStateID,taskTypeID,taskNFSGroupID,taskNFSMemberID) VALUES (‘XX’,‘1’,‘1’,‘1’,‘1’)[/code]

          Of course the XX change the hostID to be that of that particular host.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • A
            albero
            last edited by Feb 11, 2014, 5:42 PM

            Thanks! I’ll start working on that, and I’ll let you know if it works or if I run into any other problems.

            Thanks again!

            albero

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            147

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project