experchange > linux.hardware

(03-06-18, 11:22 PM)
Hello,

I have been trying to get a floppy drive working with a linux computer
(kernel 4.9), but I have been facing several issues.

If anybody reading this has a floppy drive working for reads and
writes on a system with a 4.x linux kernel, please let me know. At
this point, I have no idea if floppies work out of the box like they
did in the past.

The drive is a 3.5 inch 1.44 M internal floppy drive, properly detected
by linux as /dev/fd0:

Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077

Reading apparently works, but anything other than small writes to a
filesystem in the disk will not work as intended. I can't create new
filesystems. Even when mkfs, mkfs.vfat or mkdosfs return with no
errors, mount will not detect the filesystem that should be there (it
does work fine for other floppies).

Writes to /dev/fd0, from mkfs or dd, may result in error messages,
such as

floppy0: disk removed during i/o
floppy0: unexpected interrupt repl[0]=0 repl[1]=0 repl[2]=0
repl[3]=1 repl[4]=0 repl[5]=1 repl[6]=2

The disk was not removed, and this message shows up with several
different drives. When it shows up, the corresponding process hangs
forever. On some occasions, dd if=/dev/zero of=/dev/fd0 freezes the
entire machine (not even magic sysrq works after that).

Other messages that have shown up during floppy i/o include

floppy0: sector not found: track 0, head 0, sector 1, size 2
floppy0: sector not found: track 0, head 0, sector 1, size 2
blk_update_request: I/O error, dev fd0, sector 0
floppy0: probe failed...
[repeated several times]
floppy0: probe failed...
blk_update_request: I/O error, dev fd0, sector 0
floppy: error -5 while reading block 0

I've tried different drives and different floppy disks, including one
brand-new never-used-before disk.

A Knoppix live CD from 2011 (version 6.7.1) has issues writing to
floppies as well. On the other hand, a FreeDOS 1.0 live CD can do full
formats on the same disks that linux had trouble writing to. These disks
will then mount successfully on linux. As far as I can tell, FreeDOS has
no issues with the floppy drive, so I strongly suspect this is not a
hardware issue.

So far, this looks like an issue with the GNU/linux system. The system
is Gentoo; On the web, I've found a report of similar issues with
Fedora Core (from 2010)
.

The lockups, on the other hand, resemble what is described in kernel
bug 113851, (the
southbridge is AMD SB710).

Any advice or suggestions?
Carlos E.R. (03-08-18, 04:53 PM)
On 2018-03-06 22:22, (Nuno Silva) wrote:
> Hello,
> I have been trying to get a floppy drive working with a linux computer
> (kernel 4.9), but I have been facing several issues.
> If anybody reading this has a floppy drive working for reads and
> writes on a system with a 4.x linux kernel, please let me know. At
> this point, I have no idea if floppies work out of the box like they
> did in the past.


It works on my 4.4.114-42-default kernel (openSUSE Leap 42.3).

> The drive is a 3.5 inch 1.44 M internal floppy drive, properly detected
> by linux as /dev/fd0:
> Floppy drive(s): fd0 is 1.44M
> FDC 0 is a post-1991 82077
> Reading apparently works, but anything other than small writes to a
> filesystem in the disk will not work as intended. I can't create new
> filesystems. Even when mkfs, mkfs.vfat or mkdosfs return with no
> errors, mount will not detect the filesystem that should be there (it
> does work fine for other floppies).


I don't try to write, I only use it to retrieve old data.

I don't know if I have empty floppies to test. Maybe I do, but they are
"recent" manufacture and thus horrible quality. I'm not going to destroy
an old and good quality floppy.
Piergiorgio Sartor (03-11-18, 07:07 PM)
On 2018-03-06 22:22, (Nuno Silva) wrote:
[...]
> I've tried different drives and different floppy disks, including one
> brand-new never-used-before disk.


Same motherboard?
Maybe the on board controller has issues...

bye,
(03-13-18, 03:17 AM)
On 2018-03-11, Piergiorgio Sartor wrote:

> On 2018-03-06 22:22, (Nuno Silva) wrote:
> [...]
>> I've tried different drives and different floppy disks, including one
>> brand-new never-used-before disk.

> Same motherboard?
> Maybe the on board controller has issues...


I don't know... it is still possible that there is something about the
specific components of this motherboard, but it does work on FreeDOS.

With more time, I may get to try on other computers or with older
kernels.
Eric Pozharski (08-18-18, 01:41 PM)
with <p878qu$amp$1> <nunojsilva> (Nuno
Silva) wrote:
> On 2018-03-11, Piergiorgio Sartor wrote:
>> On 2018-03-06 22:22, (Nuno Silva) wrote:


*SKIP*
> I don't know... it is still possible that there is something about the
> specific components of this motherboard, but it does work on FreeDOS.


So FreeDOS accesses floppy either through BIOS (in real mode). Or
manipulates it through IO-Ports by itself (in protected mode). What
makes it driver by itself and this mega-driver just isn't broken.
(Maybe because it's their bread-and-butter).

> With more time, I may get to try on other computers or with older
> kernels.


I believe that with USB-FDD you will be more successful.

p.s. What reminds me, I've definetely seen the very same problem
somewhere. Maybe here.
Similar Threads