• 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

  • Moderator

    @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.

  • Moderator

    @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.

  • Moderator

    @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.


  • @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.

  • Moderator

    @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.


  • @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

  • Moderator

    @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.


  • 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?

  • Moderator

    @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"
    
  • Senior Developer

    @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.

  • Moderator

    @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.

321
Online

8.1k
Users

15.0k
Topics

141.4k
Posts