Ticket #4707 (closed defect: wontfix)

Opened 7 months ago

Last modified 4 months ago

Unable to mount ext3 partition of device

Reported by: andersromeo Owned by: kovidgoyal
Priority: minor Milestone:
Component: Command Line Interface Version: trunk
Keywords: Cc: andersromeo@…

Description

Trying to attach my Nokia N810 and running "calibre-debug -d" from Linux with the current code (after 0.6.36) results in a mount failure:

Devices possibly connected: Nokia 810 Device Interface, mount: wrong fs type, bad option, bad superblock on /dev/sdb1,

missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so

mount: wrong fs type, bad option, bad superblock on /dev/sdb1,

missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so

Trying to open Nokia 810 Device Interface ... failed Opening of the following devices failed <calibre.devices.nokia.driver.N810 object at 0x928028c> Traceback (most recent call last):

File "/home/kovid/build/calibre/src/calibre/devices/init.py", line 84, in debug File "/home/kovid/build/calibre/src/calibre/devices/usbms/device.py", line 621, in open File "/home/kovid/build/calibre/src/calibre/devices/usbms/device.py", line 597, in open_linux

Device Error?: Unable to mount main memory (Error code: 32)

I think this is due to my reformatting of the device with the ext3 file system, while the code in linux_mount_helper.c, line 74, seems to insist on mounting a vfat partition.

Why not simply drop the "-t vfat" option (and potentially other ones as well)? Manual mounting (as root) via "mount /dev/sdb1 /media/N810\ Main\ Memory" works like a charm.

Change History

comment:1 Changed 7 months ago by kovidgoyal

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in branch trunk. The fix will be in the next release.

comment:2 Changed 7 months ago by andersromeo

  • Status changed from closed to reopened
  • Resolution fixed deleted

Thanks for the quick reply! Unfortunately, the problem persists in the 0.6.37 release. The binary calibre-mount-helper still contains the string "vfat", while I was unable to locate it in the bzr sources. Maybe there has been a problem with the build process?

comment:3 Changed 7 months ago by kovidgoyal

  • Status changed from reopened to closed
  • Resolution set to fixed

oops will be fixed in next release.

comment:4 Changed 7 months ago by andersromeo

  • Status changed from closed to reopened
  • Resolution fixed deleted

The problem persists in version 0.6.39; dmesg shows the error message

EXT3-fs: Unrecognized mount option "quiet" or missing value .

The reason is probably that src/calibre/devices/linux_mount_helper.c, line 68, contains a number of mount options that are valid only for fat/vfat. Currently, it reads:

snprintf(options, 1000, "rw,noexec,nosuid,sync,nodev,quiet,shortname=mixed,uid=%d,gid=%d,umask=077,fmask=0177,dmask=0077,utf8,iocharset=iso8859-1", getuid(), getgid());

I suggest to replace it by

snprintf(options, 1000, "rw,noexec,nosuid,sync,nodev");

At least, these options work when mounting by hand.

comment:5 Changed 7 months ago by kovidgoyal

  • Status changed from reopened to closed
  • Resolution set to wontfix

The other options are needed for correct operation of vfat partitions. I suggest you setup device automounting in your OS, then calibre wont need to mount the device.

Note: See TracTickets for help on using tickets.