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

FOG Checksum

Scheduled Pinned Locked Moved Unsolved
General
2
2
854
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.
  • M
    Marc2
    last edited by Jul 3, 2015, 6:30 AM

    Hi all,

    is there a way i can check via a checksum if the image was copied correctly on a client?

    W 1 Reply Last reply Jul 3, 2015, 1:34 PM Reply Quote 0
    • W
      Wayne Workman @Marc2
      last edited by Wayne Workman Jul 3, 2015, 7:35 AM Jul 3, 2015, 1:34 PM

      @Marc2 Probably yes and no… and it depends on when you do the checksum…

      If you are using FOG’s early hostname change, then a simple changing of the name on the OS disk would totally change the checksum. Booting the computers before the comparison is likely to totally change the checksum. The checksum must be done before namechange and before boot.

      This means you’d have to either schedule a shutdown after imaging and then boot to a linux live CD and do the checksum test, or, do a debug deployment and cancel the process right at the early host name change point and manually do the checksum during debug (which has very limited commands and you’d probably need to install some utilities right then and there) and then proceed to manually finish the imaging process via command line.

      I found this post on another site:


      But it depends on the layer you define “same”

      For this answer I assume

      • /dev/sdb1 and /dev/sdc1 are the ones you want to compare
      • both partitions are not mounted
      • if they are mounted, you have the permission to read each file

      You can test the two partitions on blocklevel.
      ie:
      Code:

      md5sum /dev/sdb1
      md5sum /dev/sdc1
      

      But for this to produce the same hash, the partitons have to be exactly the same.
      Even the slightest change in one of the files in either of the two,
      will produce a different hash.

      You can also test on filelevel.
      There are probably already tools, that could be used for your purposes (tripwire maybe?),
      but a quick-and-dirty solution can be this:
      Code:

      mkdir ~/comparedir
      sudo mkdir /mnt/test_sdb1
      sudo mkdir /mnt/test_sdc1
      
      sudo mount -o ro /dev/sdb1 /mnt/test_sdb1
      sudo mount -o ro /dev/sdc1 /mnt/test_sdc1
      
      find -type f /mnt/test_sdb1 -exec md5sum {} 2>/dev/null \; >~/comparedir/tmp_sdb1_hashes
      find -type f /mnt/test_sdc1 -exec md5sum {} 2>/dev/null \; >~/comparedir/tmp_sdc1_hashes
      
      sudo umount /mnt/test_sdb1
      sudo umount /mnt/test_sdc1
      sudo rm -r /mnt/test_sdb1
      sudo rm -r /mnt/test_sdb1
      
      sort -k2 ~/comparedir/tmp_sdb1_hashes > ~/comparedir/sdb1_hashes
      sort -k2 ~/comparedir/tmp_sdc1_hashes > ~/comparedir/sdc1_hashes
      rm ~/comparedir/tmp_sdb1_hashes ~/comparedir/tmp_sdc1_hashes 
      
      diff ~/comparedir/sdb1_hashes ~/comparedir/sdc1_hashes
      

      Source: http://www.linuxforums.org/forum/miscellaneous/158910-can-i-compare-two-partitions.html

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

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

      208

      Online

      12.0k

      Users

      17.3k

      Topics

      155.2k

      Posts
      Copyright © 2012-2024 FOG Project