WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Skip floppy detection at boot?  (Read 13011 times)

Offline doixanh

  • Newbie
  • *
  • Posts: 2
Skip floppy detection at boot?
« on: July 13, 2010, 09:16:55 AM »
My laptop doesn't have any floppy drives, but it still takes the kernel to detect it during start up
This is my dmesg :
Quote
...
Real Time Clock Driver v1.12b
Non-volatile memory driver v1.3
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Floppy drive(s): fd0 is 1.44M
TC kernel stops loading here for around 3-4 secs, and then
Quote
floppy0: no floppy controllers found
brd: module loaded
input: Macintosh mouse button emulation as /devices/virtual/input/input3
Uniform Multi-Platform E-IDE driver
piix 0000:00:1f.1: IDE controller (0x8086:0x2850 rev 0x02)
....

I don't use the floppy drive, so is there anyway to prevent the kernel from detecting it at boot time?

Thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14794
Re: Skip floppy detection at boot?
« Reply #1 on: July 13, 2010, 09:23:43 AM »
Is there a bios setting about legacy emulation of floppy drives you could disable maybe?

Offline doixanh

  • Newbie
  • *
  • Posts: 2
Re: Skip floppy detection at boot?
« Reply #2 on: July 15, 2010, 07:49:54 AM »
There is no "floppy" related setting in my bios :-( Is there any other chance I could disable TC from detecting it ?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Skip floppy detection at boot?
« Reply #3 on: July 18, 2010, 04:33:59 PM »
There might be a linux kernel parameter, otherwise you could recompile the kernel without it (seems to be built in).

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jerramy

  • Jr. Member
  • **
  • Posts: 76
Re: Skip floppy detection at boot?
« Reply #5 on: January 25, 2011, 01:27:10 AM »
I'm having the same issue.  I'm losing 3 seconds during boot (out maybe 12 seconds total, a major chunk!) due to the check for a non-existant floppy drive.

The referenced link indicates I should modify /etc/modprobe.conf .  Can I add this file to my /.filetool.lst file, or can I put it in a .tcz, or does it need to go into microcore.gz?

Offline jerramy

  • Jr. Member
  • **
  • Posts: 76
Re: Skip floppy detection at boot?
« Reply #6 on: January 25, 2011, 01:52:59 AM »
I tried adding "alias floppy off" to my modprobe.conf file, and then adding that to .filetool.lst, but that didn't work.  I also remastered microcore.gz following the steps on the Wiki (though I skipped the depmod step), adding that line to the modprobe.conf file.  That also didn't work.

Suggestions anyone?

I also tried "floppy.allowed_drive_mask=0" in my kernel parameters.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Skip floppy detection at boot?
« Reply #7 on: January 25, 2011, 04:49:42 AM »
There is no kernel parameter to disable the floppy drive. The driver is compiled into
the kernel. I don't know if this would work but you could try lying to the kernel. Go to
www.mjmwired.net/kernel/, switch to the blockdev directory, and read the floppy.txt file.
Check out the "floppy=<drive>,<type>,cmos" parameter. Maybe the kernel will take
your word for it if you tell it you have a certain type of floppy and skip the probe for it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Skip floppy detection at boot?
« Reply #8 on: January 25, 2011, 11:00:27 AM »
I'm having the same issue.  I'm losing 3 seconds during boot (out maybe 12 seconds total, a major chunk!) due to the check for a non-existant floppy drive.

First of all your claim of "losing 3 seconds" is not convincing - at least not to me - without any comparative reference.

It has been clearly stated in an earlier post that recompiling the kernel would be a systematical approach to remove hardware support.

But say as a working hypothesis it would be established that there would be a difference in boot time of 3 seconds, of what practical value could that be? How much could the possible expectable accumulated (from all future boots) gain be compared to the expectable loss of going through length to achieve it?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jerramy

  • Jr. Member
  • **
  • Posts: 76
Re: Skip floppy detection at boot?
« Reply #9 on: January 25, 2011, 11:25:16 AM »
Oh freaking heck, it's just a feel-good "Look how fast my system boots!" measure.  It's not going to end world hunger or prevent financial collapse.  It just reduces the amount of time I spend staring at a (mostly) black screen with a blinking cursor waiting for something to happen.

As to the 3 seconds, using kernel parameters "syslog printk.time=1", I see in dmesg:
[  0.762322] Floppy drive(s): fd0 is 1.44M
[  3.783424] No floppy controller found

It's very real.  On another machine that actually has a floppy controller, it passes through that step in about 0.01 second.  If I use the kernel parameter "floppy=debug", I see that it's trying to lock fd0, which it times out on in 3 seconds  (sorry, I don't have the messages withe me, it's on my home computer).

I'm sure that recompiling the kernel would solve it.  I was just hoping to avoid that for now, though I may get to it soon.

As to the lost hours spent trying to get rid of three seconds of boot time, you're right.  Logic would indicate I should just ignore it and move on with life.  But then if I were logical, I would realize that it's way easier to just use windows like everyone else in the world, instead of trying to learn how to solve this massive puzzle called Linux.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Skip floppy detection at boot?
« Reply #10 on: January 25, 2011, 12:25:05 PM »
Yes, I have received the memo. Everyone do check your bioses though, there is often a setting "disable floppy" "no floppy" etc.
The only barriers that can stop you are the ones you create yourself.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Skip floppy detection at boot?
« Reply #11 on: January 25, 2011, 01:00:03 PM »
I was able to reproduce your results. Adding the "floppy=0,irq" boot parameter will eliminate the delay. You cannot disable the driver, but you can make it fail by giving it bad data:

[   0.000000] floppy0: irq=0
[   3.150974] Floppy drive(s): fd0 is 1.44M
[   3.150979] floppy0: Unable to grab IRQ0 for the floppy driver

Quote
there is often a setting "disable floppy" "no floppy" etc.

Yes, but on my system (choices: off, usb, internal, read-only) setting it to off does not affect the delay.

Quote
I also tried "floppy.allowed_drive_mask=0" in my kernel parameters.

The proper syntax is "floppy=0,allowed_drive_mask" but it does not eliminate the delay.

Quote
This may help:
http://www.cyberciti.biz/tips/blade-server-disable-floppy-driver-module.html

I tried blacklist=floppy, but that didn't seem to have any affect.
« Last Edit: January 25, 2011, 01:18:56 PM by danielibarnes »

Offline JohnJS

  • Jr. Member
  • **
  • Posts: 62
Re: Skip floppy detection at boot?
« Reply #12 on: January 25, 2011, 01:59:06 PM »
In 3.4.1 roberts added a fix to avoid searching for non-existent floppy.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Skip floppy detection at boot?
« Reply #13 on: January 25, 2011, 02:32:20 PM »
In 3.4.1 roberts added a fix to avoid searching for non-existent floppy.

Changelog states "skip floppy label detection"   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jerramy

  • Jr. Member
  • **
  • Posts: 76
Re: Skip floppy detection at boot?
« Reply #14 on: January 25, 2011, 02:52:12 PM »
I'm using 3.4.1, so I think that change doesn't skip loading the floppy module.
I also tried blacklist=floppy, with no effect.
I don't have any parameter in my BIOS regarding floppy drives. 
I'll try floppy=0,irq tonight when I get home.  If that skips the delay as it did for you, that'll be perfect.