Find the answer to your Linux question:
Results 1 to 3 of 3
I've been using a script to compare the MD5sum of a CD and the ISO used to burn the CD. This script works great in Fedora 8 but in Fedora ...
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    4

    Fedora 12 and MD5sum

    I've been using a script to compare the MD5sum of a CD and the ISO used to burn the CD. This script works great in Fedora 8 but in Fedora 12 it returns a different check sum for the CD and ISO. Any ideas would be greatly appreciated.

    Code:
    #Compares the checksums of an iso9660 image and a burned disk.
    #This script is released into the public domain by it's author.
    if [ -n "$BASH" ]; then
    shopt -s expand_aliases
    fi
    
    if [ -n "$CHECKSUM" ]; then
    alias CHECKSUM="$CHECKSUM"
    elif which md5deep > /dev/zero; then
    alias CHECKSUM='md5deep -e'
    else
    alias CHECKSUM='md5sum'
    fi
    
    if [ -n "$2" ]; then
    DISKDEVICE="$2"
    else
    DISKDEVICE='/dev/cdrom'
    fi
    
    CSUM1=`CHECKSUM "$1" | grep --only-matching -m 1 '^[0-9a-f]*'`
    echo 'checksum for input image:' $CSUM1
    SIZE=`stat -c '%s' "$1"`;
    BLOCKS=`expr $SIZE / 2048`;
    CSUM2=`dd if="$DISKDEVICE" bs=2048 count=$BLOCKS 2> /dev/zero | CHECKSUM | grep --only-matching -m 1 '^[0-9a-f]*'`
    echo 'checksum for output disk:' $CSUM2
    
    if [ "$CSUM1" = "$CSUM2" ]; then
    echo 'verification successful!'
    else
    echo 'verification failed!'
    fi

  2. #2
    Just Joined!
    Join Date
    May 2010
    Posts
    4
    No one knows why the md5sum isn't working on fc12?

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    4
    running these two commands in fc 8 returns the same checksum

    md5sum /data/backups/prior/backup052110.iso |grep --only-matching -m 1 '^[0-9a-f]*'

    dd if=/dev/sr1 bs=2048 count=182 2> /dev/zero | md5sum |grep --only-matching -m 1 '^[0-9a-f]*'

    But, running them in fc12 it doesn't return the same checksum. I really don't understand why.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...