Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: md5sum on entire CD?

  1. #1
    Join Date
    Dec 2008
    Beans
    328
    Distro
    Ubuntu 13.04 Raring Ringtail

    [SOLVED]md5sum on entire CD?

    this is probably a quick one for you bash gurus
    how do i check md5sum for a CD image?

    i have the hash of the entire .iso file and i want to check that it has been burnt successfully on a CD. my problem: since the image is on the CD itself, bash sees it as "many files on a CD" rather than one .iso file.
    a partial solution would be to export the CD into a .iso file on the HD (how?) and run md5sum on it.
    but i would prefer a solution (probably faster) that runs md5sum on the entire CD as it is now (how?), rather than spending time on creation of the iso image.
    Last edited by minsf; February 1st, 2009 at 07:58 PM.

  2. #2
    Join Date
    Dec 2007
    Location
    United States
    Beans
    2,887
    Distro
    Ubuntu

    Re: md5sum on entire CD?

    You can export the cd back to the hard drive as an ISO with the following in a terminal:

    Code:
    dd if=/dev/scd0 of=/home/username/test.iso
    (change cdrom0 as needed as well as username and your desired name of the iso)
    Last edited by blueridgedog; January 27th, 2009 at 10:18 PM. Reason: mistake in code

  3. #3
    Join Date
    Nov 2008
    Location
    Baton Rouge, LA
    Beans
    63
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: md5sum on entire CD?

    Nevermind, what I was going to suggest didn't work.
    Last edited by Sjeti; January 27th, 2009 at 07:58 PM.

  4. #4
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: md5sum on entire CD?

    How about doing:
    Code:
    sudo dd if=/dev/sdc0 | md5sum
    You'll need to give the actual device name for the CD drive, not a mounted folder, so you can check first with:
    Code:
    mount
    And where it shows a line like:
    Code:
    /dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,utf8,user=john)
    That will tell you the CD drive device name to use with the dd command. Let me know how it goes or if you run into problems.

  5. #5
    Join Date
    Feb 2007
    Location
    St. Louis, MO
    Beans
    4,925
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: md5sum on entire CD?

    Quote Originally Posted by minsf View Post
    this is probably a quick one for you bash gurus
    how do i check md5sum for a CD image?

    i have the hash of the entire .iso file and i want to check that it has been burnt successfully on a CD. my problem: since the image is on the CD itself, bash sees it as "many files on a CD" rather than one .iso file.
    a partial solution would be to export the CD into a .iso file on the HD (how?) and run md5sum on it.
    but i would prefer a solution (probably faster) that runs md5sum on the entire CD as it is now (how?), rather than spending time on creation of the iso image.
    The md5sum function is not used for checking CD integrity. But you could try K3b to create and image(.iso) and then md5sum it.

    Most users on this forum will feel that is you download and check the md5sum you will get a good burn. I usually burn my Ubuntu CDs at 16X.
    Windows XP - Excellent computer virus detector.
    Windows Vista - Most bloat for the money.

    Visit my Ubuntu Resource Website http://www.stchman.com

  6. #6
    Join Date
    Dec 2008
    Beans
    328
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: md5sum on entire CD?

    thanks guys.

    stchman, even though i dont use k3b/kde, your post sent me in the right direction and i used Applications>Sound>Brasero>Tools>CheckIntegrity to check the CD's md5 against an md5 file that i created from the hash. thanks. that's probably the easiest way to go (though i was looking for a more low level solution like caljohn's and blueridge).

    blueridge, i think there is supposed to be a = after the "if", right?

    anyways, both caljohn and blueridge resulted in an input/output error from the dd after about 732MB and the md5sum didnt match. this is probably the kind of low level commands i was looking for, so thank you guys and let me know if you have any idea how to fix this error:
    Code:
    $ sudo dd if=/dev/scd1 | md5sum
    dd: reading `/dev/scd1': Input/output error
    1429328+0 records in
    1429328+0 records out
    731815936 bytes (732 MB) copied, 725.172 s, 1.0 MB/s
    59a009dd71ce2ee11408e15743113a6e  -
    (not the md5 sum that i was expecting... btw, i used /dev/scd1 following the /etc/mtab file and the lshw output)

    CALJOHN, you've been posting quality posts on many of my threads- the only thing i can do is to let you know that i've notice this and i appreciate every one of them. thank you so much buddy! i'll pay it forward...
    Last edited by minsf; January 27th, 2009 at 09:19 PM.

  7. #7
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: md5sum on entire CD?

    I just now tried the exact same dd + md5sum command on one of my linux distro CDs just to make sure it works, and it works fine for me; what CD are you using? If it has any kind of copyright protection, that would most likely be the issue, because some copy protection schemes actually use unreadable sectors as part of their technique if I remember correctly (that's why in many cases you can't simply use "dd" to clone a DVD movie for example).

  8. #8
    Join Date
    Dec 2007
    Location
    United States
    Beans
    2,887
    Distro
    Ubuntu

    Re: md5sum on entire CD?

    Quote Originally Posted by minsf View Post
    thanks guys.

    blueridge, i think there is supposed to be a = after the "if", right?
    [CODE]$ sudo dd if=/dev/scd1 | md5sum
    Yes, my typo, and you need the device, not the friendly name, another error, but you figured it out.

  9. #9
    Join Date
    Dec 2008
    Beans
    328
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: md5sum on entire CD?

    Quote Originally Posted by caljohnsmith View Post
    ...and it works fine for me; what CD are you using? If it has any kind of copyright protection, that would most likely be the issue...
    i think your method is the right way to go. maybe i get the error due to not enough memory. that is, maybe the dd reads it, stores it in the memory before it sends it to the md5sum, and since i run on a lame 512MB it ends in an error. i thought the swap is large enough, but i will try to write it to the HD first, and then run md5sum- if this works, then it is probably a memory thing. i will let you know if this does not work. by the way, the CD is not write protected

    cheers

  10. #10
    Join Date
    Dec 2008
    Beans
    328
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: md5sum on entire CD?

    tried it again from a different CD drive. this time writing to home:
    [CODE]sudo dd if=/dev/scd0 of=/home/minsf/test.iso[CODE]
    i got a similiar i/o error. then i tried to limit the block size (bs=8M) to be sure that it is not a memory thing. no luck (interestingly, in both cases i got stuck around the same point after 205MB)
    i checked the logs and found the following:
    Code:
    Jan 27 19:04:13 minsf-laptop kernel: [ 2926.067455] end_request: I/O error, dev sr0, sector 402656
    Jan 27 19:04:15 minsf-laptop kernel: [ 2926.067472] Buffer I/O error on device sr0, logical block 100664
    Jan 27 19:04:15 minsf-laptop kernel: [ 2926.067480] Buffer I/O error on device sr0, logical block 100665
    Jan 27 19:04:15 minsf-laptop kernel: [ 2926.067491] Buffer I/O error on device sr0, logical block 100666

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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