linaro-android-media-create crashes when trying to partition a sd card

Bug #902227 reported by LetoThe2nd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
New
Undecided
Unassigned

Bug Description

following these steps
https://android-build.linaro.org/builds/~linaro-android/staging-panda-11.12-release/#build=2
fails:

jd@jd-pandadev:~/pandaboard/staging-panda-11.12-release$ ./linaro-image-tools/linaro-android-media-create --mmc /dev/sdb --dev panda --system system.tar.bz2 --userdata userdata.tar.bz2 --boot boot.tar.bz2

I see...
Device Mount point Size
/dev/sda none 81920MB
/dev/sda1 / 80895MB
/dev/sda2 none 1022MB
/dev/sda5 none 1022MB
/dev/sdb none 7580MB
/dev/sdc none 0MB
/dev/sdd none 0MB
/dev/sde none 0MB
/dev/sr0 none 0MB
Are you 100% sure, on selecting [/dev/sdb] (y/n)? y
Checking that no-one is using this disk right now ...
OK
Warning: bad partition start (earliest 1843201)
partition ends on cylinder 1023, beyond the end of the disk
partition ends on cylinder 1023, beyond the end of the disk
Warning: partition 1 does not end at a cylinder boundary
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Traceback (most recent call last):
  File "./linaro-image-tools/linaro-android-media-create", line 138, in <module>
    args.should_create_partitions, args.should_align_boot_part)
  File "/home/jd/pandaboard/staging-panda-11.12-release/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 66, in setup_android_partitions
    get_android_partitions_for_media (media, board_config)
  File "/home/jd/pandaboard/staging-panda-11.12-release/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 372, in get_android_partitions_for_media
    media.path, 1 + board_config.mmc_part_offset)
  File "/home/jd/pandaboard/staging-panda-11.12-release/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 432, in _get_device_file_for_partition_number
    device_path = _get_udisks_device_path(dev_file)
  File "/home/jd/pandaboard/staging-panda-11.12-release/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 447, in _get_udisks_device_path
    return udisks.get_dbus_method('FindDeviceByDeviceFile')(device)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.UDisks.Error.Failed: No such device
jd@jd-pandadev:~/pandaboard/staging-panda-11.12-release$

Revision history for this message
Guilherme Salgado (salgado) wrote :

I thought this could be a dupe of bug 717129 so I suggested the reporter give the branch there a try but it didn't seem to help:

Are you 100% sure, on selecting [/dev/sdb] (y/n)? y
Sleeping for 1 second(s) to wait for the partition to settle
Checking that no-one is using this disk right now ...
OK
Warning: bad partition start (earliest 1318913)
partition ends on cylinder 1023, beyond the end of the disk
partition ends on cylinder 1023, beyond the end of the disk
Warning: partition 1 does not end at a cylinder boundary
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Sleeping for 1 second(s) to wait for the partition to settle
Traceback (most recent call last):
  File "./717129/linaro-android-media-create", line 138, in <module>
    args.should_create_partitions, args.should_align_boot_part)
  File "/home/jd/pandaboard/staging-panda-11.12-release/717129/linaro_image_tools/media_create/partitions.py", line 68, in setup_android_partitions
    get_android_partitions_for_media (media, board_config)
  File "/home/jd/pandaboard/staging-panda-11.12-release/717129/linaro_image_tools/media_create/partitions.py", line 375, in get_android_partitions_for_media
    media.path, 1 + board_config.mmc_part_offset)
  File "/home/jd/pandaboard/staging-panda-11.12-release/717129/linaro_image_tools/media_create/partitions.py", line 444, in _get_device_file_for_partition_number
    device_path = _get_udisks_device_path(dev_file)
  File "/home/jd/pandaboard/staging-panda-11.12-release/717129/linaro_image_tools/media_create/partitions.py", line 459, in _get_udisks_device_path
    return udisks.get_dbus_method('FindDeviceByDeviceFile')(device)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.UDisks.Error.Failed: No such device
jd@jd-pandadev:~/pandaboard/staging-panda-11.12-release$

Revision history for this message
Guilherme Salgado (salgado) wrote :

Can you try running l-a-m-c from lp:~salgado/linaro-image-tools/717129? It'd also be good to know on what system you're running so that we can try and reproduce it.

Revision history for this message
Georgy Redkozubov (gesha) wrote :

I saw the same issue once on my debian system, and I think it is related to the udev functioning. The reason is that there are nodes for partitions in /dev but no real partitions on SD. I haven't yet figured out why this happens, but there is a workaround.
Try to remove dev nodes for partitions except the device, for example if you have SD card is /dev/sdb, than remove all files like /dev/sdbX, where X=1,2,3,... and then rerun l-i-t.

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.