1

I have downloaded the .iso file for Kubuntu-15.10.iso from the official site. I successfully verified the correct sha256sum hash of

9e5eb424eabfd9b2d193d8c34eca7b48ad944b90c0de0bdcbb638563c14c4d2b

I am having trouble hashing the DVD though. When I used the burner xfburn I kept getting the hash

758061ca3be30128dca74e3f73b5dd6e76fb5047c0c4e0743f22786fb0a02dd0  /dev/cdrom

So I changed burners to K3B and it would give me the hash

d7559c90efece2b38021804cc34011eb2cb161fff2afe6894985083bd41232d5  /dev/cdrom

So I am unable to verify the correct DVD sha256sum hash. I have also used the burner that comes with my system which is Xubuntu 14.04. I also tried K3B burner which comes highly recommended online. I'm out of ideas.

Please help me get the correct hash...OR is the DVD's with the wrong hashes fine to burn? And its some bug in Xubuntu's DVD Rom system? Has anyone gottent the correct hashes for the DVD burned with this ISO?

  • When you burn it to a bootable CD it extracts the iso and is not the same as simply burning the file as it is. Because of this, your hashsum should change. In fact, this shows you probably did things the right way as if the hashsum had not changed, the disk would most likely not boot. – mchid Dec 22 '15 at 2:46
3

Hashing /dev/cdrom has the effect of hashing also potential blank space at the end of the DVD, which changes the output hash: this is because ISOs are padded with zeros at the end until their overall size matches a multiple of 16 sectors, or 32768 B, before they are burnt.

If you want to hash the DVD, make sure that you're hashing the same number of bytes of the original image; in the commands below, make sure that $total is divisible by $bs ($bs is arbitrary, but I suggest using a number "bigger enough" than the default 512, as the default 512 usually slows down the reading; maybe this isn't relevant for DVD-ROM drives, but just to make sure):

total="$(du /path/to/image.iso | cut -d $'\t' -f 1)"
bs=8192 # make sure that $total is divisible by this number
dd if=/dev/cdrom iflag=fullblock bs=$bs count=$((total/bs)) | sha256sum -
  • Im seeing a few people who are saying the same thing, we should not hash /dev/cdrom...why then does the official download page recommend this? – Norman Bird Dec 22 '15 at 1:16
  • @NormanBird Can you post the link to that page? – kos Dec 22 '15 at 1:23
  • here is the link from the help page on how to sha256sum a cd. help.ubuntu.com/community/HowToSHA256SUM. Scroll to where it says "Check the CD." – Norman Bird Dec 22 '15 at 2:38
  • 1
    @NormanBird it also says: "Depending on how you burn your ISOs you can check the burnt media directly." – muru Dec 22 '15 at 3:06
  • 1
    @NormanBird That page is community-mantained, it may not be complete enough. Burnt ISOs are padded with zeros at the end until the overall size matches a multiple of 16 sectors, or 32768 B. Here's another community-mantained page which brings up the problem: "Check again after burning since growisofs adds extra blank bytes increasing file size from 3048179712 (0xB5AF8800) to 3048210432 (0xB5B00000) bytes". It also proposes an equivalent (and a bit simpler then mine) method: sudo dd if=/dev/cdrom | head -c $total | sha256sum - – kos Dec 22 '15 at 3:32
1

This isn't how it works. You can't hash the device; not in a way that does anything constructive anyway.

There are two meaningful verification steps you can do:

  1. Check the ISO has downloaded correctly using the single checksum.
  2. Check the contents as burnt by using the included md5sum.txt. You have two options here

    • Reboot and select the media test from the first menu.
    • Mount the CD (automatic on most desktops, just stick it in), open a terminal and CD into the directory and run:

      md5sum --quiet --check md5sum.txt
      

      We use --quiet so it only prints out errors and not a huge list of OK messages. If you have a sha256sum-generated file you could use this too but it isn't included on the 14.04 images.

  • not sure what you mean by "cant hash a device in a way that is constructive." The official download page for Kubuntu and Ubuntu says you can and recommends the sha256sum hashing of BOTH the ISO and contents of /dev/cdrom. They say the hash should be the same as well. – Norman Bird Dec 22 '15 at 1:03
  • You may be right but here is the help page that said to do it: help.ubuntu.com/community/HowToSHA256SUM – Norman Bird Dec 22 '15 at 2:40
  • @NormanBird contents, not the device. I have added an alternative method for testing the contents. – Oli Dec 22 '15 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.