Bug 120619 - Mounting floppies doesn't work
Summary: Mounting floppies doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: media (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal with 123 votes (vote)
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
: 120452 123885 131346 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-22 22:46 UTC by Ismail Donmez
Modified: 2007-01-12 20:39 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
3.5.5 floppy patch (2.23 KB, patch)
2006-11-16 06:14 UTC, wang baisheng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ismail Donmez 2006-01-22 22:46:05 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.5 
OS:                Linux

How to reproduce:

1. open media:/
2. double click on floppy icon
3. it does mount the floppy ( according to mount ) but never finishes loading
4. press stop and open media:/ again
5. it gives an error about floppy being already mounted [*]
6. Use /media/floppy_0 to access the floppy

Now first bug is what I mentioned here the overall process but on the other hand [*] doesn't make sense why give an error if its already mounted? If its already mounted just don't mount and open the directory.
Comment 1 Ismail Donmez 2006-01-22 22:47:10 UTC
CC'in Emanuele, he and 2 different users able to reproduce the same bug.
Comment 2 Ismail Donmez 2006-01-28 15:13:43 UTC
Before mounting hal says:

4: udi = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'
  storage.policy.desired_mount_point = 'floppy'  (string)
  storage.policy.mount_filesystem = 'auto'  (string)
  storage.policy.should_mount = true  (bool)
  block.storage_device = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'  (string)
  info.capabilities = { 'storage', 'block' } (string list)
  info.category = 'storage'  (string)
  storage.requires_eject = false  (bool)
  storage.hotpluggable = false  (bool)
  storage.removable = true  (bool)
  storage.physical_device = '/org/freedesktop/Hal/devices/platform_floppy_0'  (string)
  storage.drive_type = 'floppy'  (string)
  info.product = 'PC Floppy Drive'  (string)
  info.vendor = ''  (string)
  storage.vendor = 'PC Floppy Drive'  (string)
  storage.model = ''  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = false  (bool)
  storage.no_partitions_hint = true  (bool)
  storage.bus = 'platform'  (string)
  block.is_volume = false  (bool)
  block.minor = 0  (0x0)  (int)
  block.major = 2  (0x2)  (int)
  block.device = '/dev/floppy/0'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  info.parent = '/org/freedesktop/Hal/devices/platform_floppy_0'  (string)
  linux.sysfs_path_device = '/sys/block/fd0'  (string)
  linux.sysfs_path = '/sys/block/fd0'  (string)

After mounting it says :

4: udi = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'
  storage.policy.desired_mount_point = 'floppy'  (string)
  storage.policy.mount_filesystem = 'auto'  (string)
  storage.policy.should_mount = true  (bool)
  block.storage_device = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_floppy_0_storage'  (string)
  info.capabilities = { 'storage', 'block' } (string list)
  info.category = 'storage'  (string)
  storage.requires_eject = false  (bool)
  storage.hotpluggable = false  (bool)
  storage.removable = true  (bool)
  storage.physical_device = '/org/freedesktop/Hal/devices/platform_floppy_0'  (string)
  storage.drive_type = 'floppy'  (string)
  info.product = 'PC Floppy Drive'  (string)
  info.vendor = ''  (string)
  storage.vendor = 'PC Floppy Drive'  (string)
  storage.model = ''  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = false  (bool)
  storage.no_partitions_hint = true  (bool)
  storage.bus = 'platform'  (string)
  block.is_volume = false  (bool)
  block.minor = 0  (0x0)  (int)
  block.major = 2  (0x2)  (int)
  block.device = '/dev/floppy/0'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  info.parent = '/org/freedesktop/Hal/devices/platform_floppy_0'  (string)
  linux.sysfs_path_device = '/sys/block/fd0'  (string)
  linux.sysfs_path = '/sys/block/fd0'  (string)
Comment 3 Ismail Donmez 2006-01-28 15:14:18 UTC
HAL version is 0.5.5.1
Comment 4 Ismail Donmez 2006-01-31 16:19:25 UTC
Ervin, do you need any extra information about this bug?
Comment 5 Ismail Donmez 2006-01-31 16:19:53 UTC
Oh I meant Kevin ;)
Comment 6 Kevin Ottens 2006-01-31 16:28:44 UTC
Well, I'm in need of more time and a floppy disk. =)

Seriously, could you please give me /org/freedesktop/Hal/devices/platform_floppy_0_storage children too? the floppy drive should have at least one having the capability volume, otherwise I hardly see how our HAL backend can detect the mount (the mount state is given by volumes not storage).
Comment 7 Kevin Ottens 2006-02-05 19:18:32 UTC
*** Bug 120452 has been marked as a duplicate of this bug. ***
Comment 8 Sergio Cambra 2006-02-05 19:44:19 UTC
I can confirm this bug too, with KDE 3.5.0 and 3.5.1 from Kubuntu packages
I have HAL 0.5.3
My floppy has udi = /org/freedesktop/Hal/devices/computer_storage and it has no children
Comment 9 Rafael Ávila de Espíndola 2006-02-14 01:28:13 UTC
same problem with debian (kde 3.5.1 and hal 0.5.6). I will recompile the kde packages with hal 0.4.8 and report
Comment 10 Rafael Ávila de Espíndola 2006-02-14 17:32:18 UTC
compiling with 0.4.8 is proving harder then expected!
I have just compiled kdelibs. To do so I had to remove the patches
debian/patches/98_buildprep.diff
debian/patches/27_kdnssd_avahi.diff
debian/patches/01_kdelibs_branch_r506549.diff

and remove the dependencies on avahi

I have more urgent things to do. As soon as possible I will compile kdebase and test
Comment 11 Tommi Tervo 2006-03-19 11:42:05 UTC
*** Bug 123885 has been marked as a duplicate of this bug. ***
Comment 12 Jason Straight 2006-03-24 00:15:29 UTC
What I find odd about this bug is that it's specific to floppies. Both internal standard floppies and my external usb floppy on my laptop which is addressed as /dev/sdb1, while my external mp3 player is recognized as external storage on /dev/sdb1 and it works fine.
Comment 13 Jose Medellin 2006-03-25 23:03:59 UTC
Hi all..

I'm a gentoo user experiencing the exact same problems as expressed here.  I'm not alone in this, btw.  Just check out:

http://forums.gentoo.org/viewtopic-p-3207734.html#3207734

I'm going to say this and I expect that the issue is just marked as UPSTREAM and forgotten, maybe it's a problem in KDE itself.  The thing is that I've found this bug in freedesktop.org:

https://bugs.freedesktop.org/show_bug.cgi?id=6395

which describes I think exactly the problema that is happening.

The proposal is for people from this thread to go to freedesktop.org and post comments with any extra information that might be useful and also so that the peeps at freedesktop.org see the importance and can take a look at it quickly

Thanks a lot!
Comment 14 Ismail Donmez 2006-03-28 11:28:09 UTC
Kevin, 

HAL bug report about this on freedesktop is closed with CLOSED->NOTABUG with this final comment:

------- Additional Comments From david@fubar.dk  2006-03-28 14:31 -------
Hi,

Yes, this used to work in HAL 0.4.x but it was deliberately changed in the 0.5.x
so we don't put child device object only when something was mounted. The
reasoning was that it was inconsistent and caused more trouble...

So.. you need to teach the desktop stack about this - as a data point it works
in gnome-vfs 2.14 / gnome-mount 0.4. 

Btw, it applies to more than floppy drives... also other drives we cannot poll,
e.g. IDE Zip drives. More precisly this happens when

 storage.media_check_enabled = FALSE

Hope this helps. I'm closing this as NOTABUG as it was a deliberate change from
0.4.x. Thanks.
Comment 15 David Anderson 2006-04-07 17:27:48 UTC
Since updating my Fedora Core 4 system with the latest updates, I now get this behaviour on my CD drive as well as my floppy drive.
Comment 16 George 2006-04-13 07:30:47 UTC
One way to get around this is NOT to use media:/ folder.
Instead, create a link to the floppy from right clicking on the desktop->Create new->Link to Device->Floppy device
then right click on the new link, and go to Properties->Device; and select /dev/fd0
i added the folowing line to /etc/fstab:
/dev/fd0    /media/floppy   vfat users,pamconsole,exec,rw,noauto,managed 0 0
the folder /media/floppy must exist, of course.
The floppy manipulation works as expected from the desktop link.
Hope this helps someone.
Comment 17 Juergen Wieczorek 2006-04-14 13:09:02 UTC
I am facing the following floppy mount problems with Fedora Core 5 & KDE 3.5.1 & 3.5.2 (pls. note that FC5 no longer uses fstab.sync but relies on the desktop manager for mounting devices properly on the desktop):

I have set up KDE (ControlCenter) to display mounted & unmounted 3.5"-floppy 
devices on the desktop.
I am as user member of the groups 'disk' and 'floppy'.

Mount point is set to '/media/floppy', option automount is checked, unmounted 
floppy icon appears on desktop.

Upon insert of a floppy disk an _blank_ konquerer window opens at 
'media:/fd0', while the desktop icon is _not_ being updated from umounted to 
mounted icon !

Subsequently, neither right-clicking on the desktop icon gives me the option 
to unmount the floppy again, nor can I do this in the konquerer-filemanager 
in the storage media panel.

I can unmount the floppy savely at the console (and did so), but KDE obviously 
isn't being notified and still displays the disk content under /media/floppy.

As a consequence, new inserts of a floppy disk fill up the /media directory 
with new entries as floppy-1, floppy-2 and so on.

As a workaround I have stopped KDE to display floppy device icons on the 
desktop and inserted a static entry in /etc/fstab for /dev/fd0 and manually 
created a .desktop file for that.

This behaviour is limited only to floppies.
CD-ROM, DVD, USB sticks are mounted properly by KDE.
Comment 18 David Anderson 2006-04-14 13:34:06 UTC
Comment 17 : This looks like a very different bug to the one here - you ought to open a new request to get proper attention to your bug.
Comment 19 Marius Cirsta 2006-04-25 18:34:39 UTC
 I'm also having this bug with Frugalware 0.4 . It has KDE 3.5.1 and HAL 0.5.7 . Is this being worked on ? Because I really hate this bug and if it's not I'll try and look into the code myself although I don't really have any experiece with this kind of stuff and my C/C++ is pretty basic .
Comment 20 George 2006-04-26 09:11:24 UTC
Update:
I tried to reproduce the bug according to the original bug post, 
At step 3 it finishes loading, and indeed it mounts the floppy, according to mtab, but it desn't show the contens, subsequent tries to mount result in multiple /media/floppy_x folders, and multiple /dev/fd0 mounts:
/dev/fd0 on /media/floppy-9 type vfat (rw,noexec,nosuid,nodev,sync,uid=0,utf8,shortname=lower)
/dev/fd0 on /media/floppy-10 type vfat (rw,noexec,nosuid,nodev,sync,uid=0,utf8,shortname=lower)
/dev/fd0 on /media/floppy-11 type vfat (rw,noexec,nosuid,nodev,sync,uid=0,utf8,shortname=lower)
/dev/fd0 on /media/floppy-12 type vfat (rw,noexec,nosuid,nodev,sync,uid=0,utf8,shortname=lower)

Accesing the floppy contens from the media:/ folder is impossible.
The floppy contens is being mounted on all the /media/floppy_x folder shown by mtab. but media:/ seems unaware of the place where the floppy is mounted.
(I wonder if media:/ doesn't want to display /media/floppy_label but floppy is mounted in another place . . .)

Floppy manipulation works as expected with a .desktop file and a fstab entry. The .desktop file is being updated on the floppy status, while the icon from media:/floppy always remains unaware of floppy mount status.

KDE: 3.5.2-0.2 Fedora5 rpm's
HAL package version: 0.5.7
Comment 21 Bruno Gonçalves 2006-05-23 23:07:22 UTC
Bug forever?
Comment 22 Fabio Erculiani 2006-05-30 17:30:08 UTC
I can confirm that stupid bug.
And I lovely hate system:/ buggy kio-slave !!!!!!!!!!
Comment 23 Kevin Ottens 2006-06-12 12:31:56 UTC
SVN commit 550578 by ervin:

Merge coolo's branch, it contains quite some fixes and interesting 
features. It'll be available in KDE 3.5.4, couldn't be committed before,
but thanks to the partial feature unfreeze...

FEATURE:
BUG: 50185
BUG: 105482
BUG: 108823
BUG: 114854
BUG: 120619
BUG: 121833
BUG: 127788
CCMAIL: coolo@kde.org


 M  +3 -2      Makefile.am  
 M  +7 -0      configure.in.in  
 M  +2 -2      kcmodule/managermodule.cpp  
 M  +4 -3      kcmodule/notifiermodule.cpp  
 M  +1 -1      kfile-plugin/kfile_media.desktop  
 M  +7 -2      kfile-plugin/kfilemediaplugin.cpp  
 M  +4 -0      libmediacommon/medium.cpp  
 M  +20 -1     libmediacommon/medium.h  
 M  +14 -1     mediaimpl.cpp  
 M  +643 -41   mediamanager/halbackend.cpp   [POSSIBLY UNSAFE: popen]
 M  +20 -0     mediamanager/halbackend.h  
 M  +72 -9     mediamanager/mediamanager.cpp  
 M  +8 -0      mediamanager/mediamanager.h  
 M  +6 -3      medianotifier/medianotifier.cpp  
 M  +1 -1      mounthelper/Makefile.am  
 M  +32 -19    mounthelper/kio_media_mounthelper.cpp  
 AM            propsdlgplugin (directory)   branches/work/coolos_media/propsdlgplugin#549689
Comment 24 Fabio Erculiani 2006-06-12 14:27:54 UTC
Is it possible to have a patch that applies to KDE 3.5.3 that contains these fixes without fighting with svn?

thanks a lot!
Comment 25 Fabio Erculiani 2006-06-15 09:11:23 UTC
I've applied that changes and now when I try to create a file on the floppy I get: Malformed URL . (and I can only press OK). Do I need to add anything else to the sources to get that working?
Comment 26 Fabio Erculiani 2006-06-15 19:10:01 UTC
Well... the floppy get mounted but on media:/ it is shown as unmounted even if cat /etc/mtab reports that it is.

I want to reopen this bug since it's not completely fixed.
Comment 27 Ismail Donmez 2006-06-15 19:27:45 UTC
With the latest 3.5 SVN I can't even mount a DVD, could be a HAL-Dbus problem I guess. Any tips?
Comment 28 Kevin Ottens 2006-07-25 15:10:56 UTC
*** Bug 131346 has been marked as a duplicate of this bug. ***
Comment 29 Kevin Ottens 2006-07-25 15:12:56 UTC
For #27:
Check that the hal-system-storage-* scripts got installed correctly (generally in /usr/share/hal/scripts) and that everything is ok in the hal dbus security policy (generally in /etc/dbus/system.d/hal.conf).
Comment 30 Donatas Glodenis 2006-08-07 09:00:11 UTC
Upgraded to KDE 3.5.4, Kubuntu Dapper packages. The problem is STILL THERE. Anyone else on another distro could confirm this? If so, I will reopen the bug.
Comment 31 Fabio Erculiani 2006-08-07 09:04:50 UTC
I said that !
Comment 32 Kevin Ottens 2006-08-07 09:09:33 UTC
Please check as on #27. If the policy settings are wrong (IIRC was the case on Gentoo for instance) or the hal-system-storage-* scripts missing (like on Kubuntu) that's a packaging issue in the depends. You'd probably bug your distro first.
Comment 33 Logan Rathbone 2006-10-21 21:29:20 UTC
From the HAL mailing list:
"There is no feasble way to probe for media on standard PC floppy drive, so HAL 
adds mount methods to storage device itself, not volumes. Your volume manager 
should present you with a representation of unmounted floppy and let you 
manually mount and unmount it. This is the same way other OS work too."

KDE's media ioslave does not seem to be doing this with the HAL backend atm.  IMHO it should just look for "/org/freedesktop/Hal/devices/platform_floppy_*" and create icons for them that can be manually unmounted and unmounted, like in fstab mode.
Comment 34 wang baisheng 2006-11-16 06:14:06 UTC
Created attachment 18579 [details]
3.5.5 floppy patch
Comment 35 Ismail Donmez 2006-12-09 19:27:07 UTC
The bug still exists in KDE 3.5 branch and patch from comment #34 fixes the issue. I am reopening the bug.
Comment 36 Fabio Erculiani 2006-12-09 22:33:14 UTC
yes, #34 works for me too
Comment 37 Modestas Vainius 2006-12-11 15:12:07 UTC
Yes, I've verified, comment#34 resolves the problem with HAL managed floppies (which are not in fstab) and causes no regressions. Thank you Wang.
Comment 38 Fabio Erculiani 2006-12-11 15:28:23 UTC
any hope to have this in 3.5.6 ?
Comment 39 Marius Cirsta 2006-12-11 15:44:48 UTC
 I'm not sure about it but maybe after the 16th of December: http://developer.kde.org/development-versions/kde-3.5-release-plan.html
 
Comment 40 Ismail Donmez 2006-12-11 20:03:03 UTC
Patch needs Kevin's approval.
Comment 41 Ismail Donmez 2006-12-21 21:26:58 UTC
SVN commit 615516 by cartman:

Fix mounting of floppies, patch by Wang Baisheng, great thanks. Tested by me & other users. Approved by Kevin.
BUG:FIXED:120619
Comment 42 Fabio Erculiani 2006-12-22 09:04:25 UTC
I love you all! :-) yummy!
Comment 43 Olaf Scheel 2007-01-11 22:14:26 UTC
Since I´m new to linux, I don´t know how to use the Patch. Your help would be appreciated. 

Olaf

Comment 44 David Anderson 2007-01-12 20:39:41 UTC
Olaf: It'll be in KDE 3.5.6, which your vendor will probably provide an update for using whatever mechanism they provide.