Would it be possible to list the iso file size in bytes in the SHA1SUM file?
The reason that I ask it is that I had a DVD with Fedora 7 on it and needed a copy of the iso file. So I did a dd on the DVD, but the file ended up being bigger than the original iso file. I had to know the size so I could enter the number of blocks to copy.
It is much quicker to do an ls -l than it is to run sha1sum on a file. If the size is right then run the sha1sum.
Or is the size listed on some web page some place? Everywhere I have looked I end up with an estimate.
Thanks! Jerry
On Wed, Oct 24, 2007 at 09:03:45PM -0600, Jerry Williams wrote:
Would it be possible to list the iso file size in bytes in the SHA1SUM file?
The reason that I ask it is that I had a DVD with Fedora 7 on it and needed a copy of the iso file. So I did a dd on the DVD, but the file ended up being bigger than the original iso file. I had to know the size so I could enter the number of blocks to copy.
It is much quicker to do an ls -l than it is to run sha1sum on a file. If the size is right then run the sha1sum.
Or is the size listed on some web page some place? Everywhere I have looked I end up with an estimate.
When reading a the file itself with isoinfo, it'll tell you:
$ isoinfo -d -i F-7-x86_64-DVD.iso ... Logical block size is: 2048 Volume size is: 1683582 ...
If you're reading a physical CD or DVD, you can do the same thing. Here's a little script I use all the time for getting the size right. It prompts you for the name of the ISO you want to create, then reads the media using dd; repeat until Ctrl-C.
IIRC there was something about using -pad when writing media, but I haven't had to do that for a while...
Thanks, Matt
On Wed, 2007-10-24 at 22:29 -0500, Matt Domsch wrote:
On Wed, Oct 24, 2007 at 09:03:45PM -0600, Jerry Williams wrote:
Would it be possible to list the iso file size in bytes in the SHA1SUM file?
The reason that I ask it is that I had a DVD with Fedora 7 on it and needed a copy of the iso file. So I did a dd on the DVD, but the file ended up being bigger than the original iso file. I had to know the size so I could enter the number of blocks to copy.
It is much quicker to do an ls -l than it is to run sha1sum on a file. If the size is right then run the sha1sum.
Or is the size listed on some web page some place? Everywhere I have looked I end up with an estimate.
When reading a the file itself with isoinfo, it'll tell you:
$ isoinfo -d -i F-7-x86_64-DVD.iso ... Logical block size is: 2048 Volume size is: 1683582 ...
Right, but I think what he's saying is that he *didn't* have the ISO file to hand - but did have a DVD he could dd from - and he wanted a way to find out how big the image should have been without downloading it.
Jon.
Jon Masters wrote:
Right, but I think what he's saying is that he *didn't* have the ISO file to hand - but did have a DVD he could dd from - and he wanted a way to find out how big the image should have been without downloading it.
And the very next part of Matt's mail said:
If you're reading a physical CD or DVD, you can do the same thing. Here's a little script I use all the time for getting the size right. It prompts you for the name of the ISO you want to create, then reads the media using dd; repeat until Ctrl-C.
He even provided a short script to do the job. You can't be much more helpful than that. ;)
On Wed, Oct 24, 2007 at 11:44:08PM -0400, Jon Masters wrote:
Right, but I think what he's saying is that he *didn't* have the ISO file to hand - but did have a DVD he could dd from - and he wanted a way to find out how big the image should have been without downloading it.
Go to bed Jon, you didn't read far enough. :-) You would have seen the appended script do:
BLOCKS=`isoinfo -d -i ${DEVICE} | grep "Volume size" | awk '{print $4}'` dd if=${DEVICE} of=${FILENAME} bs=2k count=${BLOCKS}
where DEVICE=/dev/cdrom or whatever device had the media.
On Wed, 2007-10-24 at 22:56 -0500, Matt Domsch wrote:
On Wed, Oct 24, 2007 at 11:44:08PM -0400, Jon Masters wrote:
Right, but I think what he's saying is that he *didn't* have the ISO file to hand - but did have a DVD he could dd from - and he wanted a way to find out how big the image should have been without downloading it.
Go to bed Jon, you didn't read far enough. :-) You would have seen the appended script do:
BLOCKS=`isoinfo -d -i ${DEVICE} | grep "Volume size" | awk '{print $4}'` dd if=${DEVICE} of=${FILENAME} bs=2k count=${BLOCKS}
where DEVICE=/dev/cdrom or whatever device had the media.
Yeah. I suck. Too much Red Sox and coffee, not enough reading...sorry Matt - sooner or later I'll learn :-)
Jon.
On Wed, 2007-10-24 at 22:29 -0500, Matt Domsch wrote:
If you're reading a physical CD or DVD, you can do the same thing. Here's a little script I use all the time for getting the size right. It prompts you for the name of the ISO you want to create, then reads the media using dd; repeat until Ctrl-C.
Right. But if you end up reading more from the disk than you planned, this will only flag that up (the MD5SUM generated) - it won't tell you what it should be. So my point from before is somehow semi valid ;-)
IIRC there was something about using -pad when writing media, but I haven't had to do that for a while...
It's down to the size of the ISO image. I haven't had to use pad in a while, which suggests that most of the ISOs are created in the right multiples of 2.whatever K or tools like growisofs are handling it.
CDs are fascinating little things. I've got a book on the multiple stage error correction process somewhere here I used to use for bedtime reading...these days, coffee is all that's required.
Jon.
On Thu, 2007-10-25 at 01:14 -0400, Jon Masters wrote:
On Wed, 2007-10-24 at 22:29 -0500, Matt Domsch wrote:
If you're reading a physical CD or DVD, you can do the same thing. Here's a little script I use all the time for getting the size right. It prompts you for the name of the ISO you want to create, then reads the media using dd; repeat until Ctrl-C.
Right. But if you end up reading more from the disk than you planned, this will only flag that up (the MD5SUM generated) - it won't tell you what it should be. So my point from before is somehow semi valid ;-)
No, I'm wrong, because isoinfo is going to get that from the TOC. So clearly I'm way too Red Soxed for one evening and should just shut up.
Ignore me... :-)
Jon.
At 10:29 PM -0500 10/24/07, Matt Domsch wrote:
On Wed, Oct 24, 2007 at 09:03:45PM -0600, Jerry Williams wrote:
Would it be possible to list the iso file size in bytes in the SHA1SUM file?
The reason that I ask it is that I had a DVD with Fedora 7 on it and needed a copy of the iso file. So I did a dd on the DVD, but the file ended up being bigger than the original iso file. I had to know the size so I could enter the number of blocks to copy.
It is much quicker to do an ls -l than it is to run sha1sum on a file. If the size is right then run the sha1sum.
Or is the size listed on some web page some place? Everywhere I have looked I end up with an estimate.
When reading a the file itself with isoinfo, it'll tell you:
$ isoinfo -d -i F-7-x86_64-DVD.iso ... Logical block size is: 2048 Volume size is: 1683582 ...
I find isosize less AWKward, as it puts out the size directly and will also do the math:
$ isosize Fedora-7.92-i386-DVD.iso 3000535040 $ isosize -d 2048 Fedora-7.92-i386-DVD.iso 1465105
devel@lists.stg.fedoraproject.org