# Supermount gone in 2.6.8

## curmudgeon

When installing a new kernel, I always do a "make menuconfig" and

compare .config with .config.old to look for changes. 2.6.8 had

quite a few of  them. :)

I noticed that the supermount option had disappeared, and a quick

look in the Changelog revealed:

"Removed supermount patch, am told that udev makes this obsolete

now. Also,  it didn't apply to 2.6.8 anymore, so that made for a

good reason to drop it :)"

This topic probably exists scattered in a half-dozen different places

(but hey, after this change, everybody will look here, right? ::) ), but

it seems like a good time to mention alternatives to supermount (with

the goal of clueless users having the ability to insert and remove

various media types as required).

In particular, could someone explain how to do this with udev (bonus

points for solutions that work with multiple USB flash drives)?

Thank you again for your help.

----------

## spb

Get udev working

Get the bmg-main overlay (breakmygentoo.net has a howto for this, I believe)

Unmask dbus-cvs and hal-cvs (they're keyworded -*, so you need to put them in package.keywords)

emerge ivman-cvs or gnome-volume-manager-cvs

Configure.

----------

## Plastic

I use ivman, and it is definetly better than both supermount and submount.

----------

## jse86

can anyone describe in detail how to get ivman or udev compiled into the kernel and then show the proper fstab modifications that need to made?

that would be great

----------

## butters

supermount is in nitro-sources, if you're still interested.  Those new freedesktop.org projects look very promising, though.

----------

## Plastic

EDIT: First 

```
emerge hotplug udev

rc-update add hotplug default
```

 and pull devfs out of the kernel.

Ok, sync to bmg-main (if you don't know how, go to breakmygentoo.net) and emerge hal-cvs dbus-cvs ivman-cvs . Do 

```
rc-update add dbus default

rc-update add ivman default
```

Now edit the config files in /etc/ivman/ for your system (editing fstab is unecessary). Just make sure they point to the right dev entries and customize or disable the insert actions. I can post my versions of any one the config files if you are having trouble.

----------

## spb

 *jse86 wrote:*   

> can anyone describe in detail how to get ivman or udev compiled into the kernel and then show the proper fstab modifications that need to made?
> 
> that would be great

 They don't go in the kernel; that's the whole point.  :Wink:  Udev is in Portage at the moment; just emerge udev and disable devfs in your kernel. Ivman and gnome-volume-manager are in bmg-main; go to breakmygentoo.net for info on how to get them. As for fstab, it should be exactly as it would if you were mounting manually.

----------

## saintdev

so is ivman the only way to do this, or is there a way to do this soley using udev? If supermount was removed, I would think that there would be an easy way of doing things short of getting everything from breakmygentoo.

----------

## Plastic

This is the only way that uses udev. DBus is the tecnology that allows you to do this. udev is just a hotpluggable /dev filesystem.

----------

## tapted

yeah ... I was wondering about this..

Just when I get supermount all figured out and working, too.

I thought supermount was pretty swanky, TTYTT. The whole mount-on-first access thing (rather than when plugged in) seemed pretty kewl to me, and at first glance it doesn't look like anything else does this..

IMHO it's not obsolete -- udev/namedev makes it easier to pick the device to supermount, but the functionality in udev doesn't appear to be a superset of supermount. And if all the support for it is unstable (i.e. in order to mimic supermount), why has supermount been removed?? And how did I get supermount to be the first word on the last four lines in my text area?

Moo?

----------

## spb

The problem with supermount is in the implementation. Essentially, it's evil. AFAICT (I haven't read the code properly) it doesn't just mount on first access, it tries to  mount on *every* access. It's nasty, and the people who do this sort of thing hate it, myself included.  :Wink:  The udev/dbus/hal/ivman system is a much nicer implementation, all told.

----------

## beesea

 *tapted wrote:*   

> the functionality in udev doesn't appear to be a superset of supermount.

 

udev doesn't actually do *any* mounting; it just creates device nodes.  Ivman is the app that does the auto-mounting

----------

## yngwin

And if you search the forums, there are some good howtos on udev and ivman!

----------

## Nate_S

 *thebell wrote:*   

> The problem with supermount is in the implementation. Essentially, it's evil. AFAICT (I haven't read the code properly) it doesn't just mount on first access, it tries to  mount on *every* access. It's nasty, and the people who do this sort of thing hate it, myself included.  The udev/dbus/hal/ivman system is a much nicer implementation, all told.

 

That, and it requires a kernel patch and runs in kernelspace, while udev/dbus/hal/ivman is all userspace.

----------

## NismoC32

 *Plastic wrote:*   

> EDIT: First 
> 
> ```
> emerge hotplug udev
> 
> ...

 

Hei I would like to see how you have configured the ivman file.

I'm having a bit of trouble there.

----------

## Plastic

ivmconfigbase:

```
<?xml version="1.0" encoding="UTF-8"?>

<ivm:BaseConfig version="0.1" xmlns:ivm="http://www.eikke.com/ivm">

    <ivm:Option name="fork" value="true" />

    <ivm:Option name="debug" value="false" />

    <ivm:Option name="pidfile" value="/var/run/ivman/ivman.pid" />

    <!-- Set this to true to unlock your cdrom device(s), to enable auto-unmounting -->

    <ivm:Option name="unlock" value="true" /> 

</ivm:BaseConfig>    

```

ivmconfigactions

```
<?xml version="1.0" encoding="UTF-8"?>

<ivm:ActionsConfig version="0.1" xmlns:ivm="http://www.eikke.com/ivm">

    <ivm:Option name="automount_media" value="true" />

    <ivm:Option name="automount_drives" value="true" />

    <ivm:Option name="autoplay_cda" value="false" />

    <ivm:Option name="autoplay_cda_cmd" value="cdplay -d %d -c" />

    <!-- Automagic DVD playback isn't supported yet (I have no DVD reader) -->

    <ivm:Option name="autoplay_dvd" value="false" />

    <ivm:Option name="autoplay_dvd_cmd" value="" />

    

    <!-- Specific actions on specific devices are configured here -->

    <!--

     Specify on which device the following actions apply. Using a key-value pair from HAL

     Currently only block.device is used, to check wether the device should be mounted -->

    <!-- The next line is commented out

    <ivm:Device key="block.device" value="/dev/hdc">

    -->

      <!-- Specify the action to be taken.

          Currently only 'dontmount' is supported, which tells ivman not to mount this device

      -->

      <!-- The next line is commented out

      <ivm:Action>dontmount</ivm:Action>

      -->

   <!--

   </ivm:Device>

   -->

</ivm:ActionsConfig>    

```

Essentially, this does nothing but mount the CDs. Hope this helps.

----------

## NismoC32

 *Plastic wrote:*   

> ivmconfigbase:
> 
> ```
> <?xml version="1.0" encoding="UTF-8"?>
> 
> ...

 

Can you show me your IvmConfigMappings.xml file too ?

----------

## Plastic

```
<?xml version="1.0" encoding="UTF-8"?>

<ivm:MappingsConfig version="0.1" xmlns:ivm="http://www.eikke.com/ivm">

    <!-- This is a sample mapping. It maps /dev/hdc (the device ivman gets from HAL) to /dev/cdroms/cdrom0, which means:

                when a cd is inserted into /dev/hdc, 'mount /dev/dev.cdroms.cdrom0' would be called. If there is no mapping

                for /dev/hdc, 'mount /dev/hdc' would be called. This makes shure you don't have to alter /etc/fstab -->

    <!-- The sample mapping line has been commented out!!! If you need this, alter it tou tour likings, and uncomment -->

    <!--

    <ivm:Map device="/dev/hdc" maps="/dev/cdroms/cdrom0" />

    -->

</ivm:MappingsConfig>    

```

----------

## revertex

i finally foud a reason to mount things by hand using the old "mount" command.

ivman is far away from the KISS concept.

----------

## Tarball

Does Dbus/Hal/Ivman still allow you to burn CDR/DVDR using the device without having to unmount the drive first?

To me this was a useful attribute of supermount and the reason I didn't keep submount because I had to unmount the drive before I could use cdrecord which meant I might as well just mount the drives by hand.

----------

## Jakub

My personal experience is that the udev/dbus/hal/ivman combo is still in the development stage. It *may* work. I installed  linux on my parents' box. Of course they will never mount things manually so I tried to install ivman. After many many struggles I succeeded. But unfortunately, it only worked sometimes. Sometimes it didn't. And if it happened even once that they put a CD and it wouldn't be there or, even worse, they wouldn't be able to open the tray with a CD in it, they would never use linux again. So I installed a 2.4 kernel with supermount and it worked flawlessly from the very beginnig. It may be evil but it works.

----------

## Tarball

Agreed, it may be evil but it did just work.

And as for previous comments about it mounting the media every time you access the mount point, in the case of CDRoms and floppy disks given that these are slow devices anyway I don't think it really matters that the devices is mounted each access time.

----------

## revertex

/me sits here waiting until udev be a more mature thing incorporated in portage (at least ~x86) i don't wanna break my gentoo more than i naturally can do, until that don't happen i come back to the ancient autofs, at least it's working here.

i guess devs there's a good reason to get rid supermount and suggest  a "still in development"  thing like udev as replacement.

----------

## Jakub

 *revertex wrote:*   

> 
> 
> i guess devs there's a good reason to get rid supermount and suggest  a "still in development"  thing like udev as replacement.

 

I think the problems are usually not with udev (since it's not difficult to set up and probably really better than devfs which is unmaintained and obsolete) but with the rest (dbus/hal/ivman) and/or their configuration.

----------

## Nate_S

Yes, udev itself is stable, as is hotplug, it's dbus, hal, and { gnome-volume-manager | IVMAN } that are still under heavy development.  

For writing while mounted you might search te forum about packet writing.  this is the same as what incd or the other similar one who's name I can't think of does.  It essentially allows writing to them as if they were hard disks.

----------

## thefatdx

Hi. Im trying to do this my my gentoo 1.4 system. I keep getting errors with the cvs version. So i unmasked hal, dbus and ivman-cvs (only one there) and now im trying to emerge them and i get a blocked package error.

```

dx portage # ACCEPT_KEYWORDS="~x86" emerge --pretend sys-apps/dbus sys-apps/hal sys-apps/ivman-cvs

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[blocks B     ] sys-kernel/linux-headers ("virtual/os-headers" from pkg sys-kernel/linux26-headers-2.6.8.1)

[ebuild  N    ] sys-apps/dbus-0.22-r1

[ebuild  N    ] dev-lang/swig-1.3.21

[ebuild  N    ] sys-libs/libcap-1.10-r4

[ebuild  N    ] sys-kernel/linux26-headers-2.6.8.1

[ebuild  N    ] sys-apps/hal-0.2.98-r1

[ebuild  N    ] sys-apps/ivman-cvs-0.30

```

Now as far as i know. Once kernel headers are in, its not a good idea to remove them as all the bootstrapped programs (gcc,ld) are compiled against them ? please tell me otherwise if im wrong.

----------

## spb

```
emerge -C linux-headers

emerge --oneshot linux26-headers
```

If your next system update wants to bring back linux-headers, you'll need to update to a newer profile. The linux-headers package is only really important when you're building stuff-- everything will run fine without them installed. 

One thing to note though: once you do that, you'll be stuck with 2.6 kernels. Things like glibc won't work with 2.4.

----------

## Quantumstate

Curmudgeon, FYI I used to do the old-config-file/new-config-file compare by hand as well.  Much easier to use 'make oldconfig'.  

Put your old config in the new linux source dir, name it '.config' .  Then make oldconfig, and it'll do most of the work.  You just answer questions about the new stuff.  

More accurate.

----------

## KiTaSuMbA

Duh!

Am I stupid or what???!!! Tried both autofs AND ivman, followed the instructions but still I can't get anything to mount...

I feel like I'm missing something out here...

Had it been for me, mount-umount cycling by hand or by the konqi's "devices:" protocol is juuuuust fine. What bugs me is that I have to provide this to a bunch of braindeads in the univ. library and feel in no mood to loose a couple of months demonstrating right-click actions in KDE...   :Confused: 

----------

## Nate_S

If you really, really want to use supermount, it's been in the past few nitro sources.  

However, if you give more details on your problem with ivman, I could try to give you a hand.  

-Nate

----------

## forever

Ok. Finally I managed to install working 2.6 series kernel. All working - lack of supermount option was a pain so I searched internet for the patch.

I found that the official site is not developping it so - the true can be that it is a piece of shit.  :Wink: 

However - I had never problems with that, all the technical explanations... hmm I trust them - but for me it works fine...

So to help others in supermount installation:

1. Get the vanilla kernel

2. download the patch for Your kernel version from http://ck.kolivas.org/patches/2.6/

3. unzip the patch file into the kernel directory and patch it with command:

```
# patch -p1 < patch_file_name
```

Than configure Your kernel, and compile as usually.

It works for me with udev.

----------

## Tronic

Argh. "It's evil". Yeah, I guess that's the best reasoning one can present for removing a perfectly working feature that has been well tested and successfully used for a long time. Replacing it with something else that doesn't even do anything more (and may even do less, as it mounts early, thus disallowing direct device access, or does it handle this too somehow?).

I thought Gentoo is about choice. But obviously there's an error in the documentation. When developers think there are two systems that do the same, they remove one instead of letting you choose...

----------

## Tronic

Off-topic: who said devfs is not being actively developed? There have been several patches posted this month. Please read your LKML.

----------

## forever

when You download vanilla kernel - in the description of the devfs You have *deperciated*...

So even if patches are still sent, the devfs is dying  :Wink: 

But it doesn't stop You using supermount  :Wink: 

----------

## Tronic

Yes, it does say so. This is a combination of two factors.

1. there was no-one developing devfs, as the original developer disappeared,

2. udev was being developed as a replacement.

Of course, now #1 is no longer the case since another guy decided to pick up the project and continue working on it.

----------

## spb

 *Tronic wrote:*   

> Off-topic: who said devfs is not being actively developed? There have been several patches posted this month. Please read your LKML.

 There may have been patches coming in in the last month, but that doesn't mean there were any ~2 months ago, when this thread started.

----------

## Hagra

I too am used to using supermount, and I think the whole idea of using a userspace deamon to do something as kernally as auto-mounting is just plain wrong.

What's more is the amount of JUNK that's needed for ivman. I did an emerge --pretend to see what it's dependencies are, and this is what I got:

[ebuild  N    ] dev-python/pyrex-0.9.3-r1  

[ebuild  N    ] sys-apps/dbus-0.23  

[ebuild  N    ] dev-lang/swig-1.3.21  

[ebuild  N    ] sys-libs/libcap-1.10-r4  

[ebuild  N    ] sys-apps/hal-0.4.5-r1  

[ebuild  N    ] sys-apps/ivman-0.4_rc2 

I don't know what half of these are but the ones I recognise are sending shivers down my spine. python for example? What the heck does an auto-mounter do with an interpreted scripting language? libcap?!?!?!?!? Why are there so many dependencies for such a SIMPLE thing?

Does anyone else remember the good old days of MS DOS? That's right, DOS 5 automounted cdroms (Well, the MSCDEX.EXE TSR did). It can't be this complicated, and I laugh at the fact that DOS 5 can do something flawlessly that the absolute latest 2.6 linux kernels can't do without making a pig's ear out of it.

Personally I don't run gnome (or KDE for that matter) and find it just amazing that a window manager is responsable for something so low level (assuming you don't want to use ivman)!

I've tried to use autofs, got it working as described in all the documentation... It did indeed automatically mount my cdrom when I tried to access it. However, after 1 second (the default unmount timeout) it got unmounted. I use natulus to browse files, and once in /dev/cdrom, the window closed after a second as autofs unmounted the media and removed it's directory. Completely pointless!

I'd also like to second someone's point about gentoo being about choice... I love gentoo, but not including the supermount patch IS removing choice, and the remaining choices aren't great IMO.

Rant Over.

Personally I'm intending to have a quick look at some of the kernel source code to see how hard it really is to put a hook into the cdrom module that generates a hot-plug event when a cdrom is inserted or removed. Shouldn't be too hard to write a hotplug script to mount/unmount the cdrom when it's inserted or removed. That's how I'd do it anyway... or perhaps a deamon that hooks directly into the cdrom module, a deamon that doesn't need python to run!!!

----------

## Vaporz

ivman can't handle usb, making it useless to me

supermount behaves exactly like i want, and i like it

----------

## chunderbunny

Funny, Ivman mounts my USB camera just fine. It seems a lot easier to use and a lot more reliable than supermount IMO.

----------

## Gustavo Guillermo Pérez

Cause I can't mount floppys with the lastest version of everything on my gentoo box, I touch a little the supermount patch to allow still using them with  kernel 2.6.11-rc1 /rc2

Is for vanilla sources

http://www.compunauta.com/forums/linux/instalarlinux/supermount_en.html

 :Confused: 

ivman dbus hal udev looks like to not working good today, still in development.

----------

