Je suis en train d'essayer de comprendre pourquoi l'iPod Mini est monté automatiquement et l'iPod Nano ne l'est pas.
Avec le Mini:
$dmesg
---/---
usb 3-2.3: new high speed USB device using ehci_hcd and address 4
usb 3-2.3: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
Vendor: Apple Model: iPod Rev: 1.62
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sdb: 7999487 512-byte hdwr sectors (4096 MB)
sdb: Write Protect is off
sdb: Mode Sense: 64 00 00 08
sdb: assuming drive cache: write through
SCSI device sdb: 7999487 512-byte hdwr sectors (4096 MB)
sdb: Write Protect is off
sdb: Mode Sense: 64 00 00 08
sdb: assuming drive cache: write through
sdb: sdb1 sdb2
sd 2:0:0:0: Attached scsi removable disk sdb
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
SELinux: initialized (dev sdb2, type vfat), uses genfs_contexts
(Voir mon message précédent pour le Nano)
Ils sont donc tous les deux reconnus comme "Vendor: Apple Model: Ipod" et la seule différence notable entre les deux est la taille des secteurs 512 bytes pour le Mini qui est monté automatiquement et 2048 bytes pour le Nano qui lui n'est pas monté automatiquement.
Voici ce qu'affiche fdisk sur le Mini qui est monté automatiquement
$ sudo fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 4095 MB, 4095737344 bytes
255 heads, 63 sectors/track, 497 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 5 40131 0 Empty
/dev/sdb2 * 6 497 3951990 b W95 FAT32
Command (m for help):
et sur le Nano qui lui n'est pas monté automatiquement :
$ sudo fdisk /dev/sdb
Password:
Note: sector size is 2048 (not 512)
Command (m for help): p
Disk /dev/sdb: 4060 MB, 4060086272 bytes
255 heads, 63 sectors/track, 123 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 3 96264 0 Empty
/dev/sdb2 4 123 3855600 b W95 FAT32
Si je regarde dans le fichier /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi j'ai :
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.category" string="storage">
<!-- Apple iPod - TODO: use USB ids to determine exact output formats -->
<match key="storage.vendor" contains="Apple">
<match key="storage.model" contains="iPod">
<append key="info.capabilities" type="strlist">portable_audio_player</append>
<merge key="info.category" type="string">portable_audio_player</merge>
<merge key="portable_audio_player.access_method" type="string">storage</merge>
<merge key="portable_audio_player.type" type="string">ipod</merge>
<merge key="portable_audio_player.storage_device" type="copy_property">info.udi</merge>
<append key="portable_audio_player.output_formats" type="strlist">audio/mpeg</append>
<append key="portable_audio_player.output_formats" type="strlist">audio/aac</append>
<merge key="storage.requires_eject" type="bool">true</merge>
</match>
</match>
---/---
Il n'y a donc pas de détermination du modèle à ce niveau (TODO: ....)
Si je monte le Nano manuellement ça fonctionne:
$ sudo mkdir /media/IPOD
$ sudo mount -t vfat /dev/sdb2 /media/IPOD
$ ll /media/IPOD
total 64
drwxr-xr-x 2 root root 16384 déc 15 19:03 Calendars
drwxr-xr-x 2 root root 16384 déc 15 19:03 Contacts
drwxr-xr-x 7 root root 16384 déc 15 19:03 iPod_Control
drwxr-xr-x 2 root root 16384 déc 15 19:03 Notes
Any idea ???
(Le Nano étant à ma femme je ne peux pas essayer de reformater sous peine de divorce immédiat....)