Hi Patrick,

> Otherwise, you can verify the physical disc in the same way you
> would verify the ISO file.

True, though I think I recall, back when CD and DVD burning was common,
you had to be careful the block device didn't return a few more bytes
than were in the ISO, e.g. the ISO was an odd number of KiB and the
block device added 1 KiB of zero bytes when reading it back to make a
whole 2 KiB block.  Perhaps that wasn't with an ISO but something else.
Anyway, the point remains: if the digests differ then the number of
bytes consumed is of interest.

> For example, using the first disc on my pile of old discs:
>
> $ sha256sum -b Fedora-11-x86_64-Live-KDE.iso 
> 4fdf952afb0d27887639140f6921ff58ba74f8d633b14414b095eb54b55df405 
> *Fedora-11-x86_64-Live-KDE.iso
>
> $ sha256sum -b /dev/cdrom
> 4fdf952afb0d27887639140f6921ff58ba74f8d633b14414b095eb54b55df405 */dev/cdrom

When both are to hand then cmp(1) has the advantage of stopping as soon
as they deviate, rather than reading both to the end, and indicating how
far in that is for further investigation.

Also, seeing sha256sum remind me I've recently shifted to b2sum(1) when
I need to quickly do that kind of thing as it runs faster than sha256sum
here.  Just in case you find it useful too for large files.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to