[Bug 464453] New: Disabling automounter during installation does not work
https://bugzilla.novell.com/show_bug.cgi?id=464453 Summary: Disabling automounter during installation does not work Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Installation AssignedTo: dkukawka@novell.com ReportedBy: puzel@novell.com QAContact: jsrain@novell.com CC: jsrain@novell.com Found By: Development Using live installer from openSUSE 11.1 Gnome Live CD, I got an error that swap partition can not be formatted (device or resource busy). A little debugging with Jiri Srain showed that the problem is caused by the automounter which mounted the partition just after it was created (and thus made it busy). We've tried running hal-set-property --udi /org/freedesktop/Hal/devices/computer --key storage.disable_volume_handling --bool false Next we've connected flash disk and it was mounted, so the automounter functionality was not disabled. I'm going to try this with KDE Live CD -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User dkukawka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c1
Danny Kukawka
https://bugzilla.novell.com/show_bug.cgi?id=464453
User dkukawka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c2
Danny Kukawka
https://bugzilla.novell.com/show_bug.cgi?id=464453
User puzel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c3
--- Comment #3 from Petr Uzel
I guess it need to be:
hal-set-property --udi /org/freedesktop/Hal/devices/computer --key storage.disable_volume_handling --bool true
I will retest this.
And if this isn't working, it's a problem of the desktop system since it's only a hint for e.g. GNOME or KDE to stop automounting. It has nothing to do with the mount handling in HAL itself.
This would explain why it happens only in GNOME live CD (as reported) - I will verify this myself ASAP -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User puzel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c4
--- Comment #4 from Petr Uzel
(In reply to comment #1 from Danny Kukawka)
I guess it need to be:
hal-set-property --udi /org/freedesktop/Hal/devices/computer --key storage.disable_volume_handling --bool true
I will retest this.
Confirmed - it does not disable automounter (creating partition with parted triggers mounting) Note: I know next to nothing about hal/automounting, but I was told that the command above is used by the installer to disable automounting - is this true? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User puzel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c5
Petr Uzel
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jpr@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c7
JP Rosevear
https://bugzilla.novell.com/show_bug.cgi?id=464453
User puzel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c8
Petr Uzel
As well, swap should not be automounted at all - was the partition changed from an existing type?
IIRC there were two primary (ntfs & fat) partitions and one extended, but without any logical partitions. The installer tried to create / and swap as a logical partitions. Just after it has created any partition (with parted, which involves informing the kernel about new partition via ioctl), the automounter fired up. Not sure whether the swap partition was created directly with 0x82 type, but I guess it was. I don't have the logs anymore, but I could verify if you need. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c9
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
Cyril Hrubis
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c10
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c11
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c12
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c13
Vincent Untz
yast2-live-installer is run as root; the devices are not in fstab at all (resp. they are written to fstab in chrooted environment, hope that is not a problem).
It shouldn't be an issue, but I don't really know gnome-mount -- I just guess from what I can see from upstream comments.
Since I'm not a hal or GNOME expert (and AFAIK neither is Arvin), could you, please, provide us with a list of commands to disable and reenable the automounter which we can run from bash while the live installer is already running? I can imagine that very same problem can occurre also in other cases than the live installation.
I really think you should not play with gconf and use the hal stuff (either via hal-lock or via a mini app which would be based on hal-lock). I can't really help with the hal part. However, if you want to go the gconf way, here's what to do: gconftool-2 --get /apps/nautilus/preferences/media_automount => this gets the current value of the pref gconftool-2 --set /apps/nautilus/preferences/media_automount --type boolean false => this disables the automounter (and then you can set it back to the old value you saved) Note that is a hack and this is broken in many ways: + the user can reenable the pref manually + you're playing with a user pref and what I wrote here won't exactly restore the pref (ie, it will restore the value, but it will lose the information of whether this is the default value or not). This is probably fine for the live installer, though. Give me 20 minutes to look if I can write a small helper based on hal-lock for you. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c14
--- Comment #14 from Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
Thomas Göttlicher
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c15
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
User tgoettlicher@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c16
Thomas Göttlicher
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c17
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c18
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c19
Vincent Untz
I cannot add the utility to yast2-storage without introducing new dependencies. Add it somewhere where it is always available when hal is installed, e.g. hal itself.
I don't maintain hal. I can only put this small helper in some GNOME package, and I don't think it belongs there, especially since you'd want to use it even when GNOME is not available. So if you need it in hal, Danny would be the person to ask. But I'm not sure what dependencies are an issue: yast2-storage depends on yast2-core which depends on hwinfo which depends on hal. Or is it just the glib/dbus-glib stuff? hal depends on them anyway... I'm going to reassign to you. If you feel it should live in hal, then reassign to Danny. But IMHO, something like this should really be shipped with the tool that used it -- especially since hal already provides hal-lock. Btw, did you check that it works for you? I only did a basic test here -- I mainly put the code to show how easy it's to do this.
After all I cannot understand why a working solution was removed without even informing the maintainer of yast2-storage. After all the solution was added esp. for this usecase, see bug #153241.
Well, if this solution was not upstream (see comment #7), then it's no wonder it disappeared when the code to handle automounting was totally rewritten upstream and moved to another module. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jimomura@pathcom.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c20
Jim Omura
(In reply to comment #18)
I cannot add the utility to yast2-storage without introducing new dependencies. Add it somewhere where it is always available when hal is installed, e.g. hal itself.
I don't maintain hal. I can only put this small helper in some GNOME package, and I don't think it belongs there, especially since you'd want to use it even when GNOME is not available.
. . If KDE does not have this problem (and possibly not QT either for that matter) it would appear that it might be GNOME specific. In fact, since it is not upstream it might be OpenSuSE GNOME specific. Although this whole situation surprises me. I would have expect that this whole area of Auto-mounting would have been fairly standardized by now. If you guys get this solved, see if you can get a test "11.1 GNOME LiveCD" iso put together and I will try to install it on one of my computers. Whether or not you update anything else in the ISO is not that important, though I guess it would be more stable with the latest packages. The point is that there were some other apparent bugs related to partitioning and GRUB installation. It would be good to see if they were partly/wholly byproducts of this one bug. I have already suggested elsewhere that the current 11.1 GNOME LiveCD iso's should be replaced. This is not something that should be put off till 11.2. I hope whomever makes such decisions is considering this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c21
--- Comment #21 from Vincent Untz
If KDE does not have this problem (and possibly not QT either for that matter) it would appear that it might be GNOME specific. In fact, since it is not upstream it might be OpenSuSE GNOME specific. Although this whole situation surprises me. I would have expect that this whole area of Auto-mounting would have been fairly standardized by now.
Other distributions (at least fedora and mandriva, according to the upstream bug I linked) use hal-lock. It is standardized, we just didn't use the upstream solution. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c22
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User dkukawka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c23
Danny Kukawka
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c24
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User dkukawka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c25
Danny Kukawka
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c26
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c27
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c28
Arvin Schnell
From YCP I don't have access to libhal_acquire_global_interface_lock().
Why do I have to hack something in the last minute? Just as well the former solution can be hacked back. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jimomura@pathcom.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c29
--- Comment #29 from Jim Omura
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c30
Vincent Untz
Yes, glib is the culprit. I already get blamed for the dependencies of yast2-storage so I won't add more.
How can glib be an issue if hal is not? vuntz@lyon ~/>rpm -q --requires hal | grep glib dbus-1-glib >= 0.61-1 libdbus-glib-1.so.2 libglib-2.0.so.0 (In reply to comment #28)
Why do I have to hack something in the last minute? Just as well the former solution can be hacked back.
The former solution is not upstream and it will not be accepted upstream. I'm proposing a solution that works as well (if not better because this mechanism is used by more people) and that doesn't require patching all applications that can automatically mount devices. And as far as I can tell, the only reason to not use this solution is a packaging issue. This just sounds wrong, I'm sorry. And I'd really like to avoid putting this in a GNOME-specific package because we certainly want the solution to be valid for non-GNOME stuff. So here's another proposal, to solve it the right way: + to lock: hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run "sh -c 'while true; do sleep 60; done'" + to unlock: kill the previously launched hal-lock No new dependency. How does that sound? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c31
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c32
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
User dkukawka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c33
Danny Kukawka
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c34
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User vuntz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c35
--- Comment #35 from Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=464453
User thoenig@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c36
Timo Hoenig
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c37
--- Comment #37 from Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User thoenig@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c38
--- Comment #38 from Timo Hoenig
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c39
--- Comment #39 from Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User thoenig@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c40
--- Comment #40 from Timo Hoenig
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c41
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User mvidner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c42
--- Comment #42 from Martin Vidner
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c43
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c44
--- Comment #44 from Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User thoenig@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c45
--- Comment #45 from Timo Hoenig
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c46
--- Comment #46 from Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User visnov@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c47
Stanislav Visnovsky
https://bugzilla.novell.com/show_bug.cgi?id=464453
User aschnell@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c48
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c49
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=464453
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=464453#c50
Jiri Srain
participants (1)
-
bugzilla_noreply@novell.com