Automounting experiments - Debian

This is a discussion on Automounting experiments - Debian ; Hi all, There's been a lot of discussion on this list about automounting of removable devices. I thought this might be interesting: A while back I discovered pmount, and along with hal and udev on a 2.6.11 kernel, it worked ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Automounting experiments

  1. Automounting experiments


    Hi all,

    There's been a lot of discussion on this list about automounting of removable
    devices. I thought this might be interesting:

    A while back I discovered pmount, and along with hal and udev on a 2.6.11
    kernel, it worked as expected: plug in, icon appears, already mounted, no
    fstab entry required. (This is on KDE 3.3.2)

    Then I upgraded udev and hal, and suddenly pmount needed to be called
    manually.

    I emailed Martin Pitt, the author of pmount, and he explained how it is
    supposed to work:

    >...hotplug invokes hal, hal adds the new device to the db and sends out
    >notifications, gnome-volume-manager picks it up and calls
    >pmount-hal to actually mount the device....
    >[...]
    >However, g-v-m is certainly not the intended solution for KDE...


    Which raised the question, how was it working in KDE without g-v-m, and why
    did it stop on upgrade of hal and udev? And which KDE part is supposed to
    listen to HAL events and call pmount-hal?

    Anyway, I installed gnome-volume-manager, added it to KDE Autostart and it ran
    in the background (its behaviour can be configured by running
    gnome-volume-properties), automounting nicely.

    On a recent upgrade to etch, I tried uninstalling g-v-m, and now found that
    the automounting was again working without it.

    Next upgrade of hal and udev, it stopped again; installed g-v-m, it worked,
    uninstalled it again, it kept working...I think you're beginning to see the
    pattern.

    It seems that installing g-v-m (without necessarily keeping it) does something
    to the system to enable hal to talk to pmount, and that upgrading certain
    programs overwrites those changes.

    If someone could figure out what those changes were, and how to make them
    (optionally) permanent, KDE's device automounting would be improved.

    Any thoughts?

    John O'Hagan


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: Automounting experiments

    John O'Hagan schrieb:

    >...
    >Then I upgraded udev and hal, and suddenly pmount needed to be called
    >manually.
    >...
    >Which raised the question, how was it working in KDE without g-v-m,...
    >If someone could figure out what those changes were, and how to make them
    >(optionally) permanent, KDE's device automounting would be improved.
    >
    >Any thoughts?
    >
    >

    I think USB mounting is one of the greatest quagmires Linux has to
    offer; I don't know how much of this is due to - or on the other hand
    corrigible by - KDE. The mounting of USB-devices seems to involve too
    many competing systems and I havn't found a document which describes
    which methods are compatible and which are obsolete. E.g. I just read in
    LinuxUser that with hal, hotplug is no longer required. Yet Kubuntu, the
    only distribution I have tried which really works regarding with USB
    semi-automounting, still has hotplug.

    hotplug, automount, pmount, udev, hal and many more: this is a real mess
    only comprehensible to people who live and breathe Linux. Users who
    simply want to read and write their data are put off. I have spent hours
    trying to sort these out and many kind people on this list have given
    useful advice. I had to install a new kernel to even use pmount, which
    killed my sound and I havn't been able to get this back even with the
    help of experts on the debian-kernel list and have gone back to my old
    kernel.

    There seem to be (say) three generations of USB mounting systems:

    1) The good old way: USB partitions showed up in /proc somewhere, e.g.
    /proc/partitions and one had to write an entry line in /etc/fstab and
    then mount manually as root or create a desktop icon which mounts and
    opens the device in konqueror. Problem: the partition labels change with
    different devices, so you need to either do a bit of detective work
    occasionally or maintain a whole zoo of /etc/fstab entries. (Completely
    manual mounting without going through /etc/fstab often doesn't work
    because often the file system type is unknown. In this case the only
    thing I have found which will even find the partition is QTparted, a
    super partitioning tool which is unfortunately incomplete and buggy and
    no longer maintained or even part of Debian, as far as I can tell.)

    2) The semiautomatic way: detective work as above in 1), then use pmount
    /dev/sd. Device will show up in /media/sd and even on the
    desktop if you have "show devices" activated in KDE. Problem: needs a
    modern kernel.

    3) The modern way: device icon appears automatically (unmounted) on
    desktop. Clicking mounts it in Konqueror. Right-clicking allows safe
    removal. Problem: requires modern kernel and lots of other things. Only
    few distributions (e.g. Kunbuntu) seem to have gotten this right,
    certainly not Sarge.

    I note that even 3) isn't true automounting, so maybe there is a 4).

    My personal solution is to forget about USB-mounting in my Debian system
    and to use a Kubuntu Live-CD whenever I need to use USB.

    Theo Schmidt


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Re: Automounting experiments

    On Monday 26 September 2005 08:07, Theo Schmidt wrote:
    > John O'Hagan schrieb:


    > There seem to be (say) three generations of USB mounting systems:
    >
    > 1) The good old way: USB partitions showed up in /proc somewhere, e.g.
    > /proc/partitions and one had to write an entry line in /etc/fstab and
    > then mount manually as root or create a desktop icon which mounts and
    > opens the device in konqueror. Problem: the partition labels change with
    > different devices, so you need to either do a bit of detective work
    > occasionally or maintain a whole zoo of /etc/fstab entries. (Completely
    > manual mounting without going through /etc/fstab often doesn't work
    > because often the file system type is unknown. In this case the only
    > thing I have found which will even find the partition is QTparted, a
    > super partitioning tool which is unfortunately incomplete and buggy and
    > no longer maintained or even part of Debian, as far as I can tell.)


    If you want to have specific devices shown as specific nodes in /dev, you can
    use hotplug and define some rules. And no, afaik, hotplug is _not_ obsolete.

    > 2) The semiautomatic way: detective work as above in 1), then use pmount
    > /dev/sd. Device will show up in /media/sd and even on the
    > desktop if you have "show devices" activated in KDE. Problem: needs a
    > modern kernel.

    Correct, but to get new features (and unfortunately auto-mounting of
    usb-devices is relatively new to most linux-distributions, including debian)
    you need to use new software. In that case an up2date kernel. (Although even
    2.6.8 from Sarge would suffice)

    > 3) The modern way: device icon appears automatically (unmounted) on
    > desktop. Clicking mounts it in Konqueror. Right-clicking allows safe
    > removal. Problem: requires modern kernel and lots of other things. Only
    > few distributions (e.g. Kunbuntu) seem to have gotten this right,
    > certainly not Sarge.

    You're right. KDE starting from 3.4.0 supports this, but it didn't make it
    into sarge. Although it's just your 2) + a nice GUI to handle it. It has some
    points i dislike:
    a) no automounting, you still need to mount the device. Fine if you're using
    only kde-apps, but annoying for those who want to store a file from
    OpenOffice, Mozilla or whatever on the USB-Device. They've to open the
    directory in Konqueror, first.

    b) mountpoints are related to the devicenode, not to the label of the
    partition (like gnome-volume-manager and pmount-hal do)



    > I note that even 3) isn't true automounting, so maybe there is a 4).

    Yes there is.

    The IMHO optimal solution is to combine hal (for detecting new attached
    devices), pmount (for auto-mounting without being root) and a nice
    userspace-programm like GVM which starts the right program for the right
    medium (xine for VCD, Konqueror for Data-CD, USB-Stick, USB- or
    Firewire-Harddrive). Right now, gnome-volume-manager does this job quite
    nice. Unfortunately, g-v-m has nautilus hardcoded as filemanager, which makes
    it a suboptimal choice for KDE-Users.

    I wrote my own scripts (python) which do at least the auto-mounting thing
    using pmount-hal. If you're interested, inform me. Although you should know
    that i don't continue development of them nor are they really finished. But
    they "just work".


    Regards
    Roman
    --
    If only you and dead people can read hex, how many people can read hex?

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)

    iD8DBQBDN7GmkwLEKBhi12ARAlliAJ9qJIlzhO1xgJgxBDSBP4 cxNS0jpwCbB5fT
    eBHwnTZkCzGUgfHYBn523vo=
    =/umy
    -----END PGP SIGNATURE-----


  4. Re: Automounting experiments

    Could you post somewhere that scripts?
    Thanks

    Roman Kreisel ha scritto:

    >On Monday 26 September 2005 08:07, Theo Schmidt wrote:
    >
    >
    >>John O'Hagan schrieb:
    >>
    >>

    >
    >
    >
    >>There seem to be (say) three generations of USB mounting systems:
    >>
    >>1) The good old way: USB partitions showed up in /proc somewhere, e.g.
    >>/proc/partitions and one had to write an entry line in /etc/fstab and
    >>then mount manually as root or create a desktop icon which mounts and
    >>opens the device in konqueror. Problem: the partition labels change with
    >>different devices, so you need to either do a bit of detective work
    >>occasionally or maintain a whole zoo of /etc/fstab entries. (Completely
    >>manual mounting without going through /etc/fstab often doesn't work
    >>because often the file system type is unknown. In this case the only
    >>thing I have found which will even find the partition is QTparted, a
    >>super partitioning tool which is unfortunately incomplete and buggy and
    >>no longer maintained or even part of Debian, as far as I can tell.)
    >>
    >>

    >
    >If you want to have specific devices shown as specific nodes in /dev, you can
    >use hotplug and define some rules. And no, afaik, hotplug is _not_ obsolete.
    >
    >
    >
    >>2) The semiautomatic way: detective work as above in 1), then use pmount
    >>/dev/sd. Device will show up in /media/sd and even on the
    >>desktop if you have "show devices" activated in KDE. Problem: needs a
    >>modern kernel.
    >>
    >>

    >Correct, but to get new features (and unfortunately auto-mounting of
    >usb-devices is relatively new to most linux-distributions, including debian)
    >you need to use new software. In that case an up2date kernel. (Although even
    >2.6.8 from Sarge would suffice)
    >
    >
    >
    >>3) The modern way: device icon appears automatically (unmounted) on
    >>desktop. Clicking mounts it in Konqueror. Right-clicking allows safe
    >>removal. Problem: requires modern kernel and lots of other things. Only
    >>few distributions (e.g. Kunbuntu) seem to have gotten this right,
    >>certainly not Sarge.
    >>
    >>

    >You're right. KDE starting from 3.4.0 supports this, but it didn't make it
    >into sarge. Although it's just your 2) + a nice GUI to handle it. It has some
    >points i dislike:
    >a) no automounting, you still need to mount the device. Fine if you're using
    >only kde-apps, but annoying for those who want to store a file from
    >OpenOffice, Mozilla or whatever on the USB-Device. They've to open the
    >directory in Konqueror, first.
    >
    >b) mountpoints are related to the devicenode, not to the label of the
    >partition (like gnome-volume-manager and pmount-hal do)
    >
    >
    >
    >
    >
    >>I note that even 3) isn't true automounting, so maybe there is a 4).
    >>
    >>

    >Yes there is.
    >
    >The IMHO optimal solution is to combine hal (for detecting new attached
    >devices), pmount (for auto-mounting without being root) and a nice
    >userspace-programm like GVM which starts the right program for the right
    >medium (xine for VCD, Konqueror for Data-CD, USB-Stick, USB- or
    >Firewire-Harddrive). Right now, gnome-volume-manager does this job quite
    >nice. Unfortunately, g-v-m has nautilus hardcoded as filemanager, which makes
    >it a suboptimal choice for KDE-Users.
    >
    >I wrote my own scripts (python) which do at least the auto-mounting thing
    >using pmount-hal. If you're interested, inform me. Although you should know
    >that i don't continue development of them nor are they really finished. But
    >they "just work".
    >
    >
    >Regards
    >Roman
    >
    >




  5. Re: Automounting experiments

    On Monday 26 September 2005 10:43, EmIscA wrote:
    > Could you post somewhere that scripts?
    > Thanks


    Here you are:
    http://www2.fht-esslingen.de/~rokrit...mount-scripts/

    Short Installation-Howto:
    - Copy those scripts to a location in your $PATH, preferably /usr/local/bin
    and make them executable
    - Run the mediahandling.py (as non-root, inside X11), read the error-message
    (which will likely appear) and solve the dependencies. You'll have to install
    several python-*-packages. Additionaly you need HAL and pmount installed and
    working.
    - Once everything works and mediahandly.py doesn't stop with an error, insert
    media and watch it beeing mounted. Remember, that it does NOT handle
    umounting! Therefore you might want to use usbumount.py
    - Fine-tuning:
    - Put a link to mediahandling.py in your $KDEDIR/Autostart
    - edit $HOME/.injectrc

    Regards
    Roman

    --
    Why do geeks get Halloween and Christmas confused?
    Because 31 oct == 25 dec
    -- seen on the net

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)

    iD8DBQBDN8qLkwLEKBhi12ARAl+lAJ0YxzlQIJBS4JZJUK3U6O DHCstTYwCbB1GI
    YwcSN0/yua19puMcNRv29f0=
    =9SQU
    -----END PGP SIGNATURE-----


  6. Re: Automounting experiments

    On Monday 26 September 2005 10:30, Roman Kreisel wrote:
    > And no, afaik, hotplug is _not_ obsolete.


    hotplug is obsolete, udev is now the good way to do(and not hal):

    >Thanks to the replacement of hotplug with udev functions,
    >all machines now boot faster.


    udev, in mandriva(2006), now do hotplug job.

    CÚdric

  7. Re: Automounting experiments

    On Monday 26 September 2005 19:11, Bellegarde Cedric wrote:
    > On Monday 26 September 2005 10:30, Roman Kreisel wrote:
    > > And no, afaik, hotplug is _not_ obsolete.

    >
    > hotplug is obsolete, udev is now the good way to do(and not hal):


    http://packages.debian.org/unstable/admin/udev :

    ".... It responds to /sbin/hotplug device events ..."

    So apparently hotplug is not obsolete (yet) ?

    Serge


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  8. Re: Automounting experiments

    Bellegarde Cedric wrote:

    > On Monday 26 September 2005 10:30, Roman Kreisel wrote:
    >> And no, afaik, hotplug is _not_ obsolete.

    >
    > hotplug is obsolete, udev is now the good way to do(and not hal):
    >
    >>Thanks to the replacement of hotplug with udev functions,
    >>all machines now boot faster.

    >
    > udev, in mandriva(2006), now do hotplug job.
    >

    I can't see how. Hotplug inserts the modules required by a device - I see
    nothing in udev that's going to do that. hal is a _very_ good way to
    enable automounting (amongst other things) - it doesn't mount anything, but
    then neither does udev.
    --
    derek


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  9. Re: Automounting experiments

    Derek Broughton schrieb:
    > Bellegarde Cedric wrote:
    >> Roman Kreisel wrote:

    ....
    >>>And no, afaik, hotplug is _not_ obsolete.

    ....
    >>hotplug is obsolete, udev is now the good way to do (and not hal):


    Oh great, even the experts disagree... I gleaned my clip on "obsolete
    hotplug" from an article about SuSE 10.0 in LinuxUser (German magazine).

    ....
    >>udev, in mandriva(2006), now do hotplug job.
    >>

    >
    > I can't see how. Hotplug inserts the modules required by a device - I see
    > nothing in udev that's going to do that. hal is a _very_ good way to
    > enable automounting (amongst other things) - it doesn't mount anything, but
    > then neither does udev.


    hal seems to depend on udev, but I still havn't got a clue what all
    these components *really* do.

    Theo Schmidt


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  10. Re: Automounting experiments

    On Monday 26 September 2005 19:11, Bellegarde Cedric wrote:
    > On Monday 26 September 2005 10:30, Roman Kreisel wrote:
    > > And no, afaik, hotplug is _not_ obsolete.

    >
    > hotplug is obsolete, udev is now the good way to do(and not hal):
    > >Thanks to the replacement of hotplug with udev functions,
    > >all machines now boot faster.

    >
    > udev, in mandriva(2006), now do hotplug job.


    What?! udev depends on hotplug! It depends on it to create the device nodes!
    It won't work without it!

    Could we get en udev/hotplug/hal maintainer in to settle this please.

    Anders

    --
    - Debian/Unstable - KDE 3.4.2 - KMail 1.8.2 -


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  11. Re: Automounting experiments

    Theo Schmidt wrote:

    > Derek Broughton schrieb:
    >> Bellegarde Cedric wrote:
    >>> Roman Kreisel wrote:

    > ...
    >>>>And no, afaik, hotplug is _not_ obsolete.

    > ...
    >>>hotplug is obsolete, udev is now the good way to do (and not hal):

    >
    > Oh great, even the experts disagree...


    Oooh, I hope he's not talking about me... :-)

    > I gleaned my clip on "obsolete
    > hotplug" from an article about SuSE 10.0 in LinuxUser (German magazine).
    >
    > ...
    >>>udev, in mandriva(2006), now do hotplug job.
    >>>

    >>
    >> I can't see how. Hotplug inserts the modules required by a device - I
    >> see
    >> nothing in udev that's going to do that. hal is a _very_ good way to
    >> enable automounting (amongst other things) - it doesn't mount anything,
    >> but then neither does udev.

    >
    > hal seems to depend on udev, but I still havn't got a clue what all
    > these components *really* do.


    I think we're all just fumbling in the dark these days, as there isn't
    enough documentation around. I have a pretty good clue about hotplug - and
    the simplest explanation is that it notes the insertion of hotpluggable
    hardware (generally PC-card and USB) and installs the appropriate modules
    to support it (running custom scripts if necessary). I've got less
    knowledge of udev, but it builds the /dev database and makes all the
    necessary nodes with appropriate permissions and synonyms. I don't have a
    clue what HAL & DBUS do, but if they aren't integral to both of these yet,
    they will be. They are integral to pmount - which is the (an?) other part
    of the story.
    --
    derek


    --
    To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread