Results 1 to 3 of 3

Thread: Verify a burned install DVD

  1. #1

    Default Verify a burned install DVD

    I downloaded the openSUSE 11.1 ISO image, did an md5sum check, and burned a DVD using k3b.

    Depending upon the k3b version and the hardware, sometimes k3b fails to verify for me.

    So how to verify an already burned DVD given the original ISO image?

    I did some Googling and wrote this script using what I'd learned. The comments acknowledge the URLs I found. It does two disk reads in succession in slightly different ways just to be extra paranoid.

    I hope it helps someone. I hope I haven't messed up.

    Code:
    #!/bin/sh
    #
    # Use this when k3b barfs when verifying a burn of an ISO image.
    #
    
    if test -z "$1" || test -z "$2" ; then
    
        echo "Usage: $0 iso_image_file optical_disk_device"
    
    else
    
        iso=$1
        dev=$2
    
        bytes=$(ls -l ${iso} | awk '{ print $5 }')
        extents=$(( ${bytes} / 2048 ))
    
        # http://www.g-loaded.eu/2006/10/07/verify-a-burned-cddvd-image-on-linux/
        echo "optical disk ->${dev}<- md5sum (bytes method):"
        sudo dd if=${dev} | head --bytes=${bytes} | md5sum
    
        # http://wiki.linuxquestions.org/wiki/Md5sum
        echo "optical disk ->${dev}<- md5sum (extents method):"
        sudo dd if=${dev} bs=2048 count=${extents} | md5sum
    
        echo "original ISO image ->${iso}<- md5sum:"
        cat ${iso} | md5sum
    
    fi
    
    #
    # Done.
    #
    Sample output

    Code:
    # verify-iso openSUSE-11.1-DVD-x86_64.iso /dev/sr0
    optical disk ->/dev/sr0<- md5sum (bytes method):
    2afee1b8a87175e6dee2b8dbbd1ad8e8  -
    optical disk ->/dev/sr0<- md5sum (extents method):
    2afee1b8a87175e6dee2b8dbbd1ad8e8  -
    original ISO image ->openSUSE-11.1-DVD-x86_64.iso<- md5sum:
    2afee1b8a87175e6dee2b8dbbd1ad8e8  -

  2. #2

    Default Re: Verify a burned install DVD

    When you boot it, there's a verification option.

    You can also mount it, and see how rpm --checksig does on the disk contents.

    Unfortunately there's not been a neat way of mounting the disk and running a script near top level to do the same check, without booting from BIOS.

    So thanks! That looks rather nice to have.

    Changing the straight md5sum a bit might be a touch faster.

    echo "original ISO image ->${iso}<- md5sum:"
    md5sum < ${iso}

  3. #3

    Default Re: Verify a burned install DVD

    FWIW I accidentally swapped the two URL comments ...

Posting Permissions

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