Web lists-archives.com

Re: From installation DVD to original ISO file


> Doing it that way also yields
>    https://packages.debian.org/stretch/libcdio-utils

Note the different names "isoinfo" <-> "iso-info".
These programs take different options and put out different text formats.
"iso-info" does not tell the size.

Your command
  COUNT=$(isoinfo -d -i /dev/cdrom)
looks questionable, though.

A program run here prints multiple lines of which the right one needs to
be picked and stripped of its prefix text:

  COUNT=$(isoinfo -d -i /dev/cdrom | grep 'Volume size is: ' | sed -e 's/Volume size is: //')

> On the man page
>     https://manpages.debian.org/stretch/util-linux/isosize.8.en.html
> I had seen:
> > The size of the file (or block device) holding an iso9660 filesystem
> > can be marginally larger than the actual size of the iso9660 filesystem.
> > One reason for this is that cd writers are allowed to add "run out"
> > sectors at the end of an iso9660 image.
> I wasn't sure if that meant it was not suitable for my purpose.

This paragraph is just an explanation why "isosize" is of use and
why its result can differ from the image file size or the readable
size of the medium.

(The last sentence is quite wrong. Run-out blocks are not readable. They can
 only cause the Linux TAO CD read-ahead error if the drive invites for it.
 Most optical media types pad up a burn session to the next multiple of
 16 or 32 blocks. Some types are random access media and offer their full
 capacity for reading rather than the size of the recently written ISO.
 Only CD-R[W] with write type SAO and DVD-R[W] with write type DAO reliably
 restrict the readable size to the written size.

Have a nice day :)