LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-09-2009, 05:33 PM   #1
xenios
LQ Newbie
 
Registered: Dec 2008
Distribution: Devuan
Posts: 23

Rep: Reputation: 1
QTParted, fd0 and udev


The problem: QTParted takes almost five minutes to load because its looking for a floppy drive which isn't there. There's no actual drive. Opening QTParted through the terminal, I get the message, "Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0 has been opened read-only." after a minute. Several minutes later the app finally opens.

I renamed /dev/fd0 to /dev/fd0.old and QTParted loaded quickly, normally. After booting up this morning, I learned makedev auto-creates the fd0 device at boot time.

Starting QTParted with /dev/fd0, /var/log/qtparted.log has 207 lines. (will post if needed)
Starting QTParted with /dev/fd0.old, /var/log/qtparted.log has 8 lines.

Two work-arounds which didn't work: commented out the /dev/fd0 line in /etc/fstab; added 'blacklist floppy' to /etc/modprobe.d/blacklist. The /dev/fd0 still shows up.

Learned I needed to write a rule for udev and found info/examples here: http://reactivated.net/writing_udev_rules.html. I created the file "10-local.rules" in /etc/udev/rules.d/ with this line:
Quote:
KERNEL=="fd0", SUBSYSTEM=="block", OPTIONS+="ignore_device", OPTIONS+="last_rule"
Didn't work so I tried a different line:
Quote:
KERNELS=="floppy.0", SUBSYSTEMS=="platform", OPTIONS+="ignore_device", OPTIONS+="last_rule"
That didn't work either. I got the kernel and subsystem info here:
Quote:
# udevinfo -a -p $(udevinfo -q path -n /dev/fd0)

Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/block/fd0':
KERNEL=="fd0"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="1"
ATTR{removable}=="1"
ATTR{size}=="8"
ATTR{capability}=="11"
ATTR{stat}==" 0 0 0 0 0 0 0 0 0 0 0"

looking at parent device '/devices/platform/floppy.0':
KERNELS=="floppy.0"
SUBSYSTEMS=="platform"
DRIVERS==""
ATTRS{modalias}=="platform:floppy"
ATTRS{cmos}=="4"

looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""
Don't know where I went wrong and I'd sure appreciate any suggestions. The system is Lenny with KDE. To be clear about what I'm after... I want to prevent the floppy device from being created in /dev at boot time.

Thanks.
 
Old 02-09-2009, 06:35 PM   #2
TurboMAC
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
I applied a simple solution some time ago. It wasn't the final solution, but it worked very good.

Code:
rmmod floppy
Obviously, as root. Try it.

Turbo
 
Old 02-09-2009, 07:30 PM   #3
xenios
LQ Newbie
 
Registered: Dec 2008
Distribution: Devuan
Posts: 23

Original Poster
Rep: Reputation: 1
Thanks for the suggestion but /dev/fd0 is still there after reboot.
 
Old 02-09-2009, 08:30 PM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Just a thought: do you have a floppy set in your BIOS?
I changed mine to look for an fd (machine doesn't have one) and got the same behavior from QTParted. Of course I got the no floppy drive warning from the BIOS. QTParted pops right up with no floppy set.
 
Old 02-09-2009, 10:57 PM   #5
xenios
LQ Newbie
 
Registered: Dec 2008
Distribution: Devuan
Posts: 23

Original Poster
Rep: Reputation: 1
Quote:
Just a thought: do you have a floppy set in your BIOS?
Good thought... no more /dev/fd0. Thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
current users - udev-128 - don't forget rc.udev.new! tobyl Slackware 3 10-08-2008 03:28 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
I have overwritten /dev/fd0! How do I recreate /dev/fd0 to access my floppy? drscott1 Linux - Newbie 2 02-19-2004 12:37 PM
How-to Q...concerning fd0 cbjhawks Linux - General 1 11-28-2003 05:38 PM
fd0 figadiablo Linux - General 2 09-20-2002 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration