"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Unsupported Floppy Formats: 'dd' Maybe

From WELLSCARGO on Wed, 14 Jul 1999

Jim,

Thanks for info on the minicom switching to the VC did the trick, all the hascii characters look just fine. I have one more for you if you have time. I have a customer that sends me gerber data for pwb designs on a 3.5" diskette.

The diskette labels say UNIX BAR FORMAT. They are unreadable on a DOS machine and I thought maybe they could be mounted with linux.

I tried mount -t auto and the path, but would not mount. Normally I have to to use a program from sydex called anadisk to do a sector dump and separate each file with a word processor. These files are nothing but ascii text, vector data. Was wanting to know if you have ever run across this type of format, others say they have heard of "TAR'" format but not BAR. Would like to send you a diskette to look at if you have time. If so please let me know where to send it.

Thanks a Bunch, Don Wells

(!) I supposed you could send me a diskette. However it might make more sense to try a few tricks on your own.
Clearly there is not MS-DOS filesystem on these diskettes. Probably there is not filesystem on them at all. (It's possible to dump raw data unto diskettes under UNIX and Linux, to treat a diskettes as a simple linear sequence of bits (almost like a virtual tape device).
First I'd try a command like:
dd if=/dev/fd0H1440 | file -
... this will dump/extract data off of your floppy (a 1.44 Mb diskette in "drive A:" in this example, change the if= parameter to suit your situation) and feed it to the 'file' command which will attempt to identify the file format based on "Magic numbers" (format signatures or characterist patterns).
Note: you'll probably see an error message about a "broken pipe" --- ignore that; it's to be expected from this type of command. 'dd' would feed the 'file' command the whole diskette through our pipe, but the 'file' command will close it's end of the pipe after a few hundred bytes. 'file' doesn't need to see more than that.
It could be that "BAR" is actually just an alternative 'tar' format (for example).
The next trick would be to try 'tar tf /dev/fd0' to see if GNU tar can read a "table of contents" from the device.
In any event, if you've been pulling the raw data off of these diskettes using something like AnaDisk then you can perform a similar operation under Linux using the 'dd' command. Simply try:
dd if=/dev/fd0 of=/tmp/mydata bs=18k
... then edit the /tmp/mydata file with any text editor. You can even run the 'strings' command on /tmp/mydata like so:
strings /tmp/mydata > /tmp/mytext
... and then edit that.
This might work.
Note that AnaDisk has support for all sorts of bizarre diskette formats (such as formats entailing the use of varying numbers of sectors on different tracks). The Linux floppy device driver is probably not going to tolerate those sorts of shenanigans (they were used for things like copy-protection under MS-DOS). Thus the 'dd' command might complain if that was the case. I presume you've already determined (through AnaDisk) what the specific formatting quirks on these floppies might be.
(It would be interesting to contact the author of AnaDisk and ask for a Linux port for those really unusual formats).
Another approach might be to install DOSEMU (and tweak its configuration to give sufficient floppy disk drive access).
Then you might be able to run AnaDisk under Linux, under emulation.


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 44 August 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 4 7 9
11 12 14 17
18 19 20 21 24 25 26
28 29 30 31 32 33 34
35 36 37 38 39 40 41
42 43 44 45 46 47 48


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]