Interesting problem, I did some Googling too ...
http://www.pcbuyerbeware.co.uk/Produ...tion.htm#oempa has some interesting background info. 11
If you're willing to use a free ($0) M$ based program, look into VolumeID from SysInternals:
http://www.sysinternals.com/Utilities/VolumeId.html
There are several flaws to this:
* No source
* Access to an actual M$ box
* Use dosemu
* Use WINE
However, there is a GNU/Linux solution too. The key is to find out exactly where on the floppy the VSN is stored. I know it's somewhere in the boot record (BR) (the 1st sector), but which of the 512 bytes. I finally found the answer here:
http://www.geocities.com/thestarman3/DOS/bd98/SD2.htm, look at the 2nd illustration (
http://www.geocities.com/thestarman3...FAT12BRhex.gif). The site has bandwidth limits & sometimes is hard to display; but don't worry, I will duplicate it below.
Here is a list of the tools you will need:
* dd
* hd (hexdump)
* head
* hexedit
* mdir, from mtools -- semi-optional
Overview of the steps in the process:
* Prepare
* Examine
* Verify
* Extract
* Edit
* "Install"
* Verify
Prepare
---------
Read the rest of these instructions.
Install the tools you lack.
RTFM for the ones you are not familiar with.
My apologies if this seems too obvious to mention, I mean no insult.
Examine
---------
Code:
$ dd if=/dev/floppy bs=512 count=1 skip=0 | hd | head -3
1+0 records in
1+0 records out
512 bytes transferred in 0.875321 seconds (585 bytes/sec)
00000000 eb 3e 90 2a 7a 58 2f 55 49 48 43 00 02 01 01 00 |ë>.*zX/UIHC.....|
00000010 02 e0 00 40 0b f0 09 00 12 00 02 00 00 00 00 00 |.à.@.ð..........|
00000020 00 00 00 00 00 00 29 14 23 07 1b 4e 4f 20 4e 41 |......).#..NO NA|
Here is the prize "secret":
the VSN is bytes 0000002A - 00000027. Notice that I show the locations backwards, that's because the order in the BR is reversed.
The raw VSN for my target floppy is
14 23 07 1b.
Verify
---------
Code:
$ mdir A: | head -2
Volume in drive A has no label
Volume Serial Number is 1B07-2314
Notice that
1B07-2314 ==
14 23 07 1b; except for order, case, & punctuation.
Extract
---------
Code:
$ dd if=/dev/floppy bs=1 count=4 skip=39 | hd
4+0 records in
4+0 records out
4 bytes transferred in 0.792846 seconds (5 bytes/sec)
00000000 14 23 07 1b |.#..|
00000004
$ dd if=/dev/floppy bs=1 count=4 skip=39 > floppy.vsn
4+0 records in
4+0 records out
4 bytes transferred in 0.876638 seconds (5 bytes/sec)
What I did here was narrow the focus of my 'dd' command to just the VSN & put it in a file for editing. The 1st block of code is to verify that my new 'dd' parameters are doing what I intend. Obviously (again, no insult intended) 'floppy.vsn' is an arbitrary filename; you can use anything that makes sense to you.
Edit
---------
Edit away, here is a condensed view of the hexedit screen:
Code:
00000000 14 23 07 1B .#..
00000010
[snip/] # empty rows omitted
00000190
000001A0
--- floppy.vsn --0x0/0x4------------------------------------------------
The instructions for hexedit, although new to me, are fairly simply -- you shouldn't have any difficulty with this. One warning
don't change the length of the file. If your new VSN is longer than the old, you will overwrite important data in the BR of your floppy in the next step.
"Install"
---------
(If someone has a better name for this step, please let me know.)
Code:
$ dd of=/dev/floppy bs=1 count=4 skip=39 < floppy.vsn
This is just the reverse of the Extract step: We output to, instead of input from, the floppy (
if =>
of); & we redirect
from (<) instead of
into (>) our edit file.
Verify
---------
Code:
$ mdir A: | head -2
You should now see your new VSN in place.
Warning
---------
All of the code except the last 2 steps was copied from the terminal window(s) where I tested/developed it. I did
NOT actually go through with changing the VSN on my target floppy -- it has important data on it & was write protected throughout the process. However, I think I have enough experience with 'dd' to believe that it will work as intended. I suggest you play with this on a "throw-down" floppy, perhaps several times, before you risk an important one. As always, a backup is strongly recommended. Again, as always: "If it breaks, you get to keep the pieces."
Copyright (c) 2005 F. A. Archibald III, All rights reserved