[Clonezilla-live] md5checksum error does not stop the restore
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
From: Korver.Kirk <Kir...@IG...> - 2018-10-29 22:12:38
|
Hi, We are looking to abort (or at least pause) a restore if a failure occurs. More specifically, we would like the restore to stop if the MD5 checksums of the device do not match. When we created the image, we used the -gmf option, and are using partclone. Since we wanted to have a single USB stick for the restoring step, after we made the image, we then made an ISO. While making the ISO, we selected the -cmf option. From the ISO, we make a bootable USB. So far, so good. Now we manually change the signature of a single item in the sda1.files-md5sum.info.gz file to eventually cause an MD5 failure. Said differently, we know that the restore will "fail". We are testing the process. When it comes time to restore, it restores properly, and then starts the MD5 checksum test. We get MD5 failures. This is to be expected. The problem is that once the error is reported, the "dirty flags" and the "tux" postprocess continues and eventually the discovered and reported errors move off the screen. If we were not sitting and watching the output carefully, we would not see the failures and would erroneously believe the restore worked correctly. In the live directory we find filesystem.squashfs and examine the contained file usr/share/drbl/sbin/ocs-functions and look around line 12669. We see as shown below: LC_ALL=C zcat $chksum_file | $chksum_cmd -c | pv -N "/dev/$sum_part" -peltf -s $chksum_file_lines \ | tee --append ${OCS_LOGFILE} | cat - > /var/log/$(to_filename ${sum_part})-${chksum_cmd}-results.log rc_chk="${PIPESTATUS[2]}" Is it perhaps better if the item rc_chk is set to position 1 of the PIPESTATUS array (as shown below)? LC_ALL=C zcat $chksum_file | $chksum_cmd -c | pv -N "/dev/$sum_part" -peltf -s $chksum_file_lines \ | tee --append ${OCS_LOGFILE} | cat - > /var/log/$(to_filename ${sum_part})-${chksum_cmd}-results.log rc_chk="${PIPESTATUS[1]}" Best, Kirk CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited. |