Trisquel 7 and two floppy drives: 2-1/2 and 5-1/4

13 replies [Last post]
amenex
Offline
Joined: 01/03/2015

Two floppy drives are in my Trisquel 7 setup. One is a 3-1/2 inch that works fine. On the same cable is another floppy drive, a 5-1/4 inch that worked when it was in my old debian system, long since abandoned. However, with them both in place, powered up, and containing appropriate disks, Trisquel sees and automounts "floppy" and "floppy0" with the same contents from the 3-1/2 inch floppy disk. The contents are readable. With just one floppy in place - the 5-1/4 inch one, I get the following error when I goad Trisquel 7 into attempting automount:

> Unable to Mount Floppy Disk
> Error mounting system-managed device /dev/fd0: Command-line `mount "/media/floppy0"' exited with non-zero exit status 32: mount: /dev/fd0 is not a valid block device

Trouble is, there's no /dev/fd1 ... just /dev/fd and /dev/fd0

It seems that the automount mounts /dev/fd to /media/floppy and /dev/fd0 to /media/floppy0, even when there's only the single 3-1/2 inch floppy disk in place and no diak in the 5-1/4 inch floppy drive. Therefore, in /media there are two identical file systems from the self-same floppy disk, both mounted at once.

How do I persuade Trisquel 7 to recognize the two different floppy drives as fd0 and fd1, not the one 3-1/2 inch floppy drive as both fd and fd0 ?

tomlukeywood
Offline
Joined: 12/05/2014

i dont know how to fix your problem but just in case you get no other reply’s
i will mention that anything that worked in Debian 7
will work in the libre distro gnewsense 4 (currently in alpha)

http://www.gnewsense.org/

so if noone can fix this problem then waiting for gnewsense 4 to come out may be a option

or you could try the alpha now if you dont mind it being unstable:
https://lists.nongnu.org/archive/html/gnewsense-dev/2014-12/msg00000.html

Trisquelian
Offline
Joined: 01/23/2015

" Two floppy drives are in my Trisquel 7 setup. One is a 3-1/2 inch that works fine. On the same cable is another floppy drive, a 5-1/4 inch that worked when it was in my old debian system, long since abandoned. However, with them both in place, powered up, and containing appropriate disks, Trisquel sees and automounts "floppy" and "floppy0" with the same contents from the 3-1/2 inch floppy disk. The contents are readable. With just one floppy in place - the 5-1/4 inch one, I get the following error when I goad Trisquel 7 into attempting automount: "

For reference, linux names floppy devices, in the /dev/ folder, according to the following pattern "/dev/fd*", so fd0 and fd1 represent two different devices. The "*" represents the number associated with the device that is given upon recognition by the appropriate kernel mechanisms. The norm is to start from 0.

There is a also symbolic link to the floppy disk for the device used for convenience named /dev/floppy (this is also the case for /dev/cdrom and /dev/dvd, which point to /dev/sr* [?]). I do not know if the symbolic link scales to multiple devices.

===========================================

" > Unable to Mount Floppy Disk
> Error mounting system-managed device /dev/fd0: Command-line `mount "/media/floppy0"' exited with non-zero exit status 32: mount: /dev/fd0 is not a valid block device

Trouble is, there's no /dev/fd1 ... just /dev/fd and /dev/fd0 "

You can list the available disks and the respective partitions with:

fdisk -l

You should check the appropriate logs when you get an error code instead of a message. As I see it you tried to mount a whole device and the mount command works, by default, with partitions only. It would help if you specified if you mounted the device yourself and how you tried to do it.

===========================================

" It seems that the automount mounts /dev/fd to /media/floppy and /dev/fd0 to /media/floppy0, even when there's only the single 3-1/2 inch floppy disk in place and no diak in the 5-1/4 inch floppy drive. Therefore, in /media there are two identical file systems from the self-same floppy disk, both mounted at once.

How do I persuade Trisquel 7 to recognize the two different floppy drives as fd0 and fd1, not the one 3-1/2 inch floppy drive as both fd and fd0 ? "

There are a number of things I am not certain of, but the fdisk command above should clear out most of it. I am not even sure if the system recognized both floppy devices, but that must be me getting confused.

Also, if you do:

apropos floppy

you should get a somewhat complete listing of floppy relevant commands.

Lastly, a note on the logs. You probably want to check the dmesg command and /var/log/syslog/var/log/messages using "tail -f" as appropriate in order to get "live" output.

Edit: Phrasing.

amenex
Offline
Joined: 01/03/2015

Thanks Trisquelian for the helpful thoughts.

Alas, even when I tried to simplify things by disconnecting the 3-1/2 inch floppy drive so that there is only the 5-1/4 inch drive in place, all Trisquel 7 can do is detect that the floppy is fd0 and that it's a National Semiconductor PC87306, but when I Google that, I get the data sheet entitled, "SuperI/OTM Enhanced Sidewinder Lite Floppy Disk Controller, Keyboard Controller,Real-Time Clock, Dual UARTs, Infrared Interface, IEEE 1284 Parallel Port, and IDE Interface." Further reading of that data sheet reveals this about the floppy disk controller:

--Floppy Disk Controller
--Software compatible with the DP8477, the 765A and the N82077 16-byte FIFO (disabled by default)
--Burst and Non-Burst modes
--Perpendicular recording drive support
--High performance internal analog data separator (no external filter components required)
--Low power CMOS with power-down mode
--Automatic media-sense support with full IBM TDR (Tape Drive Register) implementation for PC-AT and
PS/2 floppy drive types

Which suggests that Trisquel wants something to deal with an all-in-one chip on some old, obsolete motherboard, _not_ the I/O system of the floppy drive itself.

When I try to use automount, nothing happens on the Trisquel screen, but I do asee a long series of error messages with dmesg |tail, to this effect:

"Buffer I/O error on device fd0, logical block 0" ... many times over.

Trisquelian
Offline
Joined: 01/23/2015

Hmm, that was really the extent of what I know about floppy devices. You mentioned both floppy drives being on the same cable. Are they in series perhaps? I can see how the controller would handle this and Linux subsequently getting confused. I forgot to mention this before...

In order to mount the floppy disk you have to have a valid filesystem and partition format first. You should really include the output of "fdisk -l", so we can verify that everything is correct. I am really uncertain what the standards are for floppy disks partitioning, but reading through the man pages of the commands I sent you (and assuming you can discard the current contents of the floppy disks):

First do a low-level format on the disk with:
sudo fdformat /dev/fd0

Then you need to create the FAT file system (I think it will leave you with a FAT partition; again "fdisk -l" will tell you this)
sudo mkfs -t msdos /dev/fd0

You will have to create a partition if does not exist yet.

Another note: you cannot mount the drive if is already mounted elsewhere, since this is proving to be a challenge it is better to not mount it automatically ("umount" for unmounting). For the mounting part you want to use mount with the "-t vfat option", I believe.

"This message appears when you don’t have a floppy drive attached to Linux server." - Source is http://www.cyberciti.biz/faq/linux-end_request-ioerror-dev-fd0-sector0/
The message itself is not very suggestive to me, but you can test this out since you have at least one functioning drive.

amenex
Offline
Joined: 01/03/2015

About Trisquel's view of the floppy: The OS says 1.44MB, but it's really 360KB. I'll go find another 5-1/4 inch floppy drive, just in case this one's defective or just plain tired. Almost all the floppies I've saved have data on them, but there must be blanks somewhere in the various totes. The one I tried was an IBM disk for DisplayWrite 6, a precious one indeed.

Trisquelian
Offline
Joined: 01/23/2015

Here's a nice size to capacity table with the year they were introduced in: http://en.wikipedia.org/wiki/Floppy_disk#Sizes.2C_performance_and_capacity

1.44MB sounds more likely. I was handed a few dozens of these, when I replaced a point of sale computer at an Hotel. Those make for nice cup bases nowadays.

amenex
Offline
Joined: 01/03/2015

My DisplayWrite 3 disks came to me about 1985 with a PCXT; they're definitely 360KB. They're double-sided; I never had a PC with the higher-capacity drives that I can remember.

There's so little memory on a PCXT that I cannot imagine a Trisquel installation running on one.
If there is such an animal, I still have that PCXT ...

The main improvement nowadays is that we've gotten past those awful dot-matrix printers.

Trisquelian
Offline
Joined: 01/23/2015

I still had one running last year. What a nightmare had to use printer buffers so the computer would not freeze. Not to mention paper costs. It came on a single sheet, 500 pages(A5) long perforated on both sides and it still managed to jam.

Hey, any luck with formatting/opening/writing ?

amenex
Offline
Joined: 01/03/2015

I tried replacing the first floppy drive with another spare, and I still get this with dmesg | tail:

> end_request: I/O error dev fd0, sector 0

Trisquel calls this floppy drive a 1.44M device also ... I'm out-voted.

Same result with a different floppy disk, ca. 1992.

The drive spins up as soon as I insert a floppy disk; no magic smoke has been lost.

Automount and manual mounting gives a result to the effect that the device is write-protected (when it's not)

Poking around the 'net, I found what was 'sposed to be the magic command:
> sudo udisks --mount /dev/fd0
and
> sudo fdformat /dev/fd0

To which I received the result to the effect that the device did not respond ... or that there was something wrong with the network ...

cat /etc/fstab says:
> /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

After trying all these, the dmesg | tail ends with:
> end_request: I/O error dev fd0, sector 0

amenex
Offline
Joined: 01/03/2015

The BIOS for my motherboard has settings for the floppy type - no automatic detection. I have tried the 360K and 1.2M settings, and the only clue I have is that at the 360K setting the drive itself doesn't care whether I put the disk in place rightside up or rightside down - the motor runs whichever way the disk is inserted. Not so for the other setting, whose disks can only be read one way. I've also changed the position of the connector on the cable and changed the cable. I get the same I/O error all the time.

I've install Fdutils, but navigating the man pages isn't helping me decide (read: guess) which one of the many commands I should try to get the drive to read a disk.

amenex
Offline
Joined: 01/03/2015

Updated the BIOS ... still cannot read that 5-1/4 inch drive (although I could read the 3-1/2 inch floppy ... or I couldn't have updated that BIOS !)

Here's the automount failure diagnostics after the BIOS update:

[ 102.560026]
[ 102.560040] floppy driver state
[ 102.560043] -------------------
[ 102.560067] now=4294769856 last interrupt=4294766852 diff=3004 last called handler=recal_interrupt [floppy]
[ 102.560070] timeout_message=floppy start
[ 102.560073] last output bytes:
[ 102.560076] 0 90 4294766851
[ 102.560079] 13 80 4294766851
[ 102.560082] 0 90 4294766851
[ 102.560085] 1a 90 4294766851
[ 102.560088] 0 90 4294766851
[ 102.560091] 3 80 4294766851
[ 102.560094] c1 90 4294766851
[ 102.560097] 8 90 4294766851
[ 102.560101] 7 80 4294766851
[ 102.560104] 0 90 4294766851
[ 102.560107] 8 81 4294766852
[ 102.560110] e6 80 4294766852
[ 102.560113] 0 90 4294766852
[ 102.560116] 0 90 4294766852
[ 102.560119] 0 90 4294766852
[ 102.560122] 1 90 4294766852
[ 102.560125] 2 90 4294766852
[ 102.560128] 9 90 4294766852
[ 102.560131] 2a 90 4294766852
[ 102.560134] ff 90 4294766852
[ 102.560137] last result at 4294766852
[ 102.560140] last redo_fd_request at 4294766850
[ 102.560144] 20 00 .
[ 102.560154] status=10
[ 102.560157] fdc_busy=1
[ 102.560165] do_floppy=main_command_interrupt [floppy]
[ 102.560169] delayed work.function=f8483290 expires=96
[ 102.560171] cont=f84872b4
[ 102.560174] current_req=f6639f00
[ 102.560176] command_status=-1
[ 102.560179]
[ 102.560184] floppy0: floppy timeout called
[ 102.560192] end_request: I/O error, dev fd0, sector 0
[ 102.560199] Buffer I/O error on device fd0, logical block 0

There were a number of these output visible with dmesg. All pretty much the same. Above that were these lines:

[ 49.016116] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 104
[ 49.016127] Raw EDID:
[ 49.016133] 00 ff ff ff ff ff ff 00 4c 2d 7b 03 32 32 51 41
[ 49.016145] 01 12 01 03 0e 2f 1e 78 2a f0 e1 a6 55 48 9b 26
[ 49.016150] 12 50 54 bf ef 80 b3 00 81 80 81 40 71 4f 01 01
[ 49.016154] 01 01 01 01 01 01 7c 2e 90 a0 60 1a 1e 40 30 20
[ 49.016159] 36 00 da 28 11 00 00 1a 00 00 00 fd 00 38 4b 1e
[ 49.016164] 51 0e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53
[ 49.016168] 79 6e 63 4d 61 73 74 65 72 0a 20 20 00 00 00 ff
[ 49.016173] 00 48 39 4e 51 43 30 32 32 36 31 0a 20 20 00 55
[ 54.407559] audit_printk_skb: 123 callbacks suppressed
[ 54.407577] type=1400 audit(1422825075.941:53): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=2119 comm="apparmor_parser"
[ 54.407617] type=1400 audit(1422825075.941:54): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2119 comm="apparmor_parser"
[ 54.408966] type=1400 audit(1422825075.942:55): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2119 comm="apparmor_parser"
[ 68.768030] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128
[ 68.768038] Raw EDID:
[ 68.768042] 00 ff ff ff ff ff ff 00 4c 2d fb 03 32 32 51 41
[ 68.768046] 01 12 01 03 0e 2f 1e 78 2a 78 f1 a6 55 48 9b 26
[ 68.768049] 12 50 54 bf ef 80 b3 00 81 80 81 40 71 4f 01 01
[ 68.768052] 01 01 01 01 01 01 7c 2e 90 a0 60 1a 1e 40 30 20
[ 68.768055] 36 00 da 28 11 00 00 1a 00 00 00 fd 00 38 4b 1e
[ 68.768058] 51 0e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53
[ 68.768061] 79 6e 63 4d 61 73 74 65 72 0a 20 20 00 00 00 ff
[ 68.768064] 00 48 39 4e 51 43 30 32 32 36 31 0a 20 20 00 55
[ 90.528035]

Then I ran the following three commands:

> sudo floppycontrol --resetnow 2
> sudo fdrawcmd recalibrate 0
> sudo fdrawcmd recalibrate 0

Then after that I tried sudo mount /dev/fd0 /media/floppy0

Now the tail end of dmesg reads:

[ 1047.584037] floppy driver state
[ 1047.584039] -------------------
[ 1047.584065] now=747584 last interrupt=744580 diff=3004 last called handler=recal_interrupt [floppy]
[ 1047.584068] timeout_message=floppy start
[ 1047.584070] last output bytes:
[ 1047.584074] 0 90 744579
[ 1047.584077] 13 80 744579
[ 1047.584079] 0 90 744579
[ 1047.584082] 1a 90 744579
[ 1047.584085] 0 90 744579
[ 1047.584088] 3 80 744579
[ 1047.584090] c1 90 744579
[ 1047.584093] 8 90 744579
[ 1047.584096] 7 80 744579
[ 1047.584098] 0 90 744579
[ 1047.584101] 8 81 744580
[ 1047.584104] e6 80 744580
[ 1047.584106] 0 90 744580
[ 1047.584109] 0 90 744580
[ 1047.584112] 0 90 744580
[ 1047.584115] 1 90 744580
[ 1047.584117] 2 90 744580
[ 1047.584120] 9 90 744580
[ 1047.584123] 2a 90 744580
[ 1047.584125] ff 90 744580
[ 1047.584128] last result at 744580
[ 1047.584130] last redo_fd_request at 744578
[ 1047.584134] 20 00 .
[ 1047.584144] status=10
[ 1047.584146] fdc_busy=1
[ 1047.584152] do_floppy=main_command_interrupt [floppy]
[ 1047.584156] delayed work.function=f8483290 expires=96
[ 1047.584159] cont=f84872b4
[ 1047.584162] current_req=eb6bd2d0
[ 1047.584164] command_status=-1
[ 1047.584167]
[ 1047.584172] floppy0: floppy timeout called
[ 1047.584180] end_request: I/O error, dev fd0, sector 0
[ 1047.584188] Buffer I/O error on device fd0, logical block 0

And yes, dmesg says that I remembered to set fd0 to 360K.

amenex
Offline
Joined: 01/03/2015

The BIOS implicitly says that there can be only one floppy drive installed at the same time, so I had to switch from the 3-1/2 inch drive to the 5-1/4 inch drive by unplugging the cable from the one and attaching it to the other.

amenex
Offline
Joined: 01/03/2015

Do good things come in threes ? Trying that theory, I hooked up my third spare 5-1/4 inch floppy drive ... same errors.

This time, I'm reporting the first of about six retries:

[ 105.166522] i915: render error detected, EIR: 0x00000010 [seems to be related to the GPU, but I don't see any evidence of a glitch]
[ 116.736090]
[ 116.736105] floppy driver state
[ 116.736109] -------------------
[ 116.736156] now=4294784032 last interrupt=4294780085 diff=3947 last called handler=recal_interrupt [floppy]
[ 116.736161] timeout_message=floppy start
[ 116.736165] last output bytes:
[ 116.736170] 0 90 4294780084
[ 116.736175] 1a 90 4294780084
[ 116.736179] 0 90 4294780084
[ 116.736184] 3 80 4294780084
[ 116.736189] c1 90 4294780084
[ 116.736193] 8 90 4294780084
[ 116.736198] 7 80 4294780084
[ 116.736203] 0 90 4294780084
[ 116.736207] 8 81 4294780085
[ 116.736212] 4 80 4294780085
[ 116.736217] 0 90 4294780085
[ 116.736222] e6 80 4294781044
[ 116.736227] 0 90 4294781044
[ 116.736231] 0 90 4294781044
[ 116.736236] 0 90 4294781044
[ 116.736241] 1 90 4294781044
[ 116.736245] 2 90 4294781044
[ 116.736250] 9 90 4294781044
[ 116.736255] 2a 90 4294781044
[ 116.736260] ff 90 4294781044
[ 116.736264] last result at 4294780085
[ 116.736268] last redo_fd_request at 4294780064
[ 116.736274] 78 x
[ 116.736286] status=10
[ 116.736291] fdc_busy=1
[ 116.736302] do_floppy=main_command_interrupt [floppy]
[ 116.736308] delayed work.function=f84f5290 expires=12
[ 116.736313] cont=f84f92b4
[ 116.736317] current_req=f14c0b40
[ 116.736321] command_status=-1
[ 116.736324]
[ 116.736334] floppy0: floppy timeout called
[ 116.736350] end_request: I/O error, dev fd0, sector 0
[ 119.744025]