#1032523 fdutils: setfdprm parameters not retained with -p

Package:
fdutils
Source:
fdutils
Description:
Linux floppy utilities
Submitter:
Larry Kraemer
Date:
2023-03-08 19:57:17 UTC
Severity:
normal
#1032523#5
Date:
2023-03-08 17:22:01 UTC
From:
To:
Dear Maintainer,
In Debian 8 I have a SS DD 180K Floppy attached ad /dev/fd0.  I execute the following commands to format a TRS180 floppy, and it formats correctly.

larry@Debian811:~$ lsmod | grep floppy
floppy                 56090  0

larry@Debian811:~$ ls -alt /dev/fd0
brw-rw---- 1 root disk 2, 0 Mar  8 00:20 /dev/fd0

larry@Debian811:~$ groups larry
larry : larry cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner

larry@Debian811:~$ sudo ls -alt /media
total 16
drwxr-xr-x   4 root root   4096 Mar  6 14:50 .
drwxrw----   2 root floppy 4096 Mar  6 14:50 floppy
drwxr-xr-x  18 root root   4096 Mar  6 14:46 ..
drwxr-x---+  2 root root   4096 Mar  6 14:45 larry

larry@Debian811:~$ sudo gedit /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=5cc7486c-e24e-4327-aba3-50560ee92b58 /              ext4    defaults,noatime 0 1
UUID=99e769fc-7dea-4ae5-a063-1d400d134319 swap           swap    defaults,noatime 0 0

/dev/fd0	/media/floppy	auto rw,user,noauto	0	0

larry@Debian811:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1    4K  0 disk
sda      8:0    0 37.3G  0 disk
\u251c\u2500sda1   8:1    0    2G  0 part
\u251c\u2500sda2   8:2    0 29.4G  0 part /
\u2514\u2500sda3   8:3    0  5.9G  0 part [SWAP]
sdb      8:16   1 28.7G  0 disk
\u2514\u2500sdb1   8:17   1 28.7G  0 part
sr0     11:0    1 1024M  0 rom

larry@Debian811:~$ sudo setfdprm -p /dev/fd0 TRS180

larry@Debian811:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1  180K  0 disk
sda      8:0    0 37.3G  0 disk
\u251c\u2500sda1   8:1    0    2G  0 part
\u251c\u2500sda2   8:2    0 29.4G  0 part /
\u2514\u2500sda3   8:3    0  5.9G  0 part [SWAP]
sdb      8:16   1 28.7G  0 disk
\u2514\u2500sdb1   8:17   1 28.7G  0 part
sr0     11:0    1 1024M  0 rom

larry@Debian811:~$ sudo getfdprm /dev/fd0
SS DD sect=18 ssize=256

larry@Debian811:~$ sudo superformat /dev/fd0 TRS180
 Verifying cylinder 39, head 0
mformat -s9 -t40 -h1 -S1 -M512  a:

When I change to a TEAC 360K DS/DD Floppy Drive, Debian says it is not a valid Block Device.


But, in Debian 11 nothing works with the same hardware and the same commands.
I just change my Hard Drive to the latest version of Bullseye (Ver 11).


larry@Debian11:~$ lsmod | grep floppy
floppy                 90112  0

larry@Debian11:~$ ls -alt /dev/fd0
brw-rw---- 1 root disk 2, 0 Mar  8 00:20 /dev/fd0

larry@Debian11:~$ groups larry
larry : larry cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner

larry@Debian11:~$ sudo ls -alt /media
total 16
drwxr-xr-x   4 root root 4096 Mar  6 14:50 .
drwxrwx---   2 root root 4096 Mar  6 14:50 floppy
drwxr-xr-x  18 root root 4096 Mar  6 14:46 ..
drwxr-x---+  2 root root 4096 Mar  6 14:45 larry

larry@Debian11:~$ sudo gedit /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=5cc7486c-e24e-4327-aba3-50560ee92b58 /              ext4    defaults,noatime 0 1
UUID=99e769fc-7dea-4ae5-a063-1d400d134319 swap           swap    defaults,noatime 0 0

/dev/fd0	/media/floppy	auto rw,user,noauto	0	0

larry@Debian11:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1    4K  0 disk
sda      8:0    0 37.3G  0 disk
\u251c\u2500sda1   8:1    0    2G  0 part
\u251c\u2500sda2   8:2    0 29.4G  0 part /
\u2514\u2500sda3   8:3    0  5.9G  0 part [SWAP]
sdb      8:16   1 28.7G  0 disk
\u2514\u2500sdb1   8:17   1 28.7G  0 part
sr0     11:0    1 1024M  0 rom

larry@Debian11:~$ sudo setfdprm -p /dev/fd0 TRS180

larry@Debian11:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1  180K  0 disk
sda      8:0    0 37.3G  0 disk
\u251c\u2500sda1   8:1    0    2G  0 part
\u251c\u2500sda2   8:2    0 29.4G  0 part /
\u2514\u2500sda3   8:3    0  5.9G  0 part [SWAP]
sdb      8:16   1 28.7G  0 disk
\u2514\u2500sdb1   8:17   1 28.7G  0 part
sr0     11:0    1 1024M  0 rom

larry@Debian11:~$ sudo getfdprm /dev/fd0
SS DD sect=18 ssize=256


larry@Debian11:~$ sudo superformat /dev/fd0 TRS180
Measuring drive 0's raw capacity
format: Operation not supported

larry@Debian11:~$ sudo getfdprm /dev/fd0
SS DD sect=18 ssize=256

larry@Debian11:~$ ls -alt /dev/fd0
brw-rw---- 1 root disk 2, 0 Mar  8 00:20 /dev/fd0

If I install a TEAC DS/DD 360K Floppy Drive, I get an error message stating "Not a valid Block Device.  I do have an ICON on my desktop, but i can not mount the DS/DD 360K Floppy Drive, which contains a formatted floppy.  This happens in Debian 8 and Debian 11.

It should be easy enough to duplicate and find the problem.

#1032523#10
Date:
2023-03-08 10:50:26 UTC
From:
To:
Dear Maintainer,

Here is the information on my Debian 8 system:

Floppy Drive is now a TEAC DS/DD 360K floppy:

larry@Debian8-386:~$ sudo setfdprm -p /dev/fd0 360/360
[sudo] password for larry:

larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   360K  0 disk
sda      8:0    0 465.8G  0 disk
\u251c\u2500sda1   8:1    0 117.2G  0 part /
\u251c\u2500sda2   8:2    0  24.4G  0 part
\u251c\u2500sda3   8:3    0 321.7G  0 part
\u2514\u2500sda4   8:4    0   2.5G  0 part [SWAP]
sdb      8:16   1  28.7G  0 disk
\u2514\u2500sdb1   8:17   1  28.7G  0 part
sr0     11:0    1  1024M  0 rom

larry@Debian8-386:~$ sudo getfdprm /dev/fd0
get geometry parameters: No such device


Floppy Drive is now a TEAC DS/DD 360K floppy:

larry@Debian8-386:~$ sudo setfdprm -p /dev/fd0 TRS180
larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   180K  0 disk
sda      8:0    0 465.8G  0 disk
\u251c\u2500sda1   8:1    0 117.2G  0 part /
\u251c\u2500sda2   8:2    0  24.4G  0 part
\u251c\u2500sda3   8:3    0 321.7G  0 part
\u2514\u2500sda4   8:4    0   2.5G  0 part [SWAP]
sdb      8:16   1  28.7G  0 disk
\u2514\u2500sdb1   8:17   1  28.7G  0 part
sr0     11:0    1  1024M  0 rom
larry@Debian8-386:~$ sudo getfdprm /dev/fd0
get geometry parameters: No such device


larry@Debian8-386:~$ sudo setfdprm -p /dev/fd0 360/360

larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   360K  0 disk
sda      8:0    0 465.8G  0 disk
\u251c\u2500sda1   8:1    0 117.2G  0 part /
\u251c\u2500sda2   8:2    0  24.4G  0 part
\u251c\u2500sda3   8:3    0 321.7G  0 part
\u2514\u2500sda4   8:4    0   2.5G  0 part [SWAP]
sdb      8:16   1  28.7G  0 disk
\u2514\u2500sdb1   8:17   1  28.7G  0 part
sr0     11:0    1  1024M  0 rom

larry@Debian8-386:~$ sudo mount -t msdos /dev/fd0 /media/floppy/
mount: /dev/fd0 is not a valid block device

larry@Debian8-386:~$ ls -alt /dev/fd0
brw-rw---- 1 root disk 2, 0 Mar  8 03:26 /dev/fd0

larry@Debian8-386:~$ ls -alt /media
total 20
drwxr-x---+  2 root root   4096 Mar  8 01:22 larry
drwxr-xr-x  22 root root   4096 Oct 31  2020 ..
drwxr-xr-x   5 root root   4096 Dec 24  2018 .
drwxrw----   2 root floppy 4096 Dec 20  2018 floppy
drwxr-xr-x   2 root root   4096 Dec  9  2016 cdrom0
lrwxrwxrwx   1 root root      6 Dec  9  2016 cdrom -> cdrom0

This Computer (Desktop) also has a Floppy on the Desktop, but nothing
will mount it.  Not by clicking on the Icon or trying to mount the
floppy via a terminal.


I've searched the Internet and found lot of postings on "Not a Valid
Block Device", but nothing that gives a hint of a FIX.

#1032523#15
Date:
2023-03-08 19:56:33 UTC
From:
To:
Dear Maintainer,
In Debian 8 I install a 1.2M floppy as A: (/dev/fd0)

larry@Debian8-386:~$ sudo setfdprm -p /dev/fd0 360/1200

larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   360K  0 disk
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0 117.2G  0 part /
├─sda2   8:2    0  24.4G  0 part
├─sda3   8:3    0 321.7G  0 part
└─sda4   8:4    0   2.5G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom

larry@Debian8-386:~$ sudo superformat /dev/fd0 360/1200
 Verifying cylinder 39, head 1
mformat -s9 -t40 -h2 -S2 -M512  a:

larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   360K  0 disk
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0 117.2G  0 part /
├─sda2   8:2    0  24.4G  0 part
├─sda3   8:3    0 321.7G  0 part
└─sda4   8:4    0   2.5G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom
larry@Debian8-386:~$

larry@Debian8-386:~$ sudo mount -t msdos /dev/fd0 /media/floppy
larry@Debian8-386:~$ ls -alt /media/floppy
total 8
drwxr-xr-x 5 root root 4096 Dec 24  2018 ..
drwxr-xr-x 2 root root 3584 Dec 31  1969 .

larry@Debian8-386:~$ sudo cp dsk2hex.c /media/floppy
larry@Debian8-386:~$ dir /media/floppy
dsk2hex.c

larry@Debian8-386:~$ sudo umount /media/floppy

larry@Debian8-386:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1   360K  0 disk
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0 117.2G  0 part /
├─sda2   8:2    0  24.4G  0 part
├─sda3   8:3    0 321.7G  0 part
└─sda4   8:4    0   2.5G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom

I can even mount and unmount the 360K floppy from the Desktop ICON that I
have previously formatted.  It just doesn't work on a 360K floppy Drive
with 360K
DS DD Media.

BUT, NO LUCK using a 360K DS DD Floppy Drive with DS DD Media.

Hope this help your troubleshooting.

Larry