Dear all, I have problem in mounting my SD device. I have a commotion in resolving an issue with sfdisk info. The sfdisk displays my device partition and cylinder info as follows.
#sfdisk -lV /dev/tfa0 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 The SD card driver is returning the following info to the HDIO_GETGEO ioctl called from sfdisk. ------------- driver messages --------------------------- TIFM INFO | <tifm_ioctl> invoked! 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 When we have a close look at the cylinder info returned by driver & sfdisk, they differ. When I refer to the SD card manufacture spec, it reveals the n/o cylinders are 450. So, driver is returning the exact/proper cylinder value. Why is sfdisk giving improper cylinder info? Can some one explain me how this mismatch info between the driver and application can effect my mounting of my device? I assume HDIO_GETGEO is the only way sfdisk communicates with the driver. Regards, Mukund Jampala >-----Original Message----- >From: Erik Mouw [mailto:[EMAIL PROTECTED] >Sent: Friday, July 29, 2005 5:56 PM >To: Srinivas G. >Cc: [EMAIL PROTECTED] >Subject: Re: Unable to mount the SD card formatted using the DIGITAL CAMREA >on Linux box > >(don't write to me personally, I do read the list) > >On Fri, Jul 29, 2005 at 04:56:43PM +0530, Srinivas G. wrote: >> We have developed a Block Device Driver to handle the flash media >> devices in Linux 2.6.x kernel. It is working fine. We are able to mount >> the SD cards that are formatted on Windows systems, but we unable mount >> the cards that are formatted using the DIGITAL CAMERA. >> >> We have found one thing that the Windows and Digital Camera both are >> formatting the SD cards in FAT12 only. But why we are not able to mount >> the SD cards on Linux Box that are formatted using the Digital Camera. > >Probably because the camera and linux disagree about the geometry in >CHS (cylinder, head, sector) of the flash device. > >Each partition table entry contains the start and end CHS of that >partition. However, since a flash device (and also modern hard drives) >doesn't have a meaningful geometry value, the same information is also >encoded in logical sectors (start and size of the partition). > >If the logical information is zero, the kernel falls back onto the CHS >information in the partition table and has to assume a certain >geometry. If that assumption differs from the assumption of the camera, >the partition boundaries will be wrong and you will not be able to >mount the partition directly. However, you can figure out the start of >the partition by hand, and use a loop device to get at the correct >offset. > > >Erik > >-- >Erik Mouw >[EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
