[Fdutils] Anomalies on fdutils 5.5

Martin Gregorie martin at gregorie.org
Sun Oct 14 19:19:08 CEST 2012


I have been using fdutils 5.5 and dd on a Linux system (Fedora 16,
kernel 3.4) to read HD 3.5" floppy disks (2 sides, 80 tracks, 1.4MB)
written by a MC68020 based system that runs OS-9/68000 version 2.4. The
disks are backups containing LHZ archives. By using setfdprm and dd I
was able to make images of the floppys which were successfully read by
the os9exec emulator and the archives unpacked, so many thanks for
helping me get out of a sticky situation.

However, in the process I have uncovered some problems with the fdutils
package which you'll probably want to fix.

Problems with the zero based parameter
======================================
The name of this parameter is inconsistent: setfdprm calls it
'zerobased', which works as a command line argument, but it fails to
read the COCO360 and COCO720 entries in the floppy disk parameter table.
In fact, the parameter is referenced three times in the code base:

mediaprm.c:83:	{ "zerobased", F_ZEROBASED, 1},
printfdprm.c:146:		print("zerobased",0);			
superformat.c:672: { '\0', "zero-based", 0, EO_TYPE_SHORT, 1, 0,

My solution was to change "zero-based" in superformat.c line 672 and
mediaprm lines 787,789 and 792 to "zerobased", recompile and reinstall.

More seriously, the only references to the zero based parameter in the
manual are in the superformat context. There is no mention of it in the
setfdprm instructions or in section 4 (Media Description). 

This is a big problem: initially dd would only read the first track on
the first side of a disk, skipping the first sector and then failing to
read past the end of the track. Inspecting a hex dump made it obvious
that the first sector was being skipped and hence that the sector ID
needed to be rebased. Much time was wasted scanning the manual for stuff
about rebasing the sector ID with setfdprm until a search for info about
OS-9 disks in mediaprm showed me that there *was* a zero-base
parameter. 

Please add references to the 'zerobased' parameter into the setfdprm and
'Media Description' sections where they belong.

 
Media Description anomalies
===========================
There is no detectable consistency in this file's name in the manual and
the source code: it is variously referred to as:

/etc/fdprm			- in mediaprm (!),convert.c,oldfdprm.c,
				  and the manual
/usr/local/etc/fddriveprm	- in the manual
/etc/fdmediaprm
/usr/local/etc/fdmediaprm

yet "make install" installs it as /usr/local/etc/mediaprm - about the
only name that doesn't appear in the manual!
 
Build and install problems
==========================
fdmount no longer compiles because (in my distro, anyway it can't find
linux/ext2_fs.h, which is
in /usr/src/kernels/3.4.11-1.fc16.i686.PAE/include

As I don't need the program, I commented it out of the build, but this
does need to be fixed.

Also, for some relatively non-obvious reason, mediaprm was not copied
to /usr/local/etc - I manually copied it to save time.

A contribution
==============
You may like to add this disk definition to mediaprm:

"OS9HD3.5":
hd sect=34 ssize=256 head=2 cyl=80 tracksize=8704 dtr=0 zerobased

This parameter set works from the command line, but for some reason the
command "setfdprm /dev/fd0 OS9HD3.5" gets the error:

"Syntax error in /usr/local/etc/mediaprm at line 789 col 40: zerobase
unexpected" - this in the "COCO360" definition! Why?


Best regards,
Martin Gregorie





More information about the Fdutils mailing list