Bug 972670 - os-prober generates infinite stream of I/O error on fd0 log entries
os-prober generates infinite stream of I/O error on fd0 log entries
Product: Fedora
Classification: Fedora
Component: os-prober (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Hedayat Vatankhah
Fedora Extras Quality Assurance
: 1115026 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-06-10 07:40 EDT by Tom Horsley
Modified: 2016-07-19 06:14 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 06:14:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Horsley 2013-06-10 07:40:32 EDT
Description of problem:

I was just doing a net install of fedora 19 beta and it reached the "installing boot loader" step and displayed a busy cursor for about 20 minutes, so I started checking out the various consoles by switching with Ctrl-Alt-Fn.

In the shell I did a ps command and found it sitting in os-prober.

In the syslog window I found an infinite number of I/O error messages for device "fd0".

This computer does not have a floppy disk installed, but I hadn't disabled the floppy in the BIOS.

Seems unlikely to me that even if there was an OS on the floppy that you'd really want it listed permanently in your grub.cfg file :-).

Perhaps os-prober should ignore floppy drives?

Version-Release number of selected component (if applicable):
os-prober-1.58-1.fc19.x86_64 (I think)

How reproducible:
I only did the one install, but seems likely it would happen again under the same set of conditions.

Steps to Reproduce:
1. Boot netinst CD, install fedora 19 beta.
2. Watch spinning circle forever at install boot loader time

Actual results:
It finally completed in about 30 minutes of doing install boot loader

Expected results:
A lot less time

Additional info:
Comment 1 joerg.lechner 2013-06-10 08:29:35 EDT
Reproducible also with installation via the iso DVD final TC2 i.e. in systems without Floppy Disk Drive. Enable "Floppy Disk Boot Seek" in BIOS. Start installation.
Comment 2 Hedayat Vatankhah 2013-06-10 15:00:30 EDT
os-prober scans any removable-media and lists their OSes too, so it is natural to scan for an OS on a floppy. It is probably left to the os-prober user (e.g. grub2-mkconfig) to decide which OSes it wants. This is actually a guess, so maybe excluding any removable media including floppies is also an option for os-prober developers.

Anyway, the bug is about when no floppy disks are available. I wonder if there are any ways to check if there are any floppy disk in the drive. I'll try to see if I can find any. Excluding fd0 is not a fix, but can be a workaround for F19 (while this bug was present in older versions too).
Comment 3 joerg.lechner 2013-06-10 16:03:27 EDT
I have now disabled, all what there is to disable (including parallel and serial port, second and third boot device), enabled  USB, PS2, first boot device - cdrom, network etc.. This bootloader process took  now approximately 1 minute.

Now I have enabled step by step all disabled BIOS options. The last but one was "onboard FDC controller", still 1 minute duration of "bootloader installieren". After enabling  Floppy Drive A the process "bootloader installieren" took about 15 minutes. Tom is right, also in my case it's fd0.
Comment 4 Hedayat Vatankhah 2013-06-10 16:24:24 EDT
Please give the output of the following command when your floppy drive controller is ENABLED in BIOS:
floppy --probe
Comment 5 Tom Horsley 2013-06-10 19:57:46 EDT
On the fedora 19 system where I had the problem, I only have f19 installed, and apparently the util-linux package no longer includes the /usr/bin/floppy program, so this is hard to do (one more reason to exclude fd0 in os-prober since they seem to be trying to eradicate floppy support everywhere :-).
Comment 6 joerg.lechner 2013-06-11 05:41:50 EDT
I can do a test. But in my test it's only useful to enable the BIOS settings for "Boot Up Floppy Disk Seek" (about 5 min delay to the bootloader install time) or Floppy Disk Drive A or Floppy Disk Drive B (each about 10 min delay time). Enabling the Onboard FDC Controller in "my" Phoenix Bios does not add any time to the 1 min Bootloader install time. Which test do You want?
Comment 7 Hedayat Vatankhah 2013-06-11 06:42:49 EDT
That would be nice. Probably the latter is more useful, but if you can do both tests, that would be great. It is surprising that floppy is removed in F19! :P
Comment 8 joerg.lechner 2013-06-11 10:33:18 EDT
Hi, didn't find the floppy command. Do You know kfloppy? I have it now installed. Is it helpful for this test? I don't know kfloppy to the detail You want to have a test. It can be used as command line tool, but there is naturally no "--probe" argument. How shall I test? I have no floppy drives connected, possible is enable/disable in the BIOS, which arguments of kfloppy are useful for this test?
Comment 9 Adam Williamson 2013-06-11 22:15:42 EDT
I really think the thing to do here is just ask upstream os-prober not to probe floppy drives (perhaps add a special parameter to force it to do so, in case some crazy idiot somewhere is still booting something via a special floppy).

IIRC, it is not really possible to reliably tell if a floppy drive is populated or not without actually trying to read it.
Comment 10 joerg.lechner 2013-06-12 02:35:40 EDT
Short question: What is expected by the command "floppy --probe"? The manual shows "--probe, -p
    - Probe for available floppy drives. floppy creates and displays a list of all detected floppy drives."
In this case also kfloppy can be used.
In my system there is no Floppy Disk Drive connected (I can easily connect,if really neccessary for this problem). Kfloppy says if I enable the first floppy drive (A) in Bios "internal error: device not correctly defined".
fdformat says:
" [joerg@localhost ~]$ fdformat /dev/fd0
fdformat: stat failed /dev/fd0: Datei oder Verzeichnis nicht gefunden
[joerg@localhost ~]$", the same for fd1. 
That's all what I have found so far about floppy commands/tests.
Comment 11 Hedayat Vatankhah 2013-06-12 03:17:48 EDT
Adam: upstream is VERY unresponsive. Some of my patches are pending there for months (maybe more than a year), without any comments. So, probably I should do it myself if it is not possible to detect if a floppy drive physically exists (I'll send the patch upstream though). 

Joerg: Thanks for the test. The problem with kfloppy is that it is a KDE application, I'm looking for something that can be used by os-prober to detect if a floppy drive exists physically. 
Does KFloppy print the error message fast? Or it takes minutes? (No, there is no need to connect a floppy drive, sine in that case os-prober should immediately understand that there are no floppies in the drive). 
What about fdformat? Does it print the error message immediately? The only problem with using fdformat in os-prober is that if a floppy actually exists, it'll be formatted! 
If KFloppy and/or fdformat can detect that no floppy drives exists in a few seconds, I'll try to use the same method. If not, probably we should go with disabling fdX probing in os-prober altogether. (Unfortunately, sending options to os-prober is not easy, since it is called by grub2-mkconf. Using environment variables is probably a better option. I wonder if anaconda developers agree with setting an environment variable for os-prober. If not, it should be disabled by default.)
Comment 12 Adam Williamson 2013-06-12 03:21:40 EDT
Peter, WDYT would be best to do here? Just drop scanning floppy drives?
Comment 13 Tom Horsley 2013-06-12 06:26:15 EDT
I saw bazillions of I/O errors in the log for fd0. If someone could notice just one error and give up instead of retrying infinitely, that would also make it go a lot faster (don't know if error status makes it all the way up to the user that early though).
Comment 14 joerg.lechner 2013-06-12 09:17:17 EDT
Both commands are very quick (fdformat immediately). Kfloppy on the command line calls the "kfloppy window", You have to click "format", then click something like "verify", all answers are immediately. I think (I am no linux expert) both programs check first the device list, and if the device is not in the list, the answer is like "no device". As I understand both programs will try to format.
Comment 15 Hedayat Vatankhah 2014-04-24 02:44:29 EDT
Well, I think I should drop scanning floppy drives for now. It seems that will be a better bug!
Comment 16 Hedayat Vatankhah 2014-07-08 14:01:39 EDT
*** Bug 1115026 has been marked as a duplicate of this bug. ***
Comment 17 Jaroslav Reznik 2015-03-03 09:57:39 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
Comment 18 Leslie Satenstein 2016-02-10 08:04:58 EST
The Fedora os-prober does not appear to analyze btrfs systems.  I had a similer problem with SUSE's os-prober.

I worked with SUSE to debug their os-prober, such that it would work with btrfs or ext4 files and also recognize floppy/DVDs.

Open Source, Why not look at SUSE's version of os-prober for their corrections.
Comment 19 Fedora End Of Life 2016-07-19 06:14:22 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.