HDD Serial ID

Discuss Applications
Post Reply
agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

HDD Serial ID

Post by agent007 »

hi all,

Doing a hdparm -i /dev/hdc gives a SerialNo=3HS0xxxx.....IS it possible to change that using some tool? since its possible to change MAC addresses......

TIA

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Re: HDD Serial ID

Post by Void Main »

agent007 wrote:Doing a hdparm -i /dev/hdc gives a SerialNo=3HS0xxxx.....IS it possible to change that using some tool? since its possible to change MAC addresses.
I assume you mean physically and permanently? It is not possible to change a MAC address permanently (well, not reasonably possible). The hardware has a "burnt in" MAC address that you can manually "override" in the OS while the OS is running, and in fact a trivial and well documented task indeed, but it doesn't change the physical MAC address on the card itself. Of course it may be "possible" to change this address, however I believe it would take some surgery on the card.

Now I think that changing a hard drive serial number would require similar work but I don't know that to be a fact. I used to work with a guy who would know that as he was an engineer at Miniscribe (hard drive manufacturer). I believe that the serial number comes from a reserved part of the drive that the drive can read from but can not physically write to. I would be surprised if there is code on board to allow that to happen. It would be my guess that it is only writable at the manufacturer during the build process.

Of course this is all speculation and I could very well be wrong but I have done a fair amount of lower level stuff over a long period of time that I would think if I had run across that capability I would have held on to it (remember). And it would be quite a popular thing to be able to do in the M$ world these days if you could do it.

EDIT: I was doing a little digging to see if I could find a better answer in the hdparm source. I realized that hdparm gets the HD serial number information from the ioctl function, specifically the HDIO_GET_IDENTITY ioctl call from this list. It also uses the HDIO_DRIVE_CMD function of ioctl to set different drive params. I would assume if it can be done from the OS that it would be in this area that you would look. The serial number is something I would think the manufacturers want to keep protected so I would guess that if there was a way to chang it, that it would be non-standard between manufacturers and it would probably take sending undocumented instructions to the drive itself. Again, all speculation but maybe it will give you some more ideas on what to look for, then again maybe not. :)

Linux Frank
administrator
administrator
Posts: 239
Joined: Fri Jan 10, 2003 2:06 pm

Post by Linux Frank »

Careful with this.

First off it is fairly standard to store serial numbers in Eproms (or SDRAM, EEPROM, PROM, &tc.) and if you open up your harddrive and find out which memory device is the Eprom in qestion (it would not necessarily be obvious) you can locate the manufacturers data sheet and work out how to set it to write mode and then set up a system to write new code, such as a serial number.

However before you go any further understand certain things:

1.) By opening the Hardrive you invalidate the warranty. If you succeed and change the serial number you give up all warranties and rights - even statutory rights because you are physically altering the equipment and you are not a qualified person to do so. You will also probably find that manufacturers will refuse to even repair the drive at a later date. I have had to tell customers that I can't give warranty service on equipment because they entered the software on our product and tried to reprogram the device.

2.) You will need to know what data is in the Eprom. First off the serial number may have information on batches and dates encoded into the serial number, if you want to change the number then this is not important to you. The Eprom may also contain constants data. For example it might have stored a series of numbers in there during test that noted how long certain actions take to happen on this specific unit, and those numbers would get used in various calculations performed by the device - mess that data up and your unit is screwed and will stop working properly - of course they may not even be there. So you will have to set the device to read, build a counter to adress the device as it needs (I seem to recall hardrives use ECL rather than CMOS type levels - so this could get expensive or labor intensive) and then have a circuit to collect the data and save it.

3.) Often times the memory devices are one time writes, which means once the device has been flashed, it would need to be replaced rather than reporgrammed, and so you will need soldering equipment, supplies of the device (assuming it is not a purpose built device to which you might not have legal access) and the ability to program the device out of circuit.

4.) the Eprom may not actually exist in the form you would recognise. Or it exists on a processor that has it built in as just one of many functions - careful here as one mistake and you could be reprogramming the entire harddrive which you are not going to be able to do (unles you have access to the tuning data for this specific device).

I could find many more things to warn you about, but without knowing exactly what you are doing I would waste much time. Unless you have a very specific and important reason for changing the serial number I would not bother because it is hardwork, no guarantee of success and would cost more in labor than a dozen new hardrives (easily). Now it may be that the manufacturer offers a tool for this on their website (although I doubt it) and you could always contact them, and some bright spark may have figured out a software solution, although again if the functionality is not built into the harddrive then this is next to impossible without extra equipment, and lots of labor.

My advice to you is to not bother, I can't personally envision any reason that would make this worthwhile, except as an engineering challenge.

Post Reply