Re: Testing iso downloads?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



| From: Gene Heskett <gene.heskett@xxxxxxxxxxx>

[It is always a good idea to trim quotes.]

| I thought "Hey, this should be neat", and proceeded to copy/paste it 
| into a file called /usr/sbin/isopad.  Unforch although the copy/paste 
| seems to be perfect, the md5sum I get on this isn't the same as yours.
| I included a linefeed after the word 'done' is the only place I can see 
| that might be different.

Darn.  Mail is a lousy transport.  I guess I should make it available
another way.
  ftp://ftp.cs.utoronto.ca/pub/hugh/isopad

BTW, the copy I got back from the list does have the correct sum.  So
your mailer is where stuff is being munged.  Cut-and-paste, using X,
often mangles whitespace.  The version you quoted has mangled
whitespace -- all indentation in the original is via HT characters
(Horizontal Tab).

| Running it on my directory full of FC5 cd sized iso's with the + option 
| first seemed to be ok, and with the - option it restored them to where 
| the sha1sum was good again, but the sha1sum failed on all files while 
| the padding was in effect.  This is not on the actual burnt cd of 
| course.  Should it be expected to fail when treating .iso's resideing 
| on an ide hard drive?

Yes, it should give a different value for a padded file.  The whole
point of a hash is to detect any change.

What should be true is that the first `isosize x.iso` bytes should be
the same and therefore the hash of those bytes should be the same.
This is what the CD testing should be looking at.

I've enclosed another script.  I call it isoburn.  It can burn a DVD
or CD but it needs to be told which because it uses growisofs or
cdrecord depending on which medium is to be burnt.

It does the following
	isopad to get extra space at the end of the .iso
	cdrecord or growisofs
	isopad - to strip the padding
	cmp of the medium with the iso, but only for isosize bytes.
	eject
So it burns and checks.

I probably should have written a version to just check a disk.  I
don't have time to make the change and test, but here is the idea:

- add new flag "-justcheck".  This needs to go in the first label of
  the first case, so the label would look like this:
	"-cd"|"-dvd"|"-justcheck")

- and another alternative to the inner case, parallel to the
  alternatives that do cdrecord and growisofs
		"-justcheck")
			# don't burn
			;;
  Those lines can be inserted immediately after the 'case "$medium" in'
  line

ftp://ftp.cs.utoronto.ca/pub/hugh/isoburn

md5sum for the script:
71828ffe6fa266158c058baa88b791f0  bin/isoburn
================ start of isoburn ================
#!/bin/sh

# isoburn [-cd|-dvd] isofile...
#
# This recipe encapsulates DHR's procedure for burning from a .iso file.
#
# Copyright 2005 D. Hugh Redelmeier
# License: GPL
# Version: Wed Jun 22 10:35:24 EDT 2005

# cdrom drive
drive=/dev/cdwriter

# options for cdrecord
device=ATA:1,0,0
speed=8

medium="-cd"

# strict; show commands as executed
set -u -e -x

for iso
do
	case "$iso" in
	"-cd"|"-dvd")
		medium=$iso
		;;
	*)
		echo -n "press ENTER when you have loaded a new blank CD: "
		read junk

		isopad - "$iso"
		isopad + "$iso"
		case "$medium" in
		"-cd")
			time cdrecord -v dev=$device speed=$speed -dao driveropts=burnfree "$iso"
			;;
		"-dvd")
			# spare bits: -use-the-force-luke=tty
			time growisofs -Z "$drive"="$iso" -use-the-force-luke=notray -use-the-force-luke=dao
			;;
		esac
		isopad - "$iso"
		time cmp --bytes `isosize "$iso"` "$iso" $drive
		# because of -e, we only get here if the test passes
		echo "Test passed."
		eject $drive
		;;
	esac
done
================ end of isoburn ================


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux