in reply to Re: (OT) how to identify a partition
in thread (OT) how to identify a partition

Thank you,
I'm sorry, by identify- I mean track, I mean like.. tattoo it, like.. I want its soul.
Thus, the basic mount info is useless- if I unplug a drive and plug it into another machine, for example.

Drive serial number would be useful. I would like to do that via code, instead of busting the dang thing open.

Getting an ID of the actual fs would be very interesting also- I am guessing some formats keep an id of some sort.

Replies are listed 'Best First'.
Re^3: (OT) how to identify a partition
by mr_mischief (Monsignor) on Apr 18, 2008 at 16:45 UTC
    You could look into hdparm or your could poke through the /proc entries for the hard drives.

    /proc/ide/ide0/hdb/ for instance will have lots of info on the second drive on your first IDE channel. /proc/ide3/hdg/model will have the model number of the first drive on your 4th IDE channel.

    I'm not entirely sure how unique it is, but I think it's partly from the serial number, so /proc/ide/ide0/hda/identify should have some identifying information for the first IDE drive on your first IDE channel. Hopefully it's universally unique.