# hal + pmount +kde => can't find /dev/sdb1 in... [Solved]

## pivertd

In very short, I cannot mount devices that are not in /etc/fstab. (Should be the role of pmount)

This is now for days that I'm looking at this problem.

I tried many things, and I have this behavior on all my computers. There is many threads on the forums about hal, but nothing clear about this problem.

When I plug an usb drive for example, I well have the kde popup that launches, but when I want to access it, I have :

```

mount: can't find /dev/sdb1 in /etc/fstab or /etc/mtab

```

Here are my packages :

```

pivert ~ # emerge -pv dbus hal pmount kdebase

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

Calculating dependencies ...done!

[ebuild   R   ] sys-apps/dbus-0.61  +X -debug -doc +gtk -mono +python +qt (-selinux) 0 kB

[ebuild   R   ] sys-apps/hal-0.5.5.1-r3  -acpi -debug -doc -pam_console -pcmcia (-selinux) 1,482 kB

[ebuild   R   ] sys-apps/pmount-0.9.6  +crypt 368 kB

[ebuild   R   ] kde-base/kdebase-3.5.1-r3  +arts +cups -debug +hal -ieee1394 +java -kdeenablefinal +ldap +lm_sensors -logitech-mouse -openexr +opengl +pam +samba +ssl -xcomposite -xinerama -xscreensaver -zeroconf 0 kB

Total size of downloads: 1,850 kB

pivert ~ #   

```

- My hald and dbus are well running.

- I added my user to the groups haldaemon and plugdev. (Is this necessary ?)

- I created a symlink : ln -s /usr/bin/pmount-hal /etc/hal/device.d/60-pmount.hal (Is this necessary ?)

- How can I debug/see why my kde and/or hal is not using pmount ?

- Nothing interesting in my logs :

```

Mar 25 00:17:40 pivert SCSI device sdb: 511744 512-byte hdwr sectors (262 MB)

Mar 25 00:17:40 pivert sdb: Write Protect is off

Mar 25 00:17:40 pivert sdb: Mode Sense: 03 00 00 00

Mar 25 00:17:40 pivert sdb: assuming drive cache: write through

Mar 25 00:17:40 pivert sdb: sdb1

Mar 25 00:17:40 pivert sd 2:0:0:0: Attached scsi removable disk sdb

Mar 25 00:17:40 pivert sd 2:0:0:0: Attached scsi generic sg1 type 0

Mar 25 00:17:40 pivert usb-storage: device scan complete

Mar 25 00:17:40 pivert scsi.agent[11629]: disk at /devices/pci0000:00/0000:00:02.2/usb1/1-4/1-4:1.0/host2/target2:0:0/2:0:0:0

Mar 25 00:20:01 pivert cron[11718]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

```

What's wrong ?

Regards,Last edited by pivertd on Thu Mar 30, 2006 12:29 pm; edited 1 time in total

----------

## pivertd

Mhh I didn't notice that there is an ivman rc entry.

So I started ivman, and made it restart automatically, and now I have some interesting things in the logs.

But it doesnt work better.

```

Mar 25 09:42:49 pivert usb 1-4: new high speed USB device using ehci_hcd and address 7

Mar 25 09:42:49 pivert scsi6 : SCSI emulation for USB Mass Storage devices

Mar 25 09:42:49 pivert usb-storage: device found at 7

Mar 25 09:42:49 pivert usb-storage: waiting for device to settle before scanning

Mar 25 09:42:49 pivert ivman: New Device: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial

Mar 25 09:42:49 pivert ivman: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial wasn't mounted, by us or by others...

Mar 25 09:42:49 pivert ivman: New Device: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0

Mar 25 09:42:49 pivert ivman: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0 wasn't mounted, by us or by others...

Mar 25 09:42:50 pivert ivman: New Device: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0_scsi_host

Mar 25 09:42:50 pivert ivman: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0_scsi_host wasn't mounted, by us or by others...

Mar 25 09:42:54 pivert Vendor:           Model: USB BAR           Rev: 2.00

Mar 25 09:42:54 pivert Type:   Direct-Access                      ANSI SCSI revision: 02

Mar 25 09:42:55 pivert ready

Mar 25 09:42:55 pivert SCSI device sdb: 511744 512-byte hdwr sectors (262 MB)

Mar 25 09:42:55 pivert sdb: Write Protect is off

Mar 25 09:42:55 pivert sdb: Mode Sense: 03 00 00 00

Mar 25 09:42:55 pivert sdb: assuming drive cache: write through

Mar 25 09:42:55 pivert SCSI device sdb: 511744 512-byte hdwr sectors (262 MB)

Mar 25 09:42:55 pivert sdb: Write Protect is off

Mar 25 09:42:55 pivert sdb: Mode Sense: 03 00 00 00

Mar 25 09:42:55 pivert sdb: assuming drive cache: write through

Mar 25 09:42:55 pivert sdb: sdb1

Mar 25 09:42:55 pivert sd 6:0:0:0: Attached scsi removable disk sdb

Mar 25 09:42:55 pivert sd 6:0:0:0: Attached scsi generic sg1 type 0

Mar 25 09:42:55 pivert usb-storage: device scan complete

Mar 25 09:42:55 pivert scsi.agent[24355]: disk at /devices/pci0000:00/0000:00:02.2/usb1/1-4/1-4:1.0/host6/target6:0:0/6:0:0:0

Mar 25 09:42:55 pivert ivman: New Device: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0_scsi_host_scsi_device_lun0

Mar 25 09:42:55 pivert ivman: /org/freedesktop/Hal/devices/usb_device_ea0_2168_noserial_if0_scsi_host_scsi_device_lun0 wasn't mounted, by us or by others...

Mar 25 09:42:56 pivert ivman: New Device: /org/freedesktop/Hal/devices/storage_model_USB_BAR

Mar 25 09:42:56 pivert ivman: UDI /org/freedesktop/Hal/devices/storage_model_USB_BAR is device /dev/sdb

Mar 25 09:42:56 pivert ivman: Device /dev/sdb can't be mounted because it is not a volume

Mar 25 09:42:56 pivert ivman: /org/freedesktop/Hal/devices/storage_model_USB_BAR wasn't mounted, by us or by others...

Mar 25 09:42:56 pivert ivman: UDI /org/freedesktop/Hal/devices/storage_model_USB_BAR is device /dev/sdb

Mar 25 09:42:56 pivert ivman: Device /dev/sdb can't be mounted because it is not a volume

Mar 25 09:42:56 pivert ivman: New Device: /org/freedesktop/Hal/devices/volume_uuid_2F23_6552

Mar 25 09:42:56 pivert ivman: UDI /org/freedesktop/Hal/devices/volume_uuid_2F23_6552 is device /dev/sdb1

Mar 25 09:42:56 pivert ivman: Device /dev/sdb1 appears to be mountable

Mar 25 09:42:56 pivert ivman: Giving other programs a chance to mount...

Mar 25 09:43:01 pivert ivman: Attempting to mount device /dev/sdb1

Mar 25 09:43:01 pivert ivman: Running: mount '/dev/sdb1'

Mar 25 09:43:02 pivert ivman: /org/freedesktop/Hal/devices/volume_uuid_2F23_6552 wasn't mounted, by us or by others...

Mar 25 09:43:02 pivert ivman: UDI /org/freedesktop/Hal/devices/volume_uuid_2F23_6552 is device /dev/sdb1

Mar 25 09:43:02 pivert ivman: Device /dev/sdb1 appears to be mountable

```

----------

## pivertd

Mhh when I try pmount manually, I have very interesting error :

pivert@pivert ~ $ pmount /dev/sdb1

pmount: error while loading shared libraries: libdbus-1.so.1: cannot open shared object file: No such file or directory

Will reemerge pmount...Last edited by pivertd on Sat Mar 25, 2006 11:09 am; edited 1 time in total

----------

## pivertd

J'y crois pas... Ca marche !!!

Well, for people that have the same problem please check that :

dbus is started

hal is started

kdebase compiled with hal flag

pmount is installed

your user is in the plugdev group

pmount is working when manually inoked by the user

- You don't need ivman if you want to mount manually by clicking on the automaticly generated icon in kde. Remove ivman.

- The first thing the must work is that when you insert an usb stick, you have a popup in kde. If it's not the case, please add hal to your USE variable in /etc/make.conf and recompile hal, dbus, and kdebase.

- The second thing to check, is to look into the logs, find your device (ie /dev/sdb) the partition (ie /dev/sdb1) and try to mount it, as user, with the pmount command. Then check that there is smth in /media. 

```

pivert@pivert ~ $ pmount /dev/sdb1

pivert@pivert ~ $ ls /media/

sdb1

pivert@pivert ~ $ ls /media/sdb1/

DEVIS.xls                EM - Google4.doc             Sciences religieuses - Luc15_4.doc

pivert@pivert ~ $ pumount /dev/sdb1

pivert@pivert ~ $

```

If this doesn't work, check that your user is well in the plugdev groups.

Bye

----------

## thoughtform

thanks for this post. i think i'm almost there.

i've compiled kde with hal flag in make.conf, my user is in plugdev group, i logged out and logged back in,

all services are running, but i get this when i try pmount as the user:

scorpaen@teh ~ $ pmount /dev/sda1

Error: could not determine real path of the device: No such file or directory

here's my log

Mar 28 17:53:45 [kernel] usb 1-3: new high speed USB device using ehci_hcd and address 5

Mar 28 17:53:45 [kernel] scsi0 : SCSI emulation for USB Mass Storage devices

Mar 28 17:53:50 [kernel]   Vendor: Ut161     Model: USB2FlashStorage  Rev: 0.00

Mar 28 17:53:50 [kernel] SCSI device sda: 248000 512-byte hdwr sectors (127 MB)

Mar 28 17:53:50 [kernel] sda: Write Protect is off

Mar 28 17:53:50 [kernel] SCSI device sda: 248000 512-byte hdwr sectors (127 MB)

Mar 28 17:53:50 [kernel] sda: Write Protect is off

----------

## pivertd

Mhh it looks like your usb stick is well recognized, however, I'm estonished it cannot see the partition.

What happen if you try fdisk /dev/sda ?

Can you mount it manually (as root ) ?

Do you have the fat32 or ntfs support in your kernel (or loaded the module)

Regards,

----------

## kmare

 *Scorpaen wrote:*   

> thanks for this post. i think i'm almost there.
> 
> i've compiled kde with hal flag in make.conf, my user is in plugdev group, i logged out and logged back in,
> 
> all services are running, but i get this when i try pmount as the user:
> ...

 

just try 

```
pmount /dev/sda
```

 (not sda1.. just sda)

----------

## thoughtform

 *pivertd wrote:*   

> Mhh it looks like your usb stick is well recognized, however, I'm estonished it cannot see the partition.
> 
> What happen if you try fdisk /dev/sda ?
> 
> Can you mount it manually (as root ) ?
> ...

 

cfdisk /dev/sda says it cannot open device

i have fat32 and ntfs support in my kernel.

i looked in /dev, there is no sda1-5

this could be the problem. but i don't know how to resolve it.

i also tried pmount /dev/sda, it gives error :

Error: could not determine real path of the device: No such file or directory

----------

## pivertd

The problem is probably comming from udev, not creating the device.

I have many troubles since udev, and I'm not an udev exert   :Sad: 

You can solve your problem by manually creating the device with MAKEDEV :

```

cd /dev

MAKEDEV sd

```

----------

## thoughtform

teh dev # MAKEDEV sd

/sbin/MAKEDEV: don't know how to make device "sd"

----------

## pivertd

It's very strange that you do not have theses devices. If MAKEDEV cannot create them, I've no idea how to get them. As far as I know, udev created them. Here is what you should see.

```

pivert ~ # ls /dev/sd*

/dev/sda    /dev/sda4   /dev/sdb14  /dev/sdc1   /dev/sdc5   /dev/sdd15

/dev/sda1   /dev/sda5   /dev/sdb15  /dev/sdc10  /dev/sdc6   /dev/sdd2

/dev/sda10  /dev/sda6   /dev/sdb2   /dev/sdc11  /dev/sdc7   /dev/sdd3

/dev/sda11  /dev/sda7   /dev/sdb3   /dev/sdc12  /dev/sdc8   /dev/sdd4

/dev/sda12  /dev/sda8   /dev/sdb4   /dev/sdc13  /dev/sdc9   /dev/sdd5

/dev/sda13  /dev/sda9   /dev/sdb5   /dev/sdc14  /dev/sdd10  /dev/sdd6

/dev/sda14  /dev/sdb10  /dev/sdb6   /dev/sdc15  /dev/sdd11  /dev/sdd7

/dev/sda15  /dev/sdb11  /dev/sdb7   /dev/sdc2   /dev/sdd12  /dev/sdd8

/dev/sda2   /dev/sdb12  /dev/sdb8   /dev/sdc3   /dev/sdd13  /dev/sdd9

/dev/sda3   /dev/sdb13  /dev/sdb9   /dev/sdc4   /dev/sdd14

pivert ~ #

```

 You can eventually create them manually with mknod but you need the minor and major number.

Do  you have udev running ?

----------

## thoughtform

yes i'm setup with udev.

i don't know why i don't have the device nodes.

 :Sad: 

----------

## thoughtform

ok somehow i'd lost hotplug and coldplug.

i made sure they were started and rebooted, now i can mount the stick.

my kernel was missing hotplug so i'm compiling that in now hoping that will give me the popup in kde, as i've already compiled it with 

hal.

EDIT- 

yes it works!!!

----------

