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

MD5 After Image Capture

Scheduled Pinned Locked Moved
FOG Problems
3
12
852
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.
  • C
    cyannella
    last edited by Jan 28, 2021, 4:49 PM

    CZ/Partclone combo will allow an MD5 file to be created after image capture. Expert Mode.

    Can I automatically generate an MD5 file and place it in the captured directory when capturing an image with FOG?

    Thanks

    G 2 Replies Last reply Jan 28, 2021, 5:10 PM Reply Quote 0
    • G
      george1421 Moderator @cyannella
      last edited by Jan 28, 2021, 5:10 PM

      @cyannella We’d have to look to see if a postinstall script is called after an image capture. If it is then a bash script can be created to create an md5/sha fingerprint of the image files.

      The short answer is probably yes.

      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!

      C 1 Reply Last reply Feb 9, 2021, 1:53 PM Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Jan 28, 2021, 5:12 PM

        @cyannella On image capture we don’t call custom scripts that you could use to do the checksum calculation.

        So it looks like you need to either run it on the FOG server (bash script called via CRON) to create checksum files or you’d modify the FOS init.

        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
        • G
          george1421 Moderator @cyannella
          last edited by george1421 Jan 28, 2021, 11:21 AM Jan 28, 2021, 5:20 PM

          @cyannella Ignore this its only for research at the moment

          https://github.com/FOGProject/fos/blob/8d310f51d7d945c5dc1685eb6698d1aed8634dc7/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L2078

          md5sum $imgpart > "$imagePath/d${disk_number}p${part_number}.md5"
          

          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!

          1 Reply Last reply Reply Quote 0
          • C
            cyannella
            last edited by Jan 28, 2021, 6:46 PM

            and if I wanted the FOG client to kick off a .BAT file before it reboots and captures the image, where do I configure that?

            G 1 Reply Last reply Jan 28, 2021, 7:27 PM Reply Quote 0
            • G
              george1421 Moderator @cyannella
              last edited by george1421 Jan 28, 2021, 1:28 PM Jan 28, 2021, 7:27 PM

              @cyannella Sebastian said that FOG doesn’t call custom scripts before or after image capture. But it looks like we can patch funcs.sh library script to write the md5 sum during the imaging process.

              All that is needed to test is to patch the funcs.sh and then use a preinstall script to patch FOS Linux before imaging starts.

              What version of FOG is installed on your server?

              Just be aware that fog will not use this md5 sum value for anything since this would be a hack to produce the sum file for you to use. I assume you have a use for that file once created.

              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!

              1 Reply Last reply Reply Quote 0
              • C
                cyannella @george1421
                last edited by Feb 9, 2021, 1:53 PM

                @george1421 I’m using:

                Your version of FOG is up to date.
                You’re running the latest stable version: 1.5.9

                What was the final solution for this?

                Thanks

                Chris

                G 1 Reply Last reply Feb 9, 2021, 4:20 PM Reply Quote 0
                • G
                  george1421 Moderator @cyannella
                  last edited by Feb 9, 2021, 4:20 PM

                  @cyannella This feature can be added to FOG, but it will not be used internally for anything. Do you have something external that can consume these md5sum files that are generated during imaging? I’m just questioning the value of adding this feature.

                  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!

                  C 1 Reply Last reply Feb 9, 2021, 4:43 PM Reply Quote 0
                  • C
                    cyannella @george1421
                    last edited by Feb 9, 2021, 4:43 PM

                    @george1421

                    This feature can be added to FOG, but it will not be used internally for anything. Do you have something external that can consume these md5sum files that are generated during imaging? I’m just questioning the value of adding this feature.

                    I am sharing captured images from clone zilla to off site dev teams all over the globe
                    where their internet is questionable at times. The MD5sums make sure they have a good
                    file. Moving away from CZ to fog.

                    Ok… so If not md5, I want to replicate my image repository at a remote site(s),
                    how do I have FOG push the images from default to remote site repository/file share?

                    Right now there is too many manual steps for all the image handling going on.
                    Wanting to use FOG to automate all this for me.

                    G 3 Replies Last reply Feb 9, 2021, 5:02 PM Reply Quote 0
                    • G
                      george1421 Moderator @cyannella
                      last edited by Feb 9, 2021, 5:02 PM

                      @cyannella said in MD5 After Image Capture:

                      I am sharing captured images from clone zilla to off site dev teams all over the globe
                      where their internet is questionable at times. The MD5sums make sure they have a good
                      file. Moving away from CZ to fog.
                      Ok… so If not md5, I want to replicate my image repository at a remote site(s),

                      Understand adding in the md5sum is possible with just adding one line to the script. So its totally possible. I just wanted to make sure you had some outside way of utilizing this md5 checksum file. FOG will not know or care about it once its created.

                      how do I have FOG push the images from default to remote site repository/file share?

                      FOG uses (internally) a task engine that uses ftp to move the actual file. This process only works if the FOG server and storage node have internal (private) addresses. The image replicator is not intended to communicate over the internet.

                      Right now there is too many manual steps for all the image handling going on.
                      Wanting to use FOG to automate all this for me.

                      One of the things I’m personally thinking about is replacing the FOG Replicator service with rsync. Rsync will do exactly the same function as the FOG replicator service but faster and more efficiently than ftp. You could setup rsync to replicate your /images/<files) directory between your HQ server and remote servers.

                      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!

                      1 Reply Last reply Reply Quote 0
                      • G
                        george1421 Moderator @cyannella
                        last edited by Feb 9, 2021, 8:26 PM

                        @cyannella OK I’m in the process of building a one-off init with the md5 code generation installed. Let me test it later today. If it works as expected then I’ll post a link so you can download and test it.

                        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!

                        1 Reply Last reply Reply Quote 0
                        • G
                          george1421 Moderator @cyannella
                          last edited by Feb 10, 2021, 1:39 AM

                          @cyannella Ok here is an updated init that calculates the MD5 sum of the captured image file. https://drive.google.com/file/d/13eknbYjZhpnsbfi7B_JpVY7KRe_n2xTw/view?usp=sharing

                          Download that file as init_md5.xz and copy it to /var/www/html/fog/service/ipxe directory on the fog server. It has a unique name so it will not overwrite anything FOG.

                          Now take ONE host where you can recapture an image. Go into the host definition and for the host init field enter init_md5.xz and then save the settings. Configure a capture task and then recapture your image. For every d1pX.img file there should be a d1pX.md5 file that contains the md5 hash of the file.

                          Just a note, a 16GB partition took about 15 seconds to calculate the md5 hash.

                          Lets see how this runs in your environment.

                          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!

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

                          152

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project