Discussion:
wrong sector count from isoinfo?
(too old to reply)
Peter D.
2010-06-11 12:39:10 UTC
Permalink
Something is seriously confusing about isoinfo.

Both /usr/bin/isoinfo and /opt/schily/bin/isoinfo give
the Volume size of a particular DVD as 353049, whereas
I calculate it as 353792.

Comparing the DVD to the iso over the longer size matches,
but fails for the shorter one. This makes verifying
DVDs "interesting".

I've added some extra <return>s to this cut'n'paste.

[***@live tv]$ ls -l
/mnt/hd/2010.1_rc2/downloads/isos/
mandriva-linux-one-2010-spring-rc2-GNOME-europe-americas-cdrom-i586.iso

-rw-r--r-- 1 psd psd 724,566,016 2010-05-31 10:09
/mnt/hd/2010.1_rc2/downloads/isos/
mandriva-linux-one-2010-spring-rc2-GNOME-europe-americas-cdrom-i586.iso

[***@live tv]$ echo $((724566016/2048))
353792

[***@live tv]$ /opt/schily/bin/isoinfo -d -i /dev/dvd1
Setting input-charset to 'UTF-8' from locale.
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: One-2010S-GNOME
Volume set id:
Publisher id:
Data preparer id:
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR
(C) 1993 E.YOUNGDALE
(C) 1997-2006 J.PEARSON/J.SCHILLING
(C) 2006-2007 CDRKIT TEAM
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 353049
El Torito VD version 1 found, boot catalog is in sector 65

Joliet with UCS level 3 found.
SUSP signatures version 1 found
Rock Ridge signatures version 1 found
Rock Ridge id 'RRIP_1991A'
Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Cksum AA 55 OK
Key 55 AA
Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 0 (No Emulation Boot)
Load segment 0
Sys type 0
Nsect 4
Bootoff 2C1 705
[***@live tv]$ /usr/bin/isoinfo -d -i /dev/dvd1
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: One-2010S-GNOME
Volume set id:
Publisher id:
Data preparer id:
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR
(C) 1993 E.YOUNGDALE
(C) 1997-2006 J.PEARSON/J.SCHILLING
(C) 2006-2007 CDRKIT TEAM
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 353049
El Torito VD version 1 found, boot catalog is in sector 65
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Key 55 AA
Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 0 (No Emulation Boot)
Load segment 0
Sys type 0
Nsect 4
Bootoff 2C1 705
--
Peter D.
Sig goes here...
Bit Twister
2010-06-11 14:05:26 UTC
Permalink
Post by Peter D.
Something is seriously confusing about isoinfo.
Both /usr/bin/isoinfo and /opt/schily/bin/isoinfo give
the Volume size of a particular DVD as 353049, whereas
I calculate it as 353792.
bc concurs with your math. :-D

$ echo "724566016/2048" | bc
353792
Post by Peter D.
Comparing the DVD to the iso over the longer size matches,
but fails for the shorter one. This makes verifying
DVDs "interesting".
Yes, not to mention, /usr/bin/readcd adding two bytes if you pull the
image back to hard drive. :-(

$ ll bkup_2010_06_10.iso
-rw-rw-r-- 1 bittwister document 718317568 2010-06-10 11:43 bkup_2010_06_10.iso

$ ll myiso.iso
-rw-r--r-- 1 bittwister document 718317570 2010-06-11 08:34 readcd.iso


At least schily readcd works.

$ ll schily.iso
-rw-r--r-- 1 bittwister document 718317568 2010-06-11 09:01 schily.iso
Bit Twister
2010-06-11 16:41:43 UTC
Permalink
Post by Bit Twister
Yes, not to mention, /usr/bin/readcd adding two bytes if you pull the
image back to hard drive. :-(
Well, Murphy is helping me out today. Went to write a bug report
against readcd and now everything works.

$ ll schily.iso readcd.iso bkup_2010_06_10.iso
-rw-rw-r-- 1 bittwister document 718317568 2010-06-10 11:43 bkup_2010_06_10.iso
-rw-r--r-- 1 bittwister document 718317568 2010-06-11 11:32 readcd.iso
-rw-r--r-- 1 bittwister document 718317568 2010-06-11 11:28 schily.iso

and sector count is valid.
$ echo $(( 718317568 / 2048 ))
350741

$ isoinfo -d -i /dev/sr0 | grep "Volume size"
Volume size is: 350741
faeychild
2010-06-12 00:19:09 UTC
Permalink
Post by Bit Twister
Well, Murphy is helping me out today. Went to write a bug report
against readcd and now everything works.
Ah Yes! A failure to allow for that sneaky self healing phenomena. :-)
--
faeychild
Running kde on 2.6.29.6-desktop-3mnb kernel.
Mandriva Linux release 2009.1 (Official) for i586
Peter D.
2010-06-12 08:11:19 UTC
Permalink
on Sat, 12 Jun 2010 02:41
in the Usenet newsgroup alt.os.linux.mandriva
Post by Bit Twister
Post by Bit Twister
Yes, not to mention, /usr/bin/readcd adding two bytes if you pull the
image back to hard drive. :-(
Well, Murphy is helping me out today. Went to write a bug report
against readcd and now everything works.
$ ll schily.iso readcd.iso bkup_2010_06_10.iso
-rw-rw-r-- 1 bittwister document 718317568 2010-06-10 11:43 bkup_2010_06_10.iso
-rw-r--r-- 1 bittwister document 718317568 2010-06-11 11:32 readcd.iso
-rw-r--r-- 1 bittwister document 718317568 2010-06-11 11:28 schily.iso
and sector count is valid.
$ echo $(( 718317568 / 2048 ))
350741
$ isoinfo -d -i /dev/sr0 | grep "Volume size"
Volume size is: 350741
What changed?

Did you examine the same disc? Maybe the problem is at the burning stage.
--
Peter D.
Sig goes here...
Bit Twister
2010-06-12 10:48:14 UTC
Permalink
Post by Peter D.
What changed?
Nothing that I know of.
Post by Peter D.
Did you examine the same disc?
Yup.
Post by Peter D.
Maybe the problem is at the burning stage.
Nope. No burn for the readcd/isoinfo testing.
Was using the previous day's backup burnt dvd.

Only other variable I saw was the "Devices recently plugged in:" pop-up
where you can click and pick from the what to use to read disk Optical Disc.

I did open/close tray and tried readcd again to get pop-up during test,
but no change in result.

I am going to have to guess a race condition since I have to run in
irq poll mode instead of interrupt driven.

https://qa.mandriva.com/show_bug.cgi?id=59328
Joerg Schilling
2010-06-12 20:34:03 UTC
Permalink
Post by Peter D.
Something is seriously confusing about isoinfo.
Both /usr/bin/isoinfo and /opt/schily/bin/isoinfo give
the Volume size of a particular DVD as 353049, whereas
I calculate it as 353792.
How do you get to these numbers?
Post by Peter D.
-rw-r--r-- 1 psd psd 724,566,016 2010-05-31 10:09
/mnt/hd/2010.1_rc2/downloads/isos/
mandriva-linux-one-2010-spring-rc2-GNOME-europe-americas-cdrom-i586.iso
353792
mkisofs adds padding to the image.
Post by Peter D.
Setting input-charset to 'UTF-8' from locale.
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: One-2010S-GNOME
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR
(C) 1993 E.YOUNGDALE
(C) 1997-2006 J.PEARSON/J.SCHILLING
(C) 2006-2007 CDRKIT TEAM
OK, this is the real isoinfo. Note that the original mkisofs
(that includes programs like "isoinfo", "isodebug", "devdump",
"isovfy") includes UTF-8 support but the fake program from Debian
does not support UTF-8.

The image has not been written with mkisofs, but with the Debian fake.
As this is based in extremely old software (5 years old), I cannot
tell whether it adds padding.
--
EMail:***@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
***@cs.tu-berlin.de (uni)
***@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Peter D.
2010-06-13 03:47:43 UTC
Permalink
on Sun, 13 Jun 2010 06:34
in the Usenet newsgroup alt.os.linux.mandriva
Post by Joerg Schilling
Post by Peter D.
Something is seriously confusing about isoinfo.
Both /usr/bin/isoinfo and /opt/schily/bin/isoinfo give
the Volume size of a particular DVD as 353049, whereas
I calculate it as 353792.
How do you get to these numbers?
My understanding is that the Volume size is supposed to be the
number of 2048 byte sectors used, and I know how many bytes
the original iso file used. I got my answer by dividing the
number of bytes by 2048.

Output of ls -l
Post by Joerg Schilling
Post by Peter D.
-rw-r--r-- 1 psd psd 724,566,016 2010-05-31 10:09
^^^^^^^^^^^ The size of the file.
Post by Joerg Schilling
Post by Peter D.
/mnt/hd/2010.1_rc2/downloads/isos/
mandriva-linux-one-2010-spring-rc2-GNOME-europe-americas-cdrom-i586.iso
353792
The maths.

isoinfo reported the other number as the Volume size.
Post by Joerg Schilling
mkisofs adds padding to the image.
Post by Peter D.
Setting input-charset to 'UTF-8' from locale.
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: One-2010S-GNOME
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR
(C) 1993 E.YOUNGDALE
(C) 1997-2006 J.PEARSON/J.SCHILLING
(C) 2006-2007 CDRKIT TEAM
OK, this is the real isoinfo. Note that the original mkisofs
(that includes programs like "isoinfo", "isodebug", "devdump",
"isovfy") includes UTF-8 support but the fake program from Debian
does not support UTF-8.
The image has not been written with mkisofs, but with the Debian fake.
As this is based in extremely old software (5 years old), I cannot
tell whether it adds padding.
I did not create the iso file, Mandriva did.

At this stage I guess that the iso file has an inconsistent number
in it, and that number was the result of a bug in the version of
mkisofs used by Mandriva. Maybe there was a mis-configuration and
they should have used a "-pad" but didn't.

I'm just guessing at this stage. The lesson seems to be; when
verifying an optical disc, you can rely on the size of file but
not the reported Volume size of the disc.
--
Peter D.
Sig goes here...
Loading...