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

Re: How To Read Volume ID from DVD



Hi,

> The explanation for why
> volname returned "CDROM" is that is apparently the default volume
> label when none is specified (which wasn't in the first session). I
> specified "volly" on a later session but volname and vol_id (which
> someone else suggested) appear to not be multi-session aware and
> return data only from the first session.

This effect dependends on the media type. It
appears with sequential media like CD, DVD-R[W],
DVD+R, BD-R, but not with overwriteable ones
like DVD+RW, DVD-RAM, DVD-RW formatted, BD-RE.

With sequential media you have to determine
the start position of the most recent session
and to look there for the Primary Volume
Descriptor which holds the volume id.

With overwriteable media it was the job of the
burn program to install a PVD copy at the start
of the media. So with overwriteables, there
is no need to find the real start of the last
session.

The fact that the volume identifier tools do
not know the mount rules for sequential multi-
session media appears to be a birth defect:
To learn about the media type and eventually
the start of the most recent session they would
need to identify the media type. For that they
need ioctl(). Either from the CDROM_* family, if
there is a matching ioctl(), or via SG_IO with
commands from the MMC standard. Both seems not
to be in their scope.


> [xorriso]  I see its -toc mode
> emits the volume IDs for each session, vs.wodim -toc which doesn't
> show this.

xorriso is an integrated ISO 9660 multi-session
tool. wodim (resp. cdrecord) is a burn tool
which is not entitled to know about ISO 9660
entrails.


> I had begun reading ECMA-119 last night when it appeared there was no
> way to do this but write my own code.

There can never be enough experts.

> My case is multi-session discs
> so it'll take a little more than this. I've still got to look at
> ECMA-168

xorriso does not rely on ECMA-168 but on ECMA-119
plus some SUSP based extensions like Rock Ridge.
Afaik the mkisofs runs of growisofs do not refer
to ECMA-168 either.
Although multi-session is not mentioned in
ECMA-119, we simply fool that standard by help of
the mount conventions of the operating systems.
I.e. we do not violate those specs but we do
things which are not explicitely mentioned there.
It works fine (unless with tools like volname).


> I found there are various other fields (e.g. application identifier)
> the image creation tools will allow you to specify yet even the
> relatively heavy weight tools don't appear to expose, so I'm going to
> write a simple tool a la volname but multi-session aware and that can
> report the other volume descriptor fields.

How about we integrate this into xorriso as a
command option ?
The task to find the PVD is not trivial and
xorriso already can do that. What info would
you like to extract ?


Have a nice day :)

Thomas


Reply to: