Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ithil

macrumors newbie
Original poster
Jul 2, 2006
5
0
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.
 
ithil said:
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.
 
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.
 
You mean something like this that's available from the Info button in Disk Utility?
 

Attachments

  • Picture 1.png
    Picture 1.png
    79.6 KB · Views: 163
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.
 
IJ Reilly said:
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.
 
Krevnik said:
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.