From: lee@uhunix.uhcc.Hawaii.Edu (Greg Lee)
Subject: Re: Questions and suggestions
Keywords: linux
Organization: University of Hawaii
Date: Tue, 14 Apr 1992 18:31:28 GMT

In article <1992Apr14.143326.3281@arbi.informatik.uni-oldenburg.de> Adrian.Wallaschek@arbi.informatik.uni-oldenburg.de (Adrian Wallaschek) writes:
}...
}	- under DOS there is a package called FDREAD which makes it possible to
}	  write 1.44 MB on 5.25"-floppies without problems. I think it should be
}	  possible to modify the floppy driver that way, it could handle those
}	  disks. (Perhaps you'd like some extra 240k on your distribution disk)
}	  Is there a nearer description on the floppy-devices, esp. the minor
}	  device-numbers ?

I've been using 3.5" disks formatted by fdform18 (whose msdos tsr is fdread.exe)
for a month or so with no apparent problem.  It gets me 1722 1k blocks per diskette.
(In msdos: fdformat a: f172, or something similar.) My drive A: is 3.5", but you might
be able to adapt my changes for extra room on 5.25" disks.

(1) I've patched floppy.c to replace one of the floppy types I don't use with a type
    for the 1722 block 3.5" diskettes (context diff below is against 95c version).
    I also disabled track reads for diskettes with the extra sectors/track (21).
(2) There's a corresponding special file in /dev:
    brw-rw-rw  1 root    root      2,  12 Mar 13 17:54 /dev/f172
(3) For mtools (the version that reads disk types from /etc/mtools), there's a line in
    /etc/mtools:
    H /dev/f172 12 82 2 21
    to use, e.g., "mcd h:/" with the overstuffed diskettes.

*** linux/kernel/blk_drv/floppy.c	Fri Mar 13 17:03:31 1992
--- /sys/linux/kernel/blk_drv/floppy.c	Sun Apr  5 02:30:04 1992
***************
*** 92,98 ****
  	{    0, 0,0, 0,0,0x00,0x00,0x00 },	/* no testing */
  	{  720, 9,2,40,0,0x2A,0x02,0xDF },	/* 360kB PC diskettes */
  	{ 2400,15,2,80,0,0x1B,0x00,0xDF },	/* 1.2 MB AT-diskettes */
! 	{  720, 9,2,40,1,0x2A,0x02,0xDF },	/* 360kB in 720kB drive */
  	{ 1440, 9,2,80,0,0x2A,0x02,0xDF },	/* 3.5" 720kB diskette */
  	{  720, 9,2,40,1,0x23,0x01,0xDF },	/* 360kB in 1.2MB drive */
  	{ 1440, 9,2,80,0,0x23,0x01,0xDF },	/* 720kB in 1.2MB drive */
--- 92,99 ----
  	{    0, 0,0, 0,0,0x00,0x00,0x00 },	/* no testing */
  	{  720, 9,2,40,0,0x2A,0x02,0xDF },	/* 360kB PC diskettes */
  	{ 2400,15,2,80,0,0x1B,0x00,0xDF },	/* 1.2 MB AT-diskettes */
! /*--gl	{  720, 9,2,40,1,0x2A,0x02,0xDF },*/	/* 360kB in 720kB drive */
! 	{ 3444,21,2,82,0,0x0C,0x00,0xCF },	/* 1.722MB diskette */
  	{ 1440, 9,2,80,0,0x2A,0x02,0xDF },	/* 3.5" 720kB diskette */
  	{  720, 9,2,40,1,0x23,0x01,0xDF },	/* 360kB in 1.2MB drive */
  	{ 1440, 9,2,80,0,0x23,0x01,0xDF },	/* 720kB in 1.2MB drive */
***************
*** 374,380 ****
--- 375,387 ----
   */
  static void transfer(void)
  {
+ /**--gl
  	read_track = (command == FD_READ) && (CURRENT->errors < 4);
+ **/
+ 	if (floppy->sect <= 18) read_track = (command == FD_READ) && (CURRENT->errors < 4);
+ 		else read_track = 0;
+ /****/
+ 
  	if (cur_spec1 != floppy->spec1) {
  		cur_spec1 = floppy->spec1;
  		output_byte(FD_SPECIFY);
***************
*** 543,549 ****
  	   0,   0,   0,   0,
  	 360, 360 ,360, 360,
  	1200,1200,1200,1200,
! 	 360, 360, 360, 360,
  	 720, 720, 720, 720,
  	 360, 360, 360, 360,
  	 720, 720, 720, 720,
--- 550,557 ----
  	   0,   0,   0,   0,
  	 360, 360 ,360, 360,
  	1200,1200,1200,1200,
! /*--gl	 360, 360, 360, 360, */
! 	1722,1722,1722,1722,
  	 720, 720, 720, 720,
  	 360, 360, 360, 360,
  	 720, 720, 720, 720,


--
Greg Lee <lee@uhunix.uhcc.hawaii.edu>
Xref: sparky comp.os.linux:199 alt.os.linux:2296