Linux thinks there’s a floppy drive when there’s not. Probing slows down bootup by almost a minute.

Bug #384579 reported by Johan Kiviniemi on 2009-06-07
232
This bug affects 38 people
Affects Status Importance Assigned to Milestone
Linux
Won't Fix
Medium
Fedora
Invalid
Undecided
Unassigned
devicekit-disks (Ubuntu)
High
Unassigned
Karmic
High
Unassigned
linux (Ubuntu)
Medium
Andy Whitcroft
Karmic
Medium
Andy Whitcroft

Bug Description

Since the installation of DeviceKit-disks, the system startup blocks for almost a minute on two of my computers when udev runs /lib/udev/devkit-disks-part-id for fd0.

Neither of the computers in question have a floppy drive, but Linux says:

[ 2.467794] Floppy drive(s): fd0 is 1.44M

I probably could workaround the problem by disabling floppy drives in BIOS settings, but one would think the OS could realize a drive doesn’t exist automatically.

% tail -n0 -F /var/log/syslog & time sudo /lib/udev/devkit-disks-part-id /dev/fd0
DKD_MEDIA_AVAILABLE=1
Entering MS-DOS parser (offset=0, size=4096)
Jun 8 13:39:53 virhe kernel: [131622.526230] end_request: I/O error, dev fd0, sector 0
Jun 8 13:40:06 virhe kernel: [131635.590496] end_request: I/O error, dev fd0, sector 0
Jun 8 13:40:06 virhe kernel: [131635.590517] Buffer I/O error on device fd0, logical block 0
read failed (Input/output error)
Exiting MS-DOS parser
Entering Apple parser
Jun 8 13:40:19 virhe kernel: [131648.654322] end_request: I/O error, dev fd0, sector 0
Jun 8 13:40:19 virhe kernel: [131648.654343] Buffer I/O error on device fd0, logical block 0
read failed (Input/output error)
Leaving Apple parser
No known partition table found
No partition table found on /dev/fd0: Input/output error
sudo /lib/udev/devkit-disks-part-id /dev/fd0 0.01s user 0.02s system 0% cpu 52.301 total

Interestingly, lshw does not list a floppy drive at all.

http://heh.fi/hw/virhe.20090607.dmesg.karmic
http://heh.fi/hw/virhe.20090607.lshw

Johan Kiviniemi (ion) wrote :
Martin Pitt (pitti) wrote :

Could you run sudo /lib/udev/devkit-disks-part-id /dev/... on all your partitions and check if one of them reproduces the long hang?

It's likely that this only happens on startup, when some RAID etc. is still being assembled. Can you please attach the output of "devkit-disks --dump"?

Changed in devicekit-disks (Ubuntu):
status: New → Incomplete
Johan Kiviniemi (ion) wrote :
Johan Kiviniemi (ion) wrote :

So the kernel detects a floppy disk drive with media although Johan confirmed that this computer does not even have a floppy drive at all:

KERNEL[1244325984.817689] add /devices/platform/floppy.0/block/fd0 (block)

summary: - Blocks system startup for almost a minute
+ probes /dev/fd0 for almost a minute
summary: - probes /dev/fd0 for almost a minute
+ probes (nonexisting) /dev/fd0 for almost a minute
affects: devicekit-disks (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Changed in linux:
status: Unknown → Confirmed
Johan Kiviniemi (ion) on 2009-06-08
description: updated
summary: - probes (nonexisting) /dev/fd0 for almost a minute
+ Linux thinks there’s a floppy drive when there’s not. Probing slows down
+ bootup by almost a minute.

A work around is to blacklist the floppy module:

sudo vi /etc/modprobe.d/blacklist.conf

add

blacklist floppy

and then run update-initramfs:

sudo update-initramfs -u

Hth

Ozan Çağlayan (ozan-pardus) wrote :

I don't know the internals of the initramfs in Ubuntu but an exact problem is caused by the findfs applet from busybox which calls open() on /dev/fd0 causing high delays.

I reported the bug to the upstream,
https://bugs.busybox.net/show_bug.cgi?id=365

I've workarounded the problem by adding a --no-floppy parameter to the findfs applet and calling it with that parameter from initramfs:
http://svn.pardus.org.tr/pardus/2009/devel/system/base/mkinitramfs/files/disable-floppy-probing.patch

If the findfs/busybox combination is not valid for Ubuntu, just ignore this.

Bruce Miller (brm0423) wrote :

I am not experiencing a one-minute delay in boot-up, but am seeing dmesg being filled with seeks for a non-existent floppy drive:

[92497.412378] end_request: I/O error, dev fd0, sector 0
[92509.608803] end_request: I/O error, dev fd0, sector 0
[92521.843198] end_request: I/O error, dev fd0, sector 0

There is no floppy drive on this computer.

dino99 (9d9) wrote :

want to tell that karmic is continously checking for a floppy even if the floppy drive is empty
that's happen after upgrading to karmic from jaunty ( modified sources.list)
jaunty don't have this problem.

Chris Coulson (chrisccoulson) wrote :

dino99 - your issue is a separate known issue with Devicekit-Disks

tags: added: regression-potential

Hi Johan,

Thanks for also opening the upstream bug report. Just in case it helps to work with upstream, the Ubuntu kernel team has also provided vanilla mainline kernel builds for testing - https://wiki.ubuntu.com/KernelMainlineBuilds . You may just want to quickly test and confirm the issue against the latest 2.6.30-rc8 mainline build. Thanks.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Andy Whitcroft (apw) wrote :

This seems to be a T23 laptop. Does this model have the option of a hot-swappable drive bay or expansion unit? In some older laptops there can be a bios virtualised floppy device which allows the floppy to be added and removed live without the OS knowing. It is worth checking the BIOS settings to see if any options exist for hot-swappable drives and/or floppies. If so could you report what you find here. Also did this work on a previous Ubuntu release, if so which, in a previous release we had issues with the floppy _not_ being recognised correctly which would have masked this issue.

Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
status: Triaged → In Progress
Johan Kiviniemi (ion) wrote :

Leann,

Thanks, I’ll test with a vanilla kernel.

Andy,

If I change “Legacy Floppy Drives” to disabled in BIOS settings, the floppy driver is not loaded and everything works. That is to be expected. Nevertheless, it would be nice for Linux to automatically realize the drive doesn’t physically exist and refuse to load the module.

No other BIOS settings seem related.

If a user adds a floppy drive to a Thinkpad while it’s running, I find it okay for her to have to modprobe floppy manually if the hardware doesn’t notify the OS about the drive.

What to do when the drive is disconnected, i don’t know.

Chad Waters (chad) wrote :

I actually have a floppy drive and this bug is causing the drive to constantly read (click) at a frequency of about once every 2 seconds. Its got my nomination for most diabolically annoying bug of the karmic development cycle. :)

gvfs-mount -l
Drive(0): TSSTcorp DVD-ROM TS-H353B
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
Drive(1): Optiarc DVD+-RW AD-5170S
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
Drive(2): (null)
  Type: GProxyDrive (GProxyVolumeMonitorGdu)

Changed in fedora:
status: Unknown → Confirmed
Martin Pitt (pitti) wrote :

I delete the fedora bug watch, since that is about bug 384469, not this floppy detection bug.

Changed in fedora:
importance: Unknown → Undecided
status: Confirmed → New
status: New → Invalid
Martin Pitt (pitti) wrote :

Subscribing Scott, since it was his patch which caused this.

My patch just fixed the floppy driver loading, it wouldn't cause this bug - the bug would be elsewhere (ie. in the floppy driver or appropriate kernel subsystem)

Matteo Settenvini (tchernobog) wrote :

I came to this bug from bug #386989. The title of this bug doesn't reflect my problem, but it's probably the same bug anyway. I can confirm this bug on my Thinkpad G40, my kernel log is full of:

   "[ 8319.440050] end_request: I/O error, dev fd0, sector 0"

lines. However, I *do* have a floppy drive on this laptop. Didn't happen before kernel 2.6.30 in karmic.
"sudo rmmod floppy" stops it for a while, so blacklisting the module works.

Some days ago another error showed in dmesg, talking about a problem in "floppy.c". It was at the end of a lot of such errors. Unfortunately, I didn't write that down, because a few minutes later my laptop froze.

camper365 (camper365) wrote :

blacklisting the floppy didn't do anything for me.

I had this problem on a desktop machine. It appeared to have a floppy drive, but it was not plugged in.
After checking the BIOS, I discovered it was set as having a floppy on channel A.

After setting the BIOS to "No Floppy", the problem went away and it is now working just fine.

Hendrick Musche (hmu) wrote :

On my Thinkpad X31 i have this problem as well. Some observations: This is happening since upgrade to Karmic Alpha 2, but booting the 2.6.28 from Jaunty still gives the error. The Lockup during boot seems to be with the initialisation of hardware; has the the mechanism of loading drivers changed?

I don't have floppy drive built in, but the docking station has a hot-swapping port available.

Don Zavitz (dzavitz) wrote :

just want everyone to know that this happens on my desktop aswell, NOT JUST THINKPADS!!!

created /etc/modprobe.d/blacklist-floppy.conf

and added

blacklist floppy

sudo rmmod floppy
sudo update-initramfs -u

and rebooted to a 0:19 bootime, from 1:09

Jamie Strandboge (jdstrand) wrote :

I too am seeing this on an IBM T42 in the daily-live CD installer downloaded on July 7th. It is much longer than a minute in the installer, and there was an error regarding a udev worker exiting with status 0 over and over again. Going into the BIOS and disabling Legacy Floppy support is a workaround for now. This is new to Karmic kernels (ie Jaunty and earlier never had the long startup times).

dougfractal (dougs-b) wrote :

I can also confirm problem, above code fixed it.

echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf && sudo rmmod floppy && sudo update-initramfs -u

Andy Whitcroft (apw) wrote :

Ok we believe that this issue is now visible because udev is now waiting for devices to settle. This means we wait in the initramfs for the longest running device init. The floppy driver is likely doing the right thing overall. We have a floppy controller in most of these cases and therefore the driver should load. Where they are not initialising quickly, or are missing this is likely correct behaviour and not a problem if we are not synchronous. As we are meant to only have modules required to mount root in the initramfs anyhow, floppy seems like it should not be in there. If it was not in the initramfs we would then load it asynchonously in immediatly after mounting root.

I will prepare a versions of initramfs-tools which excludes floppy so we can test this hypothesis.

Andy Whitcroft (apw) wrote :

Ok I have prepared a modified initramfs-tools to prevent the floppy module ending up on there. Could those of you who are seeing these 1 minute delays in boot install this and test boot (please remember to remove any blacklist for this test). Please report your experiences here. The modified initramfs-tools can be found here:

    http://people.canonical.com/~apw//lp384579-karmic/

Changed in linux (Ubuntu):
status: In Progress → Incomplete
dougfractal (dougs-b) wrote :

Fresh install of Karmic alpha 3 with Andy W's deb.
aptitude search ~iinitramfs-tools -F "%20p %35v"
initramfs-tools 0.92bubuntu39~lp384579apw1

tail /var/log/syslog
Jul 24 00:06:30 karmic kernel: [ 118.640120] Buffer I/O error on device fd0, logical block 0
Jul 24 00:06:30 karmic kernel: [ 120.676028] Clocksource tsc unstable (delta = -185297388 ns)
Jul 24 00:06:30 karmic kernel: [ 130.800083] end_request: I/O error, dev fd0, sector 0
Jul 24 00:06:30 karmic kernel: [ 142.968013] end_request: I/O error, dev fd0, sector 0
Jul 24 00:06:30 karmic kernel: [ 155.120045] end_request: I/O error, dev fd0, sector 0
Jul 24 00:06:30 karmic kernel: [ 155.120053] Buffer I/O error on device fd0, logical block 0
Jul 24 00:06:30 karmic kernel: [ 167.280141] end_request: I/O error, dev fd0, sector 0
Jul 24 00:06:30 karmic kernel: [ 167.280152] Buffer I/O error on device fd0, logical block 0
Jul 24 00:06:30 karmic kernel: [ 179.448043] end_request: I/O error, dev fd0, sector 0

No joy

Andy Whitcroft (apw) wrote :

@dougfractal -- can you confirm that the initramfs was rebuilt. Can you paste the output of the command below:

   zcat /boot/initrd.img-<your kernel> | cpio -t | grep floppy

Andy Whitcroft (apw) wrote :

@dougfractal, and the whole of dmesg output from a boot with that initramfs.

dougfractal (dougs-b) wrote :

@Andy Whitcroft

doug@karmic:~/Desktop$ zcat /boot/initrd.img-`uname -r` | cpio -t | grep floppy
41035 blocks

cl333r (cl333r) wrote :

I'm having the same issues with latest updates.
http://ubuntuforums.org/showthread.php?t=1223118&page=2

Andy Whitcroft (apw) on 2009-07-29
Changed in linux (Ubuntu):
status: Incomplete → In Progress
Andy Whitcroft (apw) wrote :

@dougfractal -- thanks for those logs. Noticed something I had missed before now:

    [ 5.145495] Platform driver 'floppy' needs updating - please use dev_pm_ops
    [ 5.145530] Floppy drive(s): fd0 is 1.44M
    [ 5.165752] FDC 0 is a post-1991 82077
    [ 5.201942] EDAC MC: Ver: 2.1.0 Jul 14 2009

We actually appear to have loaded the driver and continued in a reasonable time frame. Some time later we then start to see the errors:

    [ 18.140540] end_request: I/O error, dev fd0, sector 0
    [ 30.304489] end_request: I/O error, dev fd0, sector 0
    [ 30.304493] Buffer I/O error on device fd0, logical block 0
    [ 42.472405] end_request: I/O error, dev fd0, sector 0
    [ 42.472408] Buffer I/O error on device fd0, logical block 0
    [ 54.632477] end_request: I/O error, dev fd0, sector 0
    [ 54.632480] Buffer I/O error on device fd0, logical block 0

This could be related to udev probing of the device. Could you attach the /var/logs/udev file from a boot showing the issue, and also could you report the output of the command below:

    sudo time /lib/udev/devkit-disks-part-id /dev/sda

Thanks.

Changed in linux (Ubuntu):
status: In Progress → Incomplete
Andy Whitcroft (apw) wrote :

Obviously that should be:

    sudo time /lib/udev/devkit-disks-part-id /dev/fd0

mike (ubuntu-holmesfamily) wrote :

Disabling the BIOS floppy controller worked on my old desktop, there never has been a floppy drive and it would appear it never matter before.

@dougfractal, care to provide the info Andy requested? ie attach /var/logs/udev and also the output of sudo time /lib/udev/devkit-disks-part-id /dev/fd0 . Just want to get this resolved as quickly as possible.

@Johan Kiviniemi, since you are the original bug reporter. It would be great to get your feedback as well.

I am seeing this bug on my Omnibook vt6200. This machine has a floppy disk that can be put in place cdrom drive. Floppy drive is not attached to machine when seeing this bug.

dougfractal (dougs-b) wrote :

@Andy Whitcroft

Supplied logs
dmesg
sudo time /lib/udev/devkit-disks-part-id /dev/fd0
/var/log/udev

Andy Whitcroft (apw) wrote :

@dougfractal -- thanks for those. The key information is in the time file you added (reproduced in full below). Note that the overall time taken is 48.67 seconds, and we are seeing two requests and timeouts in association with it. This is an issue with device kit trying to determine what if anything is on the floppy:

  DKD_MEDIA_AVAILABLE=1
  Entering MS-DOS parser (offset=0, size=4096)
  read failed (Input/output error)
  Exiting MS-DOS parser
  Entering Apple parser
  read failed (Input/output error)
  Leaving Apple parser
  No known partition table found
  No partition table found on /dev/fd0: Input/output error
  0.00user 0.00system 0:48.67elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
  32inputs+0outputs (0major+443minor)pagefaults 0swaps

Either we should not be scanning floppies in this way (and its a udev issue) or we are failing to note that there are issues reading the disk (more likely a dev-kit-disks issue).

Dan Taylor (slash) wrote :

I have a Dell Inspiron 4150 and I receive this exact same behavior *only* when I have the removable dvd/cd-rom in the modular bay. There's no floppy drive on the machine and the BIOS hasn't been touched.

Andy Whitcroft (apw) wrote :

It seems that actually the floppy format does not even allow for a partition table so applying the partition checks to the disk makes no sense. This looks to be a flaw in devkit-disks which triggers these checks in 95-devkit-disks.rules, it is likely we should be excluding fd* in the fragment below. Will take this up with devkit upstream.

  # Probe for partition tables; this really should be part of udev
  #

  # skip rules for inappropriate block devices
  KERNEL=="mtd*|nbd*|gnbd*|btibm*", GOTO="probe_parttable_end"

Changed in linux (Ubuntu):
status: Incomplete → In Progress
Andy Whitcroft (apw) wrote :

this appears to be devicekit-disks udev configuration related. There appears to be no kernel component, so closing off the linux task.

Changed in linux (Ubuntu):
status: In Progress → Invalid

I'll take this up with David (devicekit-disks upstream) when he wakes up later today

Colin Watson (cjwatson) on 2009-08-14
Changed in devicekit-disks (Ubuntu):
importance: Undecided → High
amano (jyaku) wrote :

That was a fast fix from David Zeuthen. It took him just 7 minutes after the bug being filed. Big thanks to him.

Steve Beattie (sbeattie) wrote :

I've created a devicekit-disks branch for merging based on the upstream patch Scott James Remnant linked to in comment 46. People interested in testing it out before it gets accepted can grab a package based on it from my personal ppa at https://edge.launchpad.net/~sbeattie/+archive/ppa .

Changed in devicekit-disks (Ubuntu Karmic):
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-disks - 005-0ubuntu7

---------------
devicekit-disks (005-0ubuntu7) karmic; urgency=low

  * debian/patches/git-fix-floppy-detection.patch:
    - stop probing for floppy drives that don't exist (LP: #384579)
  * debian/patches/series:
    - added git-fix-floppy-detection.patch

 -- Steve Beattie <email address hidden> Thu, 20 Aug 2009 21:45:27 -0700

Changed in devicekit-disks (Ubuntu Karmic):
status: In Progress → Fix Released

I am affected too since I dist-upgraded to Lucid Beta 1.
'~$ uname -a; Linux T42 2.6.32-16-generic #25-Ubuntu SMP Tue Mar 9 16:33.52 UTC 2010 i686 GNU/Linux'
I read in #49 "Fix Released". I oppose. This is no fix for me.
Please let me know what test results should I provide to help to get rid of this bug.

Hello Detlef,

There is a simple fix really, the problem with some Thinkpad's is they have
legacy floppy support enabled in the bios-settings, while there is no floppy
in the machine. Just disable this in the bios, and the problem is solved
after that. The boot time will then again be normal.

Best regs,
Chris.

2010/3/24 Detlef Lechner <email address hidden>

> I am affected too since I dist-upgraded to Lucid Beta 1.
> '~$ uname -a; Linux T42 2.6.32-16-generic #25-Ubuntu SMP Tue Mar 9 16:33.52
> UTC 2010 i686 GNU/Linux'
> I read in #49 "Fix Released". I oppose. This is no fix for me.
> Please let me know what test results should I provide to help to get rid of
> this bug.
>
> --
> Linux thinks there’s a floppy drive when there’s not. Probing slows down
> bootup by almost a minute.
> https://bugs.launchpad.net/bugs/384579
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
Only two things in life are infinite: the stupidity of mankind, and the
universe,
and I'm not certain about the second one...
-- Albert Einstein --

@ Chris: Your advice to change my BIOS settings worked all right. -- Thank you very much.

markus haider (markus.haider) wrote :

I installed Lucid Beta 1 and I am also experiencing this bug.

Andrew Cowie (andrew-cowie) wrote :

I installed the April 29th lucid 10.04 release and was affected by this on a Thinkpad T43. The bios fix of disabling legacy floppy drives worked for me. The bug also caused constantly on hard drive i/o light, and constant probing of (non-existent) fd0 after boot - this is fixed with the bios fix.

$ uname -a
Linux mah-laptop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

fd0 probing results in syslog error message: Buffer I/O error on device fd0, logical block 0

gcb (descartavel1) wrote :

Desktop. Asus motherboard. no floppy attached. (will boot soon and try to disable legacy floppy options in bios, if they are enabled). Clean install of ubuntu 10.04

same amount of fd0 io errors in dmesg.

gcb@inutil:~$ sudo rmmod floppy
ERROR: Module floppy is in use

gcb@inutil:~$ mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/gcb/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=gcb)

gcb@inutil:~$ sudo lsof | grep fd0
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/gcb/.gvfs
      Output information may be incomplete.
gnome-ses 1199 gcb 28u unix 0xe3ffd000 0t0 17451 socket
mount 1510 root 3u BLK 2,0 0t1024 2148 /dev/fd0

...Then i waited some time and that mount process weren't there anymore. forgot to see which other process started it :( after the mount was gone, rmmod floppy worked.

Dave Efflandt (efflandt) wrote :

Dell Inspiron 8200 could not suspend/hibernate in 10.04 LTS with latest updates and standard drivers or nvidia(96), with or without nomodeset (would awake after 20 seconds). Finally after installing and testing "uswsusp" package, the console was enlightening:

end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0, logical block 0
Freezing of tasks failed after 20.00 seconds (1 tasks refusing to freeze):
udisks-daemon

It has hot docking drive slot (currently DVD), but BIOS shows floppy drives "Not Installed", and removed floppy from boot order. No other related BIOS settings and no help.

So I commented out fd0 mount in /etc/fstab and blacklisted floppy in /etc/modules.d/blacklist.conf, but floppy module kept showing up on boot, and could not rmmod it (showing used by 1, but nothing else showing it being used).

What I did not know about was "sudo update-initramfs -u". Now floppy module is gone and suspend works. Success.

Changed in linux:
importance: Unknown → Medium
Changed in linux:
status: Confirmed → Won't Fix
Stepan Roucka (rouckas) wrote :

I experienced this bug in Ubuntu 12.10.
Commenting out fd0 in fstab and running
echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf && sudo rmmod floppy && sudo update-initramfs -u
solved the problem

maik stolle (ms090780) wrote :

same bug in 12.10

"echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf && sudo rmmod floppy && sudo update-initramfs -u"

dont work > error: module floppy in use

maik stolle (ms090780) wrote :

sudo vi /etc/modprobe.d/blacklist.conf

solved it

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.