Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am trying to index a large pile of DVDs I have burned over the years, mostly with JPG images. In DOS, when you do a `dir`, you get an 8 hex digit "Volume Serial Number" which is burned into the ROM and appears to be unique (possibly a date created hash):
c:\> dir e: <enter>
Volume in drive E is 20080601a Volume Serial Number is F15F-12C4
<snip>
I have never been able to find this in any Linux command, but all the DVDs burn in Linux have it because I can see it in windoz.
Try looking at it using udevinfo. "udevinfo -q env -n /dev/sr0". I think there is a more direct way, but I don't remember the command. It looks like the Volume Serial Number is the same as the "FS_UUID" number that udevinfo returns for filesystems.
Amani,
What is media info? There appears to be no such Ubuntu command. K3B looks like a GUI front end for burning? I need some kind of command line whose output I can parse.
The only *media* command on Ubu 8.10 is /usr/bin/dvd+rw-mediainfo. It details write speeds, dvd structure, track info, fabricated toc, ..., but no volume serial number or even volume label. :-(
I have tried hwinfo --cdrom, lshw -C disk, grep cd /etc/mtab, ...
The Volume Serial Number appears to be some type of social security number hash unique to each disk and in want to use it as an index on an SQL table.
udevinfo gives a DVD Volume Label but no UUID or Volume Serial Number.
Jschiwal,
This gives me a good, additional solution to another nagging data extraction problem, finding a reliable way to get the Volume Label. For some strange reason, neither lshw nor hwinfo consistently gives me the volume label I assigned when I burned the ROM. Nautilus shows it, but I can't figure out how it does it!
On my BluRay burner, I often get /media/cdrom0 from lshw instead of something like /media/20090127a. I then have to fall back on hwinfo to get Volume ID: "20090127a". But on some of my disks, neither one works. Without being able to detect this programmatically, I have to:
1) eject the DVD
2) stuff it in a windoz box
3) execute `dir e:` to discover the label
4) copy it from a DOS window
5) vi a new file
6) paste it into the new file
7) save it to a Samba shared drive
8) open it in Linux
9) copy the VSN
10) paste it onto the dvd_read.pl -v $VSN command line to hotwire it
Aye Carumba! I believe the technical term for such a kludge is ICKY!
Hwinfo never detects a VL on my 2 dvd readers attached to a PCI, dual PATA card I installed to access more than 2 DVD readers. With 4 cores, I can keep 4 DVD digestion sessions going simultaneously, with MD5 signature calculations.
But alas, in all cases I have tried, I get "ID_FS_UUID=" with no Volume Serial Number. Some Linux architects must be chagrined to discover that the lowly DOS dir command can easily extract more data from a DVD than the refulgent heir to the throne. ;-)
The reason I wanted to use the Volume Serial Number as a primary key is that it is consistently calculated by the burning software at burn time [1] and does not rely upon my dim-witted burnmaster (me) to remember to type in a meaningful Volume Label at burn time.
Obviously, Linux does provide some way to extract these 8 critical characters of data from a DVD, but how?
Which backend burning program does Ubuntu use? Look at the contents of the package. IIRC, wodim which tends to be used now supplies several utility programs, and one of them may return the disc info you need.
I am wondering what this token is: 497F60E4000222E0. The time/date stamp too is listed 6 times. Isn't this what is used as fodder for the hash algorithm? I tried simply converting the 7D8BC1C3 to decimal and got something in the 2 billion range so it's not a Unix date (leading digit 7, duh .
I also dumped the hex to a file and grepped for the 7d8b in case insensitive mode and found nothing. I tried putting spaces in between the digits too. No luck.
Perhaps, it is not stored verbatim, but rather hashed out at `dir` time. I tried Googling it, but am apparently chasing my own tail and finding my own, previous posts.
Any ideas on which hash algorithm might be used.
I would hate to have to reboot to xp to get this data. It would seriously fork up my forking programs.
Jschiwal,
Ubuntu does not have packages for debianburn, cdrtools, cdrecord, or cdrkit. The Brasero command line api contains only data out commands like open, copy, empty, ... It's a burner, not a reader.
Wodim pointed me to cdrkit.org. Similar to Brasero only much more hard core. Without a package, I would not even begin to try to build it here. The documentation pointed to a /usr/local/bin/cd-read command which is very low level.
LINUX
20080410 http://livecd.berlios.de/
mklivecd 0.6.0-20071202 PCLinuxOS release (PCLinuxOS) for LiveCD 2008041012353600
2008041012353600
0000000000000000
2008041012353600
ISO MD5SUM = 959eefe74b130f8bda32ba7b16901b2d
THIS IS NOT THE SAME AS RUNNING MD5SUM ON THIS ISO!
EL TORITO SPECIFICATION
2008041012353600
2008041012353600
0000000000000000
2008041012353600
________________________________
Where exactly is the Volume Serial No located? in the alternative file system descriptor area?
1) eject the DVD
2) stuff it in a windoz box
3) execute `dir e:` to discover the label
4) copy it from a DOS window
5) vi a new file
6) paste it into the new file
7) save it to a Samba shared drive
8) open it in Linux
9) copy the VSN
10) paste it onto the dvd_read.pl -v $VSN command line to hotwire it
Not that it's a solution,but you could use dosbox or dosemu, write a macro in autoexec.bat to write the output of "dir" to file and skip steps 1-9.
2009021917360200
2009021917360200
0000000000000000
2009021917360200
MKI Thu Feb 19 17:36:02 2009
So 2009021917360200 means 2009 02 (Feb) 19 17:36:02.00
As for the volume serial number, don't bother, because you won't find it on the disk, it is computed internally by DOS / Window$. I'm not sure as to the algorithm, but you may find something here or search google:
H_TeXMeX_H, Mostlyharmless, Amani & Jschiwal,
Attempting to recreate uncle bill's dos madness in Linux is itself insanity, not to mention borderline blasphemy. I now see the error of my ways. Having a human readable disk format date/time stamp down to the hundredth of a second is vastly superior to some funky, encrypted, ms date hash anyway.
Here's the bottom line:
root@godzilla:/home/brianp# head -n 10 /dev/sr1 | strings -n 10 | freq.pl -wu | gr.pl '^[12]\d{8,}$'
2009012713304400
I can also add an error check on my written label which is supposed to be of the form 20090127a. Just make sure that the numerical part of the volume label can be found in this format date specification. Some have a Volume Label like "NEW" (yikes). I can hotwire these few in by hand.
I am finally going to get this mountain of old DVDs under control!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.