RE: Unable to mount the SD card formatted using the DIGITAL CAMREA on Linux box

From: Mukund JB. (mukundjb_at_esntechnologies.co.in)
Date: 08/01/05

  • Next message: Ingo Molnar: "[patch] remove sys_set_zone_reclaim()"
    Date:	Mon, 1 Aug 2005 17:01:00 +0530
    To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
    
    
    

    Dear all,

    Below are my driver messages logged at initialization time & sfdisk call
    time.

    when module is initialized................

    TIFM INFO | TI init Routine Invoked!
    ReportMediaModel: ( SD card Details)
      Size = 14 [MB]
      mwCylinders = 450
      mwHeadCount = 2
      mwSectorsPerTrack = 32

    When the ioctl is invoked through the "sfdisk -lV /dev/tfa0"

    TIFM INFO | <tifm_ioctl> invoked!
    TIFM INFO | dev no. [ 0 ] sock no. [ 0 ]
    TIFM INFO | <GetGeometry_ioctl> geo.cylinders = 450
    TIFM INFO | <GetGeometry_ioctl> geo.heads = 2
    TIFM INFO | <GetGeometry_ioctl> geo.sectors = 32
    TIFM INFO | <GetGeometry_ioctl> geo.start = 0

    This means that I am giving the proper details to the user program but
    the sfdisk is printing it wrong (probably manipulation).

    And when I try to mount ......

    mount /dev/tfa0 /mnt
    FAT: bogus number of reserved sectors
    Mount: you must specify the filesystem type

    mount -tvfat /dev/tfa0 /mnt
    FAT: bogus number of reserved sectors
    Mount: wrong fs type, bad option, bas superblock on /dev/tfa0,
             or too many mounted file systems

    I have gone through the mount.c code in order to understand where I am
    exactly failing.
    mount is failing in guess_fstype_and_mount() in do_mount_syscall after
    issuing the mount sys call.
    I am attaching the source code of mount functionality which may be on
    some help to u in u8ndertaing why exactly its failing.

    Regards,
    Mukund Jampala

    >-----Original Message-----
    >From: linux-os (Dick Johnson) [mailto:linux-os@analogic.com]
    >Sent: Friday, July 29, 2005 11:39 PM
    >To: Mukund JB.
    >Cc: Lennart Sorensen; Srinivas G.; linux-kernel-Mailing-list
    >Subject: RE: Unable to mount the SD card formatted using the DIGITAL
    CAMREA
    >on Linux box
    >
    >
    >On Fri, 29 Jul 2005, linux-os (Dick Johnson) wrote:
    >
    >>
    >>
    >> camera formatted info
    >> ----------------------
    >> Disk /dev/tfa0: 448 cylinders, 2 heads, 32 sectors/track
    >> Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from
    0
    >>
    >> Device Boot Start End #cyls #blocks Id System
    >> /dev/tfa0p1 * 0+ 449 450- 14371+ 1 FAT12
    >> /dev/tfa0p2 0 - 0 0 0 Empty
    >> /dev/tfa0p3 0 - 0 0 0 Empty
    >> /dev/tfa0p4 0 - 0 0 0 Empty
    >> Warning: partition 1 extends past end of disk
    >>
    >> If it's 488 cylinders, then it should start at 0 and end at 447,
    >> not 449.
    >>
    >
    >Sorry typo, 487, not 447.
    >
    >
    >> It looks like some kind of driver error to begin with. The
    >> fact that it sometimes works should be overlooked until the
    >> driver returns the correct number of cylinders (the same
    >> number that the formatting utility gets). Check to see if
    >> your driver could return a different disk size under different
    >> conditions.
    >>
    >> On Fri, 29 Jul 2005, Mukund JB. wrote:
    >>
    >>>
    >>> Dear Lennart, Dick Johnson, Erik Mouw & All,
    >>>
    >>> Thanks for all ur precious support.
    >>>
    >>> The cannon camera (other devices too) formatted SD is indeed a
    partition
    >>> FAT12. When I said
    >>> sfdisk -l, it showed the fs ID as 1. 1 is indeed the FAT12 fs ID.
    >>>
    >>> Attached are the logs for win and camera device sfdisk -Vl
    /dev/tfa0.
    >>>
    >>> The SD card formatted in camera is partitioned FAT12 disk.
    >>> Also, the SD card formatted in windows is partitioned FAT12 disk.
    >>> (see the attachment)
    >>>
    >>> on ur suggestion I verified whether camera partition device has a
    valid
    >>> FS ID. I verified. It is FAT12. It is the same for windows
    >>> formatted device. The FS ID of both the formats is 1. i.e. FAT12.
    >>>
    >>> I has notion that my driver is not supporting partition devices.
    This
    >>> makes this clean that my driver is supporting the partition devices
    >>> (windows formatted SD). If both are partitioned where is the
    difference?
    >>>
    >>>
    >>> So, can someone please help me telling what else could be missing
    that
    >>> is creating this problem?
    >>>
    >>> Regards,
    >>> Mukund Jampala
    >>>
    >>>
    >>>> -----Original Message-----
    >>>> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
    >>>> owner@vger.kernel.org] On Behalf Of Lennart Sorensen
    >>>> Sent: Friday, July 29, 2005 7:08 PM
    >>>> To: linux-os (Dick Johnson)
    >>>> Cc: Srinivas G.; linux-kernel-Mailing-list
    >>>> Subject: Re: Unable to mount the SD card formatted using the
    DIGITAL
    >>> CAMREA
    >>>> on Linux box
    >>>>
    >>>> On Fri, Jul 29, 2005 at 08:02:14AM -0400, linux-os (Dick Johnson)
    >>> wrote:
    >>>>> Execute linux `fdisk` on the device. You may find that the
    >>>>> ID byte is wrong.
    >>>>>
    >>>>> Also, why do you need a special block device driver? The SanDisk
    >>>>> and CompacFlash devices should look like IDE drives.
    >>>>
    >>>> SD usually is secure digital (MMC compatible somewhat I believe).
    It
    >>>> does not provide IDE unlike CompactFlash. SD uses a serial
    interface
    >>> if
    >>>> I remember correctly.
    >>>>
    >>>> Len Sorensen
    >>>> -
    >>>> To unsubscribe from this list: send the line "unsubscribe
    linux-kernel"
    >>> in
    >>>> the body of a message to majordomo@vger.kernel.org
    >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
    >>>> Please read the FAQ at http://www.tux.org/lkml/
    >>>
    >>
    >> Cheers,
    >> Dick Johnson
    >> Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
    >> Warning : 98.36% of all statistics are fiction.
    >> .
    >> I apologize for the following. I tried to kill it with the above dot
    :
    >>
    >> ****************************************************************
    >> The information transmitted in this message is confidential and may
    be
    >privileged. Any review, retransmission, dissemination, or other use of
    >this information by persons or entities other than the intended
    recipient
    >is prohibited. If you are not the intended recipient, please notify
    >Analogic Corporation immediately - by replying to this message or by
    >sending an email to DeliveryErrors@analogic.com - and destroy all
    copies of
    >this information, including any attachments, without reading or
    disclosing
    >them.
    >>
    >> Thank you.
    >> -
    >> To unsubscribe from this list: send the line "unsubscribe
    linux-kernel"
    >in
    >> the body of a message to majordomo@vger.kernel.org
    >> More majordomo info at http://vger.kernel.org/majordomo-info.html
    >> Please read the FAQ at http://www.tux.org/lkml/
    >>
    >
    >Cheers,
    >Dick Johnson
    >Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
    >Warning : 98.36% of all statistics are fiction.
    >.
    >I apologize for the following. I tried to kill it with the above dot :
    >
    >****************************************************************
    >The information transmitted in this message is confidential and may be
    >privileged. Any review, retransmission, dissemination, or other use of
    >this information by persons or entities other than the intended
    recipient
    >is prohibited. If you are not the intended recipient, please notify
    >Analogic Corporation immediately - by replying to this message or by
    >sending an email to DeliveryErrors@analogic.com - and destroy all
    copies of
    >this information, including any attachments, without reading or
    disclosing
    >them.
    >
    >
    >Thank you.

    
    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/




  • Next message: Ingo Molnar: "[patch] remove sys_set_zone_reclaim()"

    Relevant Pages

    • RE: Unable to mount the SD card formatted using the DIGITAL CAMREA on Linux box
      ... yet you send copies of mount source. ... Mount works, it's your driver ... If you are not the intended recipient, ...
      (Linux-Kernel)
    • Re: Cannot mount cdrom? Pls help
      ... checking for saved MCA error records ... CPU 1 SAL log contains MCA error record ... > EFI Time Services Driver v0.4 ... I also cannot mount /media/cdrom. ...
      (linux.redhat.misc)
    • Re: UDC performance on PXA270
      ... I did some more tests on my PXA270 UDC using the Mass_Storage_Class. ... Mount my Flash File System as the Mass Storage: ... Mount a USB Stick as the Mass Storage: ... driver ...
      (microsoft.public.windowsce.platbuilder)
    • Re: How to mount a volume as a current user.
      ... that, it requires admin privileges. ... The driver I wrote is not the trouble. ... So my question is How can a user mount a volume? ... I know how to put NTFS rights on the root of the volume I mount. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: cant mount drive
      ... > through the driver that runs the device. ... > mulfunctioning or something else is fixing itself on the cdrom. ... When I bootup it is giving an error of mount fd type ro is not ... The author of cdrecord should not be bothered with problems in ...
      (Fedora)