usb-creator does not work with usb/ide disk enclosure

Bug #289599 reported by Zygmunt Krynicki
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HAL
Invalid
Undecided
Unassigned
usb-creator (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by Sune Keller

Bug Description

Binary package hint: usb-creator

(everything here was running under vmware fusion on a mac)

This issue affects intrepid-beta and usb-creator version 0.1.9

I have a generic ide-to-usb disk enclosure attached to my virtual machine. The disk shows up in nautilus and works as expected. The relevant lsusb entry is:
Bus 002 Device 011: ID 058f:6391 Alcor Micro Corp.

I manually formatted that disk to have one vfat partition. I would expect it to show up in usb-creator but it did not.
After inspecting the code the issue was caused by the fact that usb-creator requires removable devices.

The following patch makes it possible to use usb-creator in my case:

root@intrepid-beta:~# diff -u /usr/share/pyshared/usbcreator/backend.py backend.py
--- /usr/share/pyshared/usbcreator/backend.py 2008-10-09 17:19:40.000000000 +0200
+++ backend.py 2008-10-26 20:06:20.000000000 +0100
@@ -353,8 +353,7 @@
             d = dbus.Interface(dev_obj, 'org.freedesktop.Hal.Device')
             if d.GetProperty('storage.drive_type') != 'disk':
                 continue
- if d.GetProperty('storage.bus') == 'usb' and \
- d.GetProperty('storage.removable'):
+ if d.GetProperty('storage.bus') == 'usb':
                 if d.GetProperty('block.is_volume'):
                     if d.GetProperty('volume.fstype') == 'vfat':
                         self.add_device(d)

The person called Persia had this insight on #ubuntu-devel:

(20:03:21) persia: zyga, Surely that's a HAL bug though, rather than a usb-creator bug.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is the output of hal-device for that particular drive *after* patching usb-creator and installing ubuntu onto it:

0: udi = '/org/freedesktop/Hal/devices/volume_uuid_C7E3_1AF8'
  volume.fsversion = 'FAT32' (string)
  volume.uuid = 'C7E3-1AF8' (string)
  volume.label = 'UBUNTU' (string)
  volume.mount_point = '/media/UBUNTU' (string)
  volume.is_mounted = true (bool)
  linux.hotplug_type = 3 (0x3) (int)
  volume.is_mounted_read_only = false (bool)
  info.product = 'UBUNTU' (string)
  volume.linux.is_device_mapper = false (bool)
  info.capabilities = { 'volume', 'block' } (string list)
  volume.is_disc = false (bool)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_C7E3_1AF8' (string)
  block.device = '/dev/sdb1' (string)
  volume.is_partition = true (bool)
  block.major = 8 (0x8) (int)
  volume.partition.number = 1 (0x1) (int)
  block.minor = 17 (0x11) (int)
  volume.block_size = 512 (0x200) (int)
  block.is_volume = true (bool)
  volume.num_blocks = 78242913 (0x4a9e461) (uint64)
  volume.size = 40060371456 (0x953c8c200) (uint64)
  volume.partition.start = 32256 (0x7e00) (uint64)
  info.category = 'volume' (string)
  volume.partition.media_size = 40060403712 (0x953c94000) (uint64)
  volume.partition.scheme = 'mbr' (string)
  volume.partition.type = '0x0b' (string)
  storage.model = '' (string)
  volume.partition.label = '' (string)
  volume.partition.uuid = '' (string)
  volume.partition.flags = { } (string list)
  volume.ignore = false (bool)
  org.freedesktop.Hal.Device.Volume.method_names = { 'Mount', 'Unmount', 'Eject' } (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = { 'ssas', 'as', 'as' } (string list)
  org.freedesktop.Hal.Device.Volume.method_argnames = { 'mount_point fstype extra_options', 'extra_options', 'extra_options' } (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = { 'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject' } (string list)
  volume.mount.valid_options = { 'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush' } (string list)
  volume.unmount.valid_options = { 'lazy' } (string list)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb2/2-1/2-1:1.0/host12/target12:0:0/12:0:0:0/block/sdb/sdb1' (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Disk_0_0' (string)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Disk_0_0' (string)
  info.interfaces = { 'org.freedesktop.Hal.Device.Volume' } (string list)
  volume.fstype = 'vfat' (string)
  volume.fsusage = 'filesystem' (string)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

More hal-device output, it's clearly visible that storage.removable is false

1: udi = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Disk_0_0'
  storage.no_partitions_hint = false (bool)
  storage.media_check_enabled = false (bool)
  storage.hotpluggable = true (bool)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb2/2-1/2-1:1.0/host12/target12:0:0/12:0:0:0/block/sdb' (string)
  storage.automount_enabled_hint = true (bool)
  storage.requires_eject = false (bool)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_58f_6391_noserial_if0_scsi_host_0_scsi_device_lun0' (string)
  storage.drive_type = 'disk' (string)
  info.vendor = 'Generic' (string)
  info.product = 'USB Disk' (string)
  info.category = 'storage' (string)
  storage.partitioning_scheme = 'mbr' (string)
  storage.model = 'USB Disk' (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Disk_0_0' (string)
  storage.vendor = 'Generic' (string)
  linux.hotplug_type = 3 (0x3) (int)
  block.device = '/dev/sdb' (string)
  storage.serial = 'Generic_USB_Disk-0:0' (string)
  storage.lun = 0 (0x0) (int)
  block.major = 8 (0x8) (int)
  storage.firmware_version = '9.02' (string)
  storage.originating_device = '/org/freedesktop/Hal/devices/usb_device_58f_6391_noserial_if0' (string)
  storage.removable.media_size = 40060403712 (0x953c94000) (uint64)
  block.minor = 16 (0x10) (int)
  storage.removable.media_available = true (bool)
  info.capabilities = { 'storage', 'block' } (string list)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Disk_0_0' (string)
  block.is_volume = false (bool)
  storage.removable = false (bool)
  storage.bus = 'usb' (string)
  storage.size = 40060403712 (0x953c94000) (uint64)

Revision history for this message
Sune Keller (sune-keller) wrote :

I can confirm this on jaunty. Patching usb-creator makes it add my usb/ide enclosure disk to the list of possible install destinations.
storage.removable is likewise false for my device.

lsusb gives:
"Bus 004 Device 004: ID 067b:3507 Prolific Technology, Inc. PL3507 ATAPI6 Bridge"

Revision history for this message
Evan (ev) wrote :

This is fixed in karmic with the switch to a devicekit-disks backend.

Changed in hal:
status: New → Invalid
Changed in usb-creator (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.