On 10 February 2010 17:12, Graeme Geldenhuys <graemeg.li...@gmail.com> wrote: > > How well did you test the reading of HDD serial number?
I think I found another alternative to find the HDD serial number. Getting the boot define is fairly easy, so is the serial number for a ATA (IDE) hard disk. As I said, SCSI and SATA is a bit more difficult. But there seems to be a new method that should work too - I tested it in three very different machines, each have a different version of Linux too. And more importantly, all without ROOT access. Option 1) UUID look-up can be done via /var/log/udev This same file also gives you ALL the information about each device, including the long and short serial number. Option 2) Knowing the UUID or device (eg: /dev/sda1) one can simply do a lookup in the /dev/disk/by-id/ directory. Each file in that directory has the following information: <bus>-<brand>-<model>-<serial#>[-<partition>] So by simply parsing the name, you can find the serial number of the device. Can anybody else running Linux, and preferably not Ubuntu (as I am using Ubuntu), have a look and see if they have the same files with information about hard drives? -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus