PDA

View Full Version : Getting serail number of a CD




ithil
Jul 10, 2006, 01:21 AM
Hi all,

How to get the serial number of a CD on Mac OS X? Is there any
replacement for the function GetvolumeInformation which gives the
serial number on Windows. If not how I can get a unique number that
identifies the CD.

Thanks.



HiRez
Jul 10, 2006, 03:03 AM
How to get the serial number of a CD on Mac OS X? Is there any
replacement for the function GetvolumeInformation which gives the
serial number on Windows. If not how I can get a unique number that
identifies the CD.I don't even think CDs have unique serial numbers by default, do they? I really don't know but I've not heard of such a thing, at least not in a general case. I suppose you could burn a number on the CD somewhere.

ChrisBrightwell
Jul 10, 2006, 03:06 AM
OS X uses a serial number?

That's news to me, but I've used the Family Pack license since 10.2.

Nermal
Jul 10, 2006, 03:12 AM
When you format a volume in DOS, it assigns it a 1024-bit serial number. It's done this for as long as I can remember (I started with DOS 3.3). In the case of a DOS-formatted floppy or hard drive, this number is recorded onto the disk - if you put the same disk into a different computer then you'll see the same serial. If you reformat the disk then you'll get a different serial.

I have no idea whether Mac-formatted (or even Windows-formatted) CDs use serial numbers. I don't have a Windows computer on-hand to take a look.

caveman_uk
Jul 10, 2006, 05:00 AM
OS X uses a serial number?

That's news to me, but I've used the Family Pack license since 10.2.
He means a different sort of serial number....:rolleyes:

ipacmm
Jul 10, 2006, 05:02 AM
OS X uses a serial number?


OS X Server uses serial numbers for each version.

bousozoku
Jul 10, 2006, 05:15 AM
You mean something like this that's available from the Info button in Disk Utility?

robbieduncan
Jul 10, 2006, 05:51 AM
You mean something like this that's available from the Info button in Disk Utility?

That does not appear to be a CD!

bousozoku
Jul 10, 2006, 06:07 AM
That does not appear to be a CD!

I said something like this.

IJ Reilly
Jul 10, 2006, 10:29 AM
I'm not sure if this is what the OP is after, but many people think that audio CDs have a unique serial number because of the way they are automatically indexed by GraceNote the moment you insert the CD into the computer (assuming you've got a live Internet connection of course). In fact, GraceNote relies on a combination of track number, track length, track order and (I believe) overall length to determine which CD you've inserted.

Krevnik
Jul 10, 2006, 03:41 PM
I'm not sure if this is what the OP is after, but many people think that audio CDs have a unique serial number because of the way they are automatically indexed by GraceNote the moment you insert the CD into the computer (assuming you've got a live Internet connection of course). In fact, GraceNote relies on a combination of track number, track length, track order and (I believe) overall length to determine which CD you've inserted.

For audio CDs, this is true. Although IIRC, HFS+ volumes use a UUID. Now the question here is:

What type of volume are you trying to get an ID for? HFS+, UDF, ISO9660, FAT, NTFS?

UDF doesn't seem to include a UUID, and I would assume ISO9660 would also lack such a UUID. FAT is before GUIDs, so I have a feeling you won't get love there either, and OS X isn't aware of NTFS enough to read a GUID from that. Joliet is an unknown. HFS+ volumes all have UUIDs, from what I can tell, but I haven't done testing to see if it is truly unique between discs, and probably wouldn't be if they are pressed, but could be if they are all burnt.

Now, IIRC, there is an actual UUID that pressed CDs have, and CD-Rs as well. HOWEVER, it isn't in any part of the block data available, but rather in a track that only the drive itself is allowed to read (since LBA 0 is /after/ this track, and addresses are unsigned). Drives can give access to read this, although I don't believe the drive is required to make the disc serial ID accessible. I know of a couple of devices (PS2, for example) which do use this information for anti-copy schemes.

ithil
Jul 10, 2006, 11:14 PM
For audio CDs, this is true. Although IIRC, HFS+ volumes use a UUID. Now the question here is:

What type of volume are you trying to get an ID for? HFS+, UDF, ISO9660, FAT, NTFS?

UDF doesn't seem to include a UUID, and I would assume ISO9660 would also lack such a UUID. FAT is before GUIDs, so I have a feeling you won't get love there either, and OS X isn't aware of NTFS enough to read a GUID from that. Joliet is an unknown. HFS+ volumes all have UUIDs, from what I can tell, but I haven't done testing to see if it is truly unique between discs, and probably wouldn't be if they are pressed, but could be if they are all burnt.

Now, IIRC, there is an actual UUID that pressed CDs have, and CD-Rs as well. HOWEVER, it isn't in any part of the block data available, but rather in a track that only the drive itself is allowed to read (since LBA 0 is /after/ this track, and addresses are unsigned). Drives can give access to read this, although I don't believe the drive is required to make the disc serial ID accessible. I know of a couple of devices (PS2, for example) which do use this information for anti-copy schemes.

Thanks for the help..
I am porting a Windows application on Mac. I just want a replacement for the API "GetVolumeInformation" by which we can get the Unique number ( called serial number on Windows) for CD. Or is there a way to identify a CD (of any format) uniquely.