# How do you force mount a device w/ ivman?

## paulisdead

ivman doesn't seem to want to mount my iriver h320 at all, but mounting cds works.  I'm no good with xml so I don't even know if the context is right at all

```
    <ivm:Match name="ivm.mountable" value="true">

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

    </ivm:Match>

    <ivm:Match name="hal.info.product" value="iRiver H300 Series">

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

    </ivm:Match>

    <ivm:Match name="hal.info.product" value="iRiver H300 Series">

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

       <ivm:Option name="exec" value="nautilus --no-desktop /mnt/iriver" />

    </ivm:Match>
```

Like I said I'm not sure on the context, I tried cramming both options onto the same line like this 

```
<ivm:Option name="mount" value="true" name="exec" value="nautilus --no-desktop /mnt/iriver" />
```

But that didn't work.  I've also tried putting both in several combinations into the globabl IvmConfigActions.xml file, and that didn't work either.  If I don't have the mount line in there, it opens up nautilus in the empty mount point directory as soon as I plug in my iriver, but it's not mounted. Anybody have any ideas?

----------

## JeliJami

the ivm.mountable block should suffice to mount your iriver h320 (whatever that is)

this should do it:

```

    <ivm:Match name="ivm.mountable" value="true">

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

    </ivm:Match>

    <ivm:Match name="hal.info.product" value="iRiver H300 Series">

       <ivm:Option name="exec" value="nautilus --no-desktop /mnt/iriver" />

    </ivm:Match>

```

the default mountpoint however, would be /media/something

check with 

```

$ lshal | less

```

and search for the volume.policy.desired_mount_point of your device

----------

## paulisdead

 *davjel wrote:*   

> the default mountpoint however, would be /media/something
> 
> check with 
> 
> ```
> ...

 

Ya from everything I read it should work, but it just seems to ignore mounting the device.  Also, I have the iriver in my fstab file, and ivman is supposed to respect your mount points when you use the fstab.  This has been working for cd drives to mount them at /mnt/cdrom.

I also don't see anything with volume.policy in it in lshal, and the iriver's not being mounted in /media or /mnt.

----------

## JeliJami

can you find anything related to your iriver in the output of lshal?

----------

## paulisdead

 *davjel wrote:*   

> can you find anything related to your iriver in the output of lshal?

 

Lots of stuff, but I don't know how useful.

```
udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB'

  info.udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB'  (

string)

  linux.subsystem = 'usb'  (string)

  linux.hotplug_type = 1  (0x1)  (int)

  usb_device.bus_number = 1  (0x1)  (int)

  usb_device.can_wake_up = false  (bool)

  usb_device.is_self_powered = true  (bool)

  usb_device.version_bcd = 512  (0x200)  (int)

  usb_device.speed_bcd = 294912  (0x48000)  (int)

  usb_device.serial = '0123456789AB'  (string)

  usb_device.linux.device_number = 13  (0xd)  (int)

  usb_device.num_ports = 0  (0x0)  (int)

  usb_device.max_power = 98  (0x62)  (int)

  usb_device.device_revision_bcd = 256  (0x100)  (int)

  info.product = 'iRiver H300 Series'  (string)

  usb_device.product = 'iRiver H300 Series'  (string)

  info.vendor = 'iRiver, Ltd.'  (string)

  usb_device.vendor = 'iRiver, Ltd.'  (string)

  usb_device.product_id = 12291  (0x3003)  (int)

  usb_device.vendor_id = 4102  (0x1006)  (int)

  usb_device.device_protocol = 0  (0x0)  (int)

  usb_device.device_subclass = 0  (0x0)  (int)

  usb_device.device_class = 0  (0x0)  (int)

  usb_device.num_interfaces = 1  (0x1)  (int)

  usb_device.num_configurations = 1  (0x1)  (int)

  usb_device.configuration_value = 2  (0x2)  (int)

  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9' 

 (string)

  info.linux.driver = 'usb'  (string)

  info.bus = 'usb_device'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0000_00_02_1'  (str

ing)

  linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9'  (st

ring)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_usbraw'

  info.udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_usb

raw'  (string)

  linux.device_file = '/dev/bus/usb/001/013'  (string)

  linux.subsystem = 'usb_device'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  usbraw.device = '/dev/bus/usb/001/013'  (string)

  info.product = 'USB Raw Device Access'  (string)

  info.capabilities = {'usbraw'} (string list)

  info.category = 'usbraw'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB'

  (string)

  linux.sysfs_path = '/sys/class/usb_device/usbdev1.13'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0'

  info.udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0

'  (string)

  linux.subsystem = 'usb'  (string)

  linux.hotplug_type = 1  (0x1)  (int)

  info.product = 'USB Mass Storage Interface'  (string)

  usb.interface.protocol = 80  (0x50)  (int)

  usb.interface.subclass = 6  (0x6)  (int)

  usb.interface.class = 8  (0x8)  (int)

  usb.interface.number = 0  (0x0)  (int)

  info.linux.driver = 'usb-storage'  (string)

  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2.0'

  (string)

  usb.configuration_value = 2  (0x2)  (int)

  usb.num_configurations = 1  (0x1)  (int)

  usb.num_interfaces = 1  (0x1)  (int)

  usb.device_class = 0  (0x0)  (int)

  usb.device_subclass = 0  (0x0)  (int)

  usb.device_protocol = 0  (0x0)  (int)

  usb.vendor_id = 4102  (0x1006)  (int)

  usb.product_id = 12291  (0x3003)  (int)

  usb.vendor = 'iRiver, Ltd.'  (string)

  usb.product = 'USB Mass Storage Interface'  (string)

  usb.device_revision_bcd = 256  (0x100)  (int)

  usb.max_power = 98  (0x62)  (int)

  usb.num_ports = 0  (0x0)  (int)

  usb.linux.device_number = 13  (0xd)  (int)

  usb.serial = '0123456789AB'  (string)

  usb.speed_bcd = 294912  (0x48000)  (int)

  usb.version_bcd = 512  (0x200)  (int)

  usb.is_self_powered = true  (bool)

  usb.can_wake_up = false  (bool)

  usb.bus_number = 1  (0x1)  (int)

  info.bus = 'usb'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB'

  (string)

  linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2

.0'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2.0'  (s

tring)

udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0_scsi_h

ost'

  info.udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0

_scsi_host'  (string)

  linux.subsystem = 'scsi_host'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  scsi_host.host = 13  (0xd)  (int)

  info.product = 'SCSI Host Adapter'  (string)

  info.capabilities = {'scsi_host'} (string list)

  info.category = 'scsi_host'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_

if0'  (string)

  linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2

.0/host13'  (string)

  linux.sysfs_path = '/sys/class/scsi_host/host13'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0_scsi_h

ost_scsi_device_lun0'

  info.udi = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_if0

_scsi_host_scsi_device_lun0'  (string)

  linux.subsystem = 'scsi'  (string)

  linux.hotplug_type = 1  (0x1)  (int)

  scsi.type = 'disk'  (string)

  scsi.vendor = 'TOSHIBA'  (string)

  scsi.model = 'MK2004GAL'  (string)

  info.product = 'SCSI Device'  (string)

  info.linux.driver = 'sd'  (string)

  scsi.lun = 0  (0x0)  (int)

  scsi.target = 0  (0x0)  (int)

  scsi.bus = 0  (0x0)  (int)

  scsi.host = 13  (0xd)  (int)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_

if0_scsi_host'  (string)

  info.bus = 'scsi'  (string)

  linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2

.0/host13/target13:0:0/13:0:0:0'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9:2.0/host

13/target13:0:0/13:0:0:0'  (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_TOSHIBA_MK2004GAL_0123456789A

B'

  portable_audio_player.input_formats = {'audio/mpeg'} (string list)

  portable_audio_player.output_formats = {'audio/mpeg', 'audio/x-ms-wma', 'appli

cation/ogg'} (string list)

  portable_audio_player.storage_device = '/org/freedesktop/Hal/devices/storage_s

erial_TOSHIBA_MK2004GAL_0123456789AB'  (string)

  portable_audio_player.access_method = 'storage'  (string)

  portable_audio_player.type = 'generic'  (string)

  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_TOSHIBA_MK

2004GAL_0123456789AB'  (string)

  info.udi = '/org/freedesktop/Hal/devices/storage_serial_TOSHIBA_MK2004GAL_0123

456789AB'  (string)

  storage.requires_eject = false  (bool)

  storage.hotpluggable = true  (bool)

  info.capabilities = {'storage', 'block', 'portable_audio_player'} (string list

)

  info.category = 'portable_audio_player'  (string)

  info.product = 'MK2004GAL'  (string)

  info.vendor = 'TOSHIBA'  (string)

  storage.removable = false  (bool)

  storage.physical_device = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0

123456789AB_if0'  (string)

  storage.lun = 0  (0x0)  (int)

  storage.firmware_version = 'JC10'  (string)

  storage.serial = 'TOSHIBA_MK2004GAL_0123456789AB'  (string)

  storage.vendor = 'TOSHIBA'  (string)

  storage.model = 'MK2004GAL'  (string)

  storage.drive_type = 'disk'  (string)

  storage.automount_enabled_hint = true  (bool)

  storage.media_check_enabled = false  (bool)

  storage.no_partitions_hint = false  (bool)

  storage.bus = 'usb'  (string)

  block.is_volume = false  (bool)

  block.minor = 16  (0x10)  (int)

  block.major = 8  (0x8)  (int)

  block.device = '/dev/sdb'  (string)

  linux.hotplug_type = 3  (0x3)  (int)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1006_3003_0123456789AB_

if0_scsi_host_scsi_device_lun0'  (string)

  linux.sysfs_path_device = '/sys/block/sdb'  (string)

  linux.sysfs_path = '/sys/block/sdb'  (string)

udi = '/org/freedesktop/Hal/devices/volume_uuid_15E1_2248'

  volume.unmount.valid_options = {'lazy'} (string list)

  volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime'

, 'noexec', 'quiet', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 

'dmask=', 'fmask=', 'uid='} (string list)

  org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-system-storage-moun

t', 'hal-system-storage-unmount', 'hal-system-storage-eject'} (string list)

  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (st

ring list)

  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'}

 (string list)

  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)

  volume.ignore = false  (bool)

  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_15E1_2248'  (string)

  volume.partition.msdos_part_table_type = 12  (0xc)  (int)

  info.product = 'H300'  (string)

  volume.size = 19995623424  (0x4a7d50000)  (uint64)

  volume.num_blocks = 39053952  (0x253ea80)  (int)

  volume.block_size = 512  (0x200)  (int)

  volume.partition.number = 1  (0x1)  (int)

  info.capabilities = {'volume', 'block'} (string list)

  info.category = 'volume'  (string)

  volume.is_partition = true  (bool)

  volume.is_disc = false  (bool)

  volume.is_mounted = false  (bool)

  volume.mount_point = ''  (string)

  volume.label = 'H300'  (string)

  volume.uuid = '15E1-2248'  (string)

  volume.fsversion = 'FAT32'  (string)

  volume.fsusage = 'filesystem'  (string)

  volume.fstype = 'vfat'  (string)

  storage.model = ''  (string)

  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_TOSHIBA_MK

2004GAL_0123456789AB'  (string)

  block.is_volume = true  (bool)

  block.minor = 17  (0x11)  (int)

  block.major = 8  (0x8)  (int)

  block.device = '/dev/iriver'  (string)

  linux.hotplug_type = 3  (0x3)  (int)

  info.parent = '/org/freedesktop/Hal/devices/storage_serial_TOSHIBA_MK2004GAL_0

123456789AB'  (string)

  linux.sysfs_path_device = '/sys/block/sdb/sdb1'  (string)

  linux.sysfs_path = '/sys/block/sdb/sdb1'  (string)
```

----------

## JeliJami

what's seems to be missing is a property

```
volume.policy.should_mount = true  (bool)
```

but i have no experience with usb-cdrom devices  :Sad: 

with 

```
# hald --daemon=no
```

or 

```
# dbus --monitor system
```

you may be able to get some more info

good luck

----------

## paulisdead

 *davjel wrote:*   

> what's seems to be missing is a property
> 
> ```
> volume.policy.should_mount = true  (bool)
> ```
> ...

 

It's not a cdrom, it's an mp3 player that just works like a usb hard drive.  running hald --daemon=no instead of letting the normal hald init script run doesn't help, ivman still only opens nautilus on the empty mount point.  dbus-monitor system spits out

```
Failed to open connection to session message bus: Unable to determine the address of the message bus
```

----------

## paulisdead

hate to do this, but, BUMP.

----------

## keyser_soze

The important stuff is in the last section...

 *paulisdead wrote:*   

> 
> 
> ```
> 
>   volume.is_partition = true  (bool)
> ...

 

what happens when you do 

```

pmount-hal '/org/freedesktop/Hal/devices/volume_uuid_15E1_2248'

```

or

```

pmount /dev/irivier

```

Edit...

It just occured to me also that your reference to

 *paulisdead wrote:*   

> 
> 
> <ivm:Match name="hal.info.product" value="iRiver H300 Series">
> 
> 

 

is part of your problem

If you look at your lshal output you will find that the item with info.product="iRiver H300 Series" is NOT your partition you want to mount.

The info.product you need to match is the one for the mountable volume... ie info.product="H300" -- the last item.

You are telling ivman to try to mount somethhing which is NOT a volume. You need to refer to the info.product of the volume you want to mount.

----------

