Skip to contentSkip to conversation

fdisk -l hits floppy drive

DISCUSSION Felix Miata 4 participants 10 messages Feb 6, 2015 – Apr 7, 2015 Util-Linux package

lore
Share & tools
lore
#0 lore raw

util-linux-2.25.1-5.2.x86_64 on openSUSE
kernels 3.16.6 and 3.18.3

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

Signature · 6 lines
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
#1 lore raw
Quoted 2 lines · Felix Miata

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I see in the manual page:

-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.

Is the floppy listed in /proc/partitions?

Dale

#2 lore raw

Dale R. Worley composed on 2015-02-07 21:37 (UTC-0500):

Quoted 5 lines
Quoted 2 lines · Felix Miata

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

Quoted 7 lines

I see in the manual page:

-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.

Is the floppy listed in /proc/partitions?

Yes, as is the OM drive:
3.18.3-1-desktop #1 SMP PREEMPT Mon Jan 19 12:38:51 UTC 2015 (c3e148f) x86_64 x86_64 x86_64 GNU/Linux (openSUSE Tumbleweed)
major minor #blocks name

   8        0 1953514584 sda
   8        1     409600 sda1
   8        2    2048000 sda2
   8        3     409600 sda3
   8        4          1 sda4
   8        5    4245488 sda5
   8        6   49151984 sda6
   8        7     258032 sda7
   8        8   10239984 sda8
   8        9   10239984 sda9
   8       10   10239984 sda10
   8       11   10239984 sda11
   8       12    5119984 sda12
   8       13    4095984 sda13
   8       14    2047984 sda14
   8       15   24575984 sda15
 259        0   77823984 sda16
 259        1  240639984 sda17
 259        2  972799984 sda18
 259        3     450544 sda19
 259        4   49151984 sda20
   2        0          4 fd0
  11        0    1048575 sr0

Knoppix 7.4's 3.16.3 and openSUSE 13.2's 3.16.7 have fd0 in /proc/partitions too. openSUSE 13.1's 3.12.36 lists sr0, but not fd0. Tumbleweed's hwinfo --[cdrom|disk|ide|partition|redasd|scsi] (v21.11) all produce fd0 messages on vttys too. hwinfo --floppy produces 6 messages instead of 4, so I suspect this is about something exclusive to openSUSE other than util-linux, but what? Kernel? Systemd logging? Other?

All above are on a Dell Optiplex 760 SFF (ICH10D) with BIOS A12, 4 versions older than latest
available (A16; too big to fit on a 1.44M floppy).
http://www.dell.com/us/dfb/p/optiplex-760/pd

A similar age Biostar (NM10/ICH7) with Tumbleweed's 3.18.3 and 13.2's 3.16.7 lists fd0, sr0 & sr1, but Tumbleweed's fdisk (2.25.1) and 13.2's fdisk (2.25.1) don't result in the floppy hits trailing output. 13.1's 3.16.7 has sr0 & sr0 in /proc/partitions, but not fd0, same as Rawhide's 3.19.rc7.

An older Optiplex GX280 SFF (ICH6; BIOS A04) with floppy and Tumbleweed's 3.18.1 and
13.2's 3.16.7 list both sr0 and fd0 in /proc/partitions, but drop no fd0 messages on the ttys from fdisk -l or hwinfo.

Signature · 6 lines
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
maintainer
#3 lore raw
Quoted 6 lines · Felix Miata

Knoppix 7.4's 3.16.3 and openSUSE 13.2's 3.16.7 have fd0 in /proc/partitions too. openSUSE 13.1's 3.12.36 lists sr0, but not fd0. Tumbleweed's hwinfo --[cdrom|disk|ide|partition|redasd|scsi] (v21.11) all produce fd0 messages on vttys too. hwinfo --floppy produces 6 messages instead of 4, so I suspect this is about something exclusive to openSUSE other than util-linux, but what? Kernel? Systemd logging? Other?

I guess it's the same situation like with cdroms, years ago has been added the removable media to /proc/partitions, the attempt to revert this regression has been rejected.

https://lkml.org/lkml/2012/11/19/572

Maybe we can ignore the floppies according to size (4KiB in you example) or devno.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#7 lore raw
In reply to Felix Miata

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Felix Miata

util-linux-2.25.1-5.2.x86_64 on openSUSE kernels 3.16.6 and 3.18.3

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I'm guessing you don't actually have a floppy, in which case, your bios is misconfigured to think you do and you should fix that.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJU2MgcAAoJENRVrw2cjl5RAWIH/R6n+VbEfKcUhbjlbUR0wSzo E6fqw+3G+MCUH6O0L/e+MvbME8WrJagtzgfvBcTMLjZUihOamcyZ8icQncybDp13 60lsaTosvrwWwt3lNTQvEVAVTnJem5Yj987zTDY4tHpmZushL2a6oeVLCmy5s8WU zN4CBlJnWJ+xZd+OWe11s5owacxrasty4nUIAwrQKmH75+hdS7z3BRV3YUJ7YVkl XDGprm5g/XOgu+QlS2VRFW7n/OS0Jp0Hx0cHY3KBVokI/i4+gqSn5yIbA+qqSSok KlBDtHQG1uNfif+00aoLBNb/8RfDjZ9IYzY6qIIhvlKlIJW7rgWiDD19+ysPDm8= =Q8uE
-----END PGP SIGNATURE-----

#8 lore raw

Phillip Susi composed on 2015-02-09 09:45 (UTC-0500):

Quoted 10 lines · Felix Miata
Quoted 6 lines

util-linux-2.25.1-5.2.x86_64 on openSUSE kernels 3.16.6 and 3.18.3

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I'm guessing you don't actually have a floppy, in which case, your bios is misconfigured to think you do and you should fix that.

You guessed wrong:
https://bugzilla.opensuse.org/show_bug.cgi?id=773058
https://bugzilla.opensuse.org/show_bug.cgi?id=916773

Signature · 6 lines
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
#4 lore raw
In reply to Felix Miata
Quoted 13 lines · Felix Miata

Dale R. Worley composed on 2015-02-07 21:37 (UTC-0500):

Quoted 10 lines
Quoted 2 lines · Felix Miata

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I see in the manual page:

-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.

Quoted 6 lines
Quoted 1 line

Is the floppy listed in /proc/partitions?

Yes, as is the OM drive:
...
2 0 4 fd0
...

Then the answer to your question is, "Yes, it is expected and intended."

Are you saying that you find this undesirable? If so, do you have a proposal for how "fdisk -l" should determine the list of devices that it should list?

Dale

#5 lore raw

[email protected] (Dale R. Worley) composed on 2015-02-16 21:30 (UTC-0500):

Quoted 15 lines
Quoted 12 lines · Felix Miata

Dale R. Worley composed on 2015-02-07 21:37 (UTC-0500):

Quoted 10 lines
Quoted 2 lines · Felix Miata

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I see in the manual page:

-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Is the floppy listed in /proc/partitions?

Yes, as is the OM drive:
...
2 0 4 fd0
...

Then the answer to your question is, "Yes, it is expected and intended."

Why?

Quoted 1 line

Are you saying that you find this undesirable?

Based on my understanding of the meaning of partition, yes. From the man page:

fdisk is a dialog-driven program for creation and manipulation of partition tables.

sr0 and fd0 don't have partition tables. Are sr0 and fd0 not always invalid targets for fdisk? If yes, what reason is there for /proc/partitions to contain them?

Quoted 3 lines

If so, do you have a
proposal for how "fdisk -l" should determine the list of devices that it should list?

AFAICT, it should list all items in /proc/partitions, which should contain only devices that are partitionable. Including /dev/md* in /proc/partitions also seems wrong.

How fdisk does what it does doesn't really matter to me. What matters is not hearing unexpected attempts to access an old floppy drive that I expect to work when I need it instead of being worn out by unwanted and useless access attempts; and not seeing floppy access failure messages appear in the middle of other activity.

Signature · 6 lines
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
#6 lore raw
Quoted 9 lines · Felix Miata
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

fdisk -l is causing the floppy drive to get hit, which reflects the 4 kernel messages onto the tty running fdisk. Is this expected or intended?

I see in the manual page:

-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

Is the floppy listed in /proc/partitions?

Then the answer to your question is, "Yes, it is expected and intended."

Why?

Because "fdisk -l lists the partition tables for all devices listed in /proc/partitions", as it says in the manual page.

Your complaint is not really about the behavior of fdisk, but about the contents of /proc/partitions, which is maintained by some other group.

Quoted 10 lines
Quoted 1 line

Are you saying that you find this undesirable?

Based on my understanding of the meaning of partition, yes. From the man page:

fdisk is a dialog-driven program for creation and manipulation of partition tables.

sr0 and fd0 don't have partition tables. Are sr0 and fd0 not always invalid targets for fdisk? If yes, what reason is there for /proc/partitions to contain them?

Actually, you *can* write a partition table to fd0, though people rarely bother to. It makes more sense if fd0 is an LS-120 (120 MiB) device, which I had on one computer.

Dale

#9 lore raw
In reply to Felix Miata

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 7 lines · Felix Miata
Quoted 3 lines

I'm guessing you don't actually have a floppy, in which case, your bios is misconfigured to think you do and you should fix that.

You guessed wrong:
https://bugzilla.opensuse.org/show_bug.cgi?id=773058
https://bugzilla.opensuse.org/show_bug.cgi?id=916773

Huh? That bug report echos exactly what I said: the bios is misconfigured to think there is a floppy when in fact, there is not.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCgAGBQJVIyz4AAoJENRVrw2cjl5RIvsH/A6h5V9R9yTQtNZv4RPQFU9I XRG7RZORiB25EXbunKQ9Ry+HqG0WucOC/fM5LJIKQCnl1c1osy3bpdg6Vy5UceiZ le9Awn7fH6+naOpdPIJjdT3FXTaL0oqXpAuHG839PqcHO0QxWFWOujHJX1op1cUw oXTLDlP6KN3+z/5M4SZoLxtqas6nqtyWFp64jqARhI6ry6wjTbO+IgKYjKa9PXBe O1Y1dOBiHkrCmFfPIVCoIrX4Zs0PVFZfozOk5v8bU62hmCG0bv7joxJgAAS3G8uu 7UoZjPZwF9UHFBX/5qT2MfrPjfgPxu6QopXrmqmaGCxaPXEvWem+/YZPCUGlYWg= =65/7
-----END PGP SIGNATURE-----