Je voudrai monter des disques dur externes usb avec pmount, or voici l'erreur que je rencontre quand je lance pmount avec le dev sda1 :
Code : Tout sélectionner
$ pmount sda1
Erreur : le périphérique /dev/sda1 n'est pas amovible
Code : Tout sélectionner
$ pmount --debug sda1
sda1 cannot be resolved to a proper device node
trying to prepend '/dev/' to device argument, now /dev/sda1
mount point to be used: /media/sda1
no iocharset given, current locale encoding is UTF-8
locale encoding uses UTF-8, setting iocharset to 'utf8'
Cleaning lock directory /var/lock/pmount_dev_sda1
device_whitelist: checking /etc/pmount.allow...
device_whitlisted(): nothing matched, returning 0
find_sysfs_device: looking for sysfs directory for device 8:1
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram0 (1:0)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram1 (1:1)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram2 (1:2)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram3 (1:3)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram4 (1:4)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram5 (1:5)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram6 (1:6)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram7 (1:7)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram8 (1:8)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram9 (1:9)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram10 (1:10)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram11 (1:11)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram12 (1:12)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram13 (1:13)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram14 (1:14)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/ram15 (1:15)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop0 (7:0)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop1 (7:1)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop2 (7:2)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop3 (7:3)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop4 (7:4)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop5 (7:5)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop6 (7:6)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/loop7 (7:7)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/hda (3:0)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/hdc (22:0)
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/sda (8:0)
find_sysfs_device: major device numbers match
find_sysfs_device: minor device numbers do not match, checking partitions...
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:0
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:1
find_sysfs_device: -> partition matches, belongs to block device /sys/block/sda
device_removable: corresponding block device for /dev/sda1 is /sys/block/sda
get_blockdev_attr: value of /sys/block/sda/removable == 0
find_bus_ancestry: device 3:0:0:0 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0, bus ) does not match, trying parent
find_bus_ancestry: device target3:0:0 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3/3-2/3-2:1.0/host3/target3:0:0, bus ) does not match, trying parent
find_bus_ancestry: device host3 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3/3-2/3-2:1.0/host3, bus ) does not match, trying parent
find_bus_ancestry: device 3-2:1.0 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3/3-2/3-2:1.0, bus ) does not match, trying parent
find_bus_ancestry: device 3-2 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3/3-2, bus ) does not match, trying parent
find_bus_ancestry: device usb3 (path /sys/devices/pci0000:00/0000:00:0c.2/usb3, bus ) does not match, trying parent
find_bus_ancestry: device 0000:00:0c.2 (path /sys/devices/pci0000:00/0000:00:0c.2, bus ) does not match, trying parent
find_bus_ancestry: device pci0000:00 (path /sys/devices/pci0000:00, bus ) does not match, trying parent
find_bus_ancestry: dev == NULL, fail
Erreur : le périphérique /dev/sda1 n'est pas amovible
policy check failed
Code : Tout sélectionner
get_blockdev_attr: value of /sys/block/sda/removable == 0
Code : Tout sélectionner
# echo -n "1" >/sys/block/sda/removable
bash: /sys/block/sda/removable: Permission non accordée
En effet, si c'était possible j'aurai pu faire une règle udev de ce style :
Code : Tout sélectionner
KERNEL=="sd*", SUBSYSTEM=="block", SUBSYSTEMS=="usb", ATTR{removable}="1"
Avez-vous une idée comment faire pour faire entendre au kernel que tout périphérique de block sur branché sur port USB est un périphérique amovible ?
Ça marche avec des clés usb flash, pourquoi il me fait ièch avec les disques durs usb ?
Je précise que je n'utilise pas d'environnement gnome, ni kde et que j'envisage sans doute d'utiliser ivman. Mais je veux d'abord que ça marche avec pmount.
Je sais que l'on peut utiliser /etc/pmount.allow, mais si c'est pour faire du cas par cas c'est bof.
D'autre part, je pourrais très bien faire un règle udev qui me dit que tel disque avec tel S/N je le nomme dans dev avec un ptit nom puis le mettre dans pmount.allow. Mais je veux que ça fonctionne avec n'importe quel disque dur externe (ex: celui d'un pote) et tout ça en user non privilégié.
D'avance, merci pour toutes réponses que vous pourrez m'apporter !