linaro-media-create sometimes fails because the boot loopback device is not registered when formating the bootfs partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Image Tools |
Fix Released
|
High
|
Guilherme Salgado |
Bug Description
This happens occasionally but I still haven't managed to figure out what causes it. The traceback I see usually looks like this:
Cleaning up ...Done
-------
proc umounted
Warning: /tmp/beagle.img is not a block device
Disk /tmp/beagle.img: cannot get geometry
sfdisk: ERROR: sector 0 does not have an msdos signature
/tmp/beagle.img: unrecognized partition table type
No partitions found
BLKRRPART: Inappropriate ioctl for device
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).)
Formating boot partition
Traceback (most recent call last):
File "/usr/bin/
args.
File "/usr/lib/
ensure_
File "/usr/lib/
if is_partition_
File "/usr/lib/
device_path = _get_udisks_
File "/usr/lib/
return udisks.
File "/usr/lib/
return self._proxy_
File "/usr/lib/
**keywords)
File "/usr/lib/
message, timeout)
dbus.exceptions
Related branches
- Loïc Minier (community): Approve
- James Westby (community): Approve
-
Diff: 72 lines (+16/-9)2 files modifiedlinaro_media_create/partitions.py (+6/-6)
linaro_media_create/tests/test_media_create.py (+10/-3)
Changed in linaro-image-tools: | |
assignee: | nobody → Guilherme Salgado (salgado) |
importance: | Undecided → High |
status: | New → Triaged |
Changed in linaro-image-tools: | |
status: | Triaged → Fix Committed |
milestone: | none → 0.4.2 |
Changed in linaro-image-tools: | |
status: | Fix Committed → Fix Released |
This seems to be because there is a (known and expected) delay between the loopback device being registered and udisks getting to know (via udev) about it. Loïc says we could workaround it by running 'udevadm settle' before using udisks but ideally we should stick to a single tool for both the registration and later lookup.