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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Erik & all,

Sorry for the delay in my latest updates. 
I was required to fix the partition problem first.

I have an update in gathering some partition info about in SD cards
formatted in windows and Camera.

I tried printing data from the ox1BE offset of 0th sector on windows
formatted SD card and Camera formatted SD card.

Please see the details below.

Windows SD_0_Sector details at 0x1BE offset
------------------------------------------

bootable 		= 111 	  ( 0x01BE)
beg-chs.heads 	= 116			.
beg-chs.sect 	= 104			.
beg-chs.cylin 	= 101			.
sys-type 		= 114			.
end-chs.heads 	= 32			.
end-chs.sect 	= 109			.
end-chs.cylin 	= 101			.
start sect  	= 778135908		.
n/o sec in part = 1141509631		.


Camera SD_0_Sector details at 0x1BE offset
------------------------------------------

bootable 		= 128
beg-chs.heads 	= 1
beg-chs.sect 	= 26
beg-chs.cylin 	= 0
sys-type 		= 1
end-chs.heads 	= 1
end-chs.sect 	= 96
end-chs.cylin 	= 193
start sect  	= 57
n/o sec in part = 28743

To the surprise of me, the windows partition table data looks corrupted
and the camera created partition table looks tome meaningful. But,
windows SD card mounts and camera SD card fails to mount.

I am planning to get the FAT12 details from the first partition of
camera starting at sector 57 as you can see in the 'start sect'
variable.

Please help me finding a way to fix this.

Thanks & 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-kernel" 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.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux