Bug 89711 - udisksctl loop-setup does not mount some ISOs
Summary: udisksctl loop-setup does not mount some ISOs
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Martin Pitt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 07:59 UTC by Aaditya Bagga
Modified: 2015-06-29 14:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
udisksctl monitor for iso that showed up in file manager (4.11 KB, text/plain)
2015-03-22 07:59 UTC, Aaditya Bagga
Details
udisksctl monitor for iso that *did not show up* in file manager (2.40 KB, text/plain)
2015-03-22 08:00 UTC, Aaditya Bagga
Details
Don't ignore isohybrid udf filesystems (1.04 KB, patch)
2015-06-09 22:15 UTC, Ross Lagerwall
Details | Splinter Review

Description Aaditya Bagga 2015-03-22 07:59:02 UTC
Created attachment 114518 [details]
udisksctl monitor for iso that showed up in file manager

Hi,

Using udisks2 2.1.5-1 on Manjaro Linux.

What I noticed was that udisksctl was able to mount some ISOs using the command `udisksctl loop-setup -r -f <iso-file>` and they showed up in the file manager, but was unable to do this with some other ISOs.

The output from the terminal was same in both cases:

1. This got setup correctly and was shown in file manager:

$ udisksctl loop-setup -r -f iso/debian-7.3.0-amd64-CD-1.iso
Mapped file iso/debian-7.3.0-amd64-CD-1.iso as /dev/loop24.

2. This did not show up in file manager:

$ udisksctl loop-setup -r -f iso/debian-7.4.0-i386-xfce-CD-1.iso
Mapped file iso/debian-7.4.0-i386-xfce-CD-1.iso as /dev/loop23.

So I did some inspection using `udisksctl monitor`

1. This is with ISO that was shown in file manager:

$ udisksctl monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
13:10:19.161: The udisks-daemon is running (name-owner :1.19).
13:10:23.086: /org/freedesktop/UDisks2/block_devices/loop24: org.freedesktop.UDisks2.Block: Properties Changed
  IdUUID:               2013-12-15-05-11-42-00
  IdLabel:              Debian 7.3.0 amd64 1
  IdVersion:            Joliet Extension
  IdType:               iso9660
  IdUsage:              filesystem
  Size:                 652214272
  Symlinks:             /dev/disk/by-label/Debian\x207.3.0\x20amd64\x201
                        /dev/disk/by-uuid/2013-12-15-05-11-42-00
13:10:23.088: /org/freedesktop/UDisks2/block_devices/loop24: org.freedesktop.UDisks2.Loop: Properties Changed
  BackingFile:          /home/aaditya/iso/debian-7.3.0-amd64-CD-1.iso
13:10:23.088: /org/freedesktop/UDisks2/block_devices/loop24: org.freedesktop.UDisks2.PartitionTable: Properties Changed
  Type:                 dos
13:10:23.089: Removed /org/freedesktop/UDisks2/block_devices/loop24p1
13:10:23.093: Removed /org/freedesktop/UDisks2/block_devices/loop24p2
13:10:23.111: Added /org/freedesktop/UDisks2/block_devices/loop24p2
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/loop24p2
    DeviceNumber:               66331
    Drive:                      '/'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 true
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 true
    Id:                         
    IdLabel:                    Debian 7.3.0 amd64 1
    IdType:                     vfat
    IdUUID:                     6BBA-8E77
    IdUsage:                    filesystem
    IdVersion:                  FAT12
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/loop24p2
    ReadOnly:                   true
    Size:                       458752
    Symlinks:                   /dev/disk/by-label/Debian\x207.3.0\x20amd64\x201
                                /dev/disk/by-uuid/6BBA-8E77
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             2
    Offset:             537808896
    Size:               458752
    Table:              '/org/freedesktop/UDisks2/block_devices/loop24'
    Type:               0xef
    UUID:               4db7653e-02
13:10:23.114: Added /org/freedesktop/UDisks2/block_devices/loop24p1
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/loop24p1
    DeviceNumber:               66330
    Drive:                      '/'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 true
    Id:                         
    IdLabel:                    Debian 7.3.0 amd64 1
    IdType:                     iso9660
    IdUUID:                     2013-12-15-05-11-42-00
    IdUsage:                    filesystem
    IdVersion:                  Joliet Extension
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/loop24p1
    ReadOnly:                   true
    Size:                       652214272
    Symlinks:                   /dev/disk/by-label/Debian\x207.3.0\x20amd64\x201
                                /dev/disk/by-uuid/2013-12-15-05-11-42-00
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              128
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             0
    Size:               652214272
    Table:              '/org/freedesktop/UDisks2/block_devices/loop24'
    Type:               0x00
    UUID:               4db7653e-01


2. And this is with ISO that does not show up in file manager:

13:11:16.782: /org/freedesktop/UDisks2/block_devices/loop28: Added interface org.freedesktop.UDisks2.PartitionTable
  Type:                 dos
13:11:16.783: /org/freedesktop/UDisks2/block_devices/loop28: org.freedesktop.UDisks2.Block: Properties Changed
  IdUUID:               2014-02-08-12-27-26-00
  IdLabel:              Debian 7.4.0 i386 1
  IdVersion:            Joliet Extension
  IdType:               iso9660
  IdUsage:              filesystem
  Size:                 659554304
  Symlinks:             /dev/disk/by-label/Debian\x207.4.0\x20i386\x201
                        /dev/disk/by-uuid/2014-02-08-12-27-26-00
13:11:16.784: /org/freedesktop/UDisks2/block_devices/loop28: org.freedesktop.UDisks2.Loop: Properties Changed
  BackingFile:          /home/aaditya/iso/debian-7.4.0-i386-xfce-CD-1.iso
13:11:16.804: Added /org/freedesktop/UDisks2/block_devices/loop28p1
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/loop28p1
    DeviceNumber:               66328
    Drive:                      '/'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 true
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 true
    Id:                         
    IdLabel:                    Debian 7.4.0 i386 1
    IdType:                     iso9660
    IdUUID:                     2014-02-08-12-27-26-00
    IdUsage:                    filesystem
    IdVersion:                  Joliet Extension
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/loop28p1
    ReadOnly:                   true
    Size:                       659521536
    Symlinks:                   /dev/disk/by-label/Debian\x207.4.0\x20i386\x201
                                /dev/disk/by-uuid/2014-02-08-12-27-26-00
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              128
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             32768
    Size:               659521536
    Table:              '/org/freedesktop/UDisks2/block_devices/loop28'
    Type:               0x17
    UUID:               0c7af72e-01


In the case where I cannot see it in the file manager, if I mount it with `udisksctl mount -b <block-dev>`, it appears in the file manager.

$ udisksctl mount -b /dev/loop28p1
Mounted /dev/loop28p1 at /run/media/aaditya/Debian 7.4.0 i386 1.

I was able to reproduce with Thunar, pcmanfm, and nautilus, under Xfce.
Comment 1 Aaditya Bagga 2015-03-22 08:00:02 UTC
Created attachment 114519 [details]
udisksctl monitor for iso that *did not show up* in file manager
Comment 2 Ross Lagerwall 2015-06-08 20:06:31 UTC
The main partition for the iso which doesn't show up is marked as hidden which is why it isn't shown:

$ fdisk -l ~/Downloads/debian-7.4.0-i386-xfce-CD-1.iso 
Disk /home/ross/Downloads/debian-7.4.0-i386-xfce-CD-1.iso: 629 MiB, 659554304 bytes, 1288192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0c7af72e

Device                                                Boot Start     End Sectors  Size Id Type
/home/ross/Downloads/debian-7.4.0-i386-xfce-CD-1.iso1 *       64 1288191 1288128  629M 17 Hidden HPFS/NTFS

This is probably not a bug.
Comment 3 Aaditya Bagga 2015-06-09 02:25:24 UTC
Thx for the research Ross.

The Debian ISO posted earlier is not an isolated case, there are others as well:

$ fdisk -l crunchbang-11-20130506-amd64.iso 
Disk crunchbang-11-20130506-amd64.iso: 739 MiB, 774897664 bytes, 1513472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4ed6f18f

Device                            Boot Start     End Sectors  Size Id Type
crunchbang-11-20130506-amd64.iso1 *        0 1513471 1513472  739M 17 Hidden HPFS/NTFS

$ fdisk -l clonezilla-live-2.2.4-7-amd64.iso 
Disk clonezilla-live-2.2.4-7-amd64.iso: 145 MiB, 152043520 bytes, 296960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000713b6

Device                             Boot Start    End Sectors  Size Id Type
clonezilla-live-2.2.4-7-amd64.iso1 *        0 296959  296960  145M 17 Hidden HPFS/NTFS

$ fdisk -l NetBSD-6.1.4-amd64.iso 
Disk NetBSD-6.1.4-amd64.iso: 331 MiB, 347023360 bytes, 677780 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

In most cases I was able to reproduce your findings.

There was only one exception:

$ udisksctl loop-setup -r -f cls-14.12.1-x86_64.iso 
Mapped file cls-14.12.1-x86_64.iso as /dev/loop0.

$ fdisk -l cls-14.12.1-x86_64.iso 
Disk cls-14.12.1-x86_64.iso: 662 MiB, 694157312 bytes, 1355776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7fab6338

Device                  Boot Start     End Sectors  Size Id Type
cls-14.12.1-x86_64.iso1 *        0 1355775 1355776  662M  0 Empty
cls-14.12.1-x86_64.iso2       3712    4543     832  416K ef EFI (FAT-12/16/32)

The ISO above did not show up in the file manager.

So it seems the issue is with the ISOs..
Comment 4 Ross Lagerwall 2015-06-09 22:15:55 UTC
Created attachment 116408 [details] [review]
Don't ignore isohybrid udf filesystems

Extend the hack to show the main partition of isohybrid iso9660
isos to work with udf isos too.
Comment 5 Ross Lagerwall 2015-06-09 22:17:21 UTC
The attached patch should fix the problem for cls-14.12.1-x86_64.iso.

For the other discs that mark the partition as hidden, it is expected that udisks does not show the iso in the file manager.
Comment 6 Aaditya Bagga 2015-06-10 02:02:25 UTC
Thx Ross, making that change in shows the CLS ISO in the file manager.
Comment 7 Martin Pitt 2015-06-29 14:55:17 UTC
Thanks Ross! Pushed your patch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.