Mount the SD card formatted using the DIGITAL CAMREA on Linux box but HOW?
Mount the SD card formatted using the DIGITAL CAMREA on Linux box but HOW?
am 08.08.2005 17:08:41 von mukundjb
Dear all,
I have an SD card problem that mounts when formatted on windows but
fails when formatted on camera as you all know.
Now, I an able mount the SD card formatted using the DIGITAL CAMREA on
Linux box using the windows formatted SD cards first 512 bytes.
This will NOT serve as a permanent solution BUT I am able to reduce the
scope of the issue. I used a raw method for this. Here it is.
I formatted the card in windows; copied it to disk-image.
(Dump the first 512 bytes to the file)
dd if=/dev/tfa0 of=disk-image count=1
Then I copied the disk-image to the camera formatted device which is not
mounting.
dd if= disk-image of=/dev/tfa0 count=1
Then, I tried to mount the device. It mounts with some error messages
that are caused to not able to find the 57 sector that contains the FAT
details.
Attempt to access beyond the end of device
FAT: Directory bread(block 24) failed
FAT: Directory bread(block ..) failed
..
..
FAT: Directory bread(block 55) failed
It works fine when I increase the count to 60. I able to copy files,
remount and see the files.
Some one please help me in coming to a conclusion where is the problem.
Regards,
Mukund Jampala
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Mount the SD card formatted using the DIGITAL CAMREA on Linuxbox but HOW?
am 08.08.2005 22:45:37 von chuck gelm net
Mukund JB. wrote:
> Dear all,
>
> I have an SD card problem that mounts when formatted on windows but
> fails when formatted on camera as you all know.
>
> Now, I an able mount the SD card formatted using the DIGITAL CAMREA on
> Linux box using the windows formatted SD cards first 512 bytes.
Uh, which is it?
"formatted using the DIGITAL CAMREA"
or
"windows formatted SD cards"
Is the SD card formatted by the camera or by windows?
What is the result of "fdisk -l" of this SD card?
I recall that you are using 'sfdisk' and that it reported an error
in the partitioning scheme of that SD card.
Of less significance: How did the partitioning get corrupted?
Did it happen after using 'sfdisk' to modify the SD card's partitions?
If yes, perhaps using 'sfdisk' is not the appropriate application
to modify the SD card's partitions.
I am guessing that you may need to use a partitioning application
to restore the SD card to something that the camera will recognize.
I fear that the application to accomplish this is not 'sfdisk'.
HTH, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs
RE: Mount the SD card formatted using the DIGITAL CAMREA on Linux box but HOW?
am 09.08.2005 06:54:54 von mukundjb
Dear chem.,
See my inline comments.
>> I have an SD card problem that mounts when formatted on windows but
>> fails when formatted on camera as you all know.
>>
>> Now, I an able mount the SD card formatted using the DIGITAL CAMREA
on
>> Linux box using the windows formatted SD cards first 512 bytes.
>
> Uh, which is it?
>"formatted using the DIGITAL CAMREA"
> or
>"windows formatted SD cards"
The SD car that is formatted in windows is mounting but the SD card
formatted in Digital CAMRA is NOT mounting.
> Is the SD card formatted by the camera or by windows?
>
>What is the result of "fdisk -l" of this SD card?
#fdisk -lV /dev/tfa0 (both camera & windows are same result)
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
>I recall that you are using 'sfdisk' and that it reported an error
>in the partitioning scheme of that SD card.
>
>Of less significance: How did the partitioning get corrupted?
>Did it happen after using 'sfdisk' to modify the SD card's partitions?
The SD card that is formatted on DIGITAL CAMARA is NOT mounting in
Linux.
It says:
#Mount -t /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
So, I tried the sfdisk -lV to know the configuration. However, sfdisk is
a read-only command & it will NOT alter the partition table.
The partition table is NOT corrupted as we are able to mount the SD card
on Windows.
>If yes, perhaps using 'sfdisk' is not the appropriate application
>to modify the SD card's partitions.
>
> I am guessing that you may need to use a partitioning application
>to restore the SD card to something that the camera will recognize.
>I fear that the application to accomplish this is not 'sfdisk'.
>HTH, Chuck
So, point here why it is mounting when I alter the first 512 bytes as
like windows formatted device using dd?
Regards,
Mukund Jampala
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs
Re: Mount the SD card formatted using the DIGITAL CAMREA on Linuxbox but HOW?
am 10.08.2005 13:32:39 von chuck gelm net
Dear Mukund JB:
It seems to me that the partition table is in error.
My digital camera formats my CF media as a single fat12 partition.
Both 'sfdisk' and 'fdisk' report a partition error on the first partition.
I am still wondering if your two SD media cards were originally
formatted with four (4) partitions as 'sfdisk -l' displays?
I would like to assume that both cards were originally formatted
with a single fat12 partition.
more comments inline...
Mukund JB. wrote:
> Dear chem.,
> See my inline comments.
>
>
>>>I have an SD card problem that mounts when formatted on windows but
>>>fails when formatted on camera as you all know.
>>>
>>>Now, I an able mount the SD card formatted using the DIGITAL CAMREA
>
> on
>
>>>Linux box using the windows formatted SD cards first 512 bytes.
>>
>> Uh, which is it?
>>"formatted using the DIGITAL CAMREA"
>> or
>>"windows formatted SD cards"
>
>
> The SD car that is formatted in windows is mounting but the SD card
> formatted in Digital CAMRA is NOT mounting.
>
>
>> Is the SD card formatted by the camera or by windows?
>>
>>What is the result of "fdisk -l" of this SD card?
>
>
> #fdisk -lV /dev/tfa0 (both camera & windows are same result)
>
> 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
Thanks. It seems to me that this partitioning is different or wrong.
Let us see what filesystems are present on the cards:
fdisk -T /dev/tfa0p1
Does your linux system support filesystem type fat12?
more...
>>I recall that you are using 'sfdisk' and that it reported an error
>>in the partitioning scheme of that SD card.
>>
>>Of less significance: How did the partitioning get corrupted?
>>Did it happen after using 'sfdisk' to modify the SD card's partitions?
>
> The SD card that is formatted on DIGITAL CAMARA is NOT mounting in
> Linux.
> It says:
>
> #Mount -t /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 used the mount command's -t option with an argument; i.e.
auto, fat12, iso9660, ...
-and-
you did not specify which partition to mount; i.e.
mount -t fat12 /dev/tfa0p1 /mnt/mountpoint
^^
I would expect your mount command to fail due to these two omissions.
more...
> So, I tried the sfdisk -lV to know the configuration. However, sfdisk is
> a read-only command & it will NOT alter the partition table.
I believe that 'sfdisk' is capable of altering a partition table.
From 'man sfdisk':
"Create partitions
The fourth type of invocation: sfdisk device will cause
sfdisk to read the specification for the desired parti-
tioning of device from its standard input, and then to
change the partition tables on that disk. Thus, it is pos-
sible to use sfdisk from a shell script. When sfdisk
determines that its standard input is a terminal, it will
be conversational; otherwise it will abort on any error.
BE EXTREMELY CAREFUL - ONE TYPING MISTAKE AND ALL YOUR DATA IS LOST"
> The partition table is NOT corrupted as we are able to mount the SD card
> on Windows.
>>If yes, perhaps using 'sfdisk' is not the appropriate application
>>to modify the SD card's partitions.
>>
>> I am guessing that you may need to use a partitioning application
>>to restore the SD card to something that the camera will recognize.
>>I fear that the application to accomplish this is not 'sfdisk'.
>>HTH, Chuck
>
>
> So, point here why it is mounting when I alter the first 512 bytes as
> like windows formatted device using dd?
Because, using 'dd, you made the other SD media 'look like' the
windows formatted SD media.
What filesystem does your windows o/s put on the SD media?
fdisk -T /dev/tfa0p1
What filesystem does your camera put on the media?
fdisk -T /dev/tfa0p1
Does your linux system support the same filesystem as your camera ?
cat /proc/filesystems
Does your windows o/s format the SD media with the same filesystem as your camera ?
HTH, Chuck
> Regards,
> Mukund Jampala
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs
__jmp_buf problem in setjmp/longjmp
am 11.08.2005 07:32:40 von Vikas
Can you please tell me why for different platform we are using different
__jmp_buf[] size in setjmp/longjmp
Is that dependent on ARCHitecture (that I think)
And do we have a good illustration for that???
-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org]On Behalf Of chuck gelm
Sent: Tuesday, August 09, 2005 2:16 AM
To: Mukund JB.
Cc: linux-newbie@vger.kernel.org
Subject: Re: Mount the SD card formatted using the DIGITAL CAMREA on Linux
box but HOW?
Mukund JB. wrote:
> Dear all,
>
> I have an SD card problem that mounts when formatted on windows but
> fails when formatted on camera as you all know.
>
> Now, I an able mount the SD card formatted using the DIGITAL CAMREA on
> Linux box using the windows formatted SD cards first 512 bytes.
Uh, which is it?
"formatted using the DIGITAL CAMREA"
or
"windows formatted SD cards"
Is the SD card formatted by the camera or by windows?
What is the result of "fdisk -l" of this SD card?
I recall that you are using 'sfdisk' and that it reported an error
in the partitioning scheme of that SD card.
Of less significance: How did the partitioning get corrupted?
Did it happen after using 'sfdisk' to modify the SD card's partitions?
If yes, perhaps using 'sfdisk' is not the appropriate application
to modify the SD card's partitions.
I am guessing that you may need to use a partitioning application
to restore the SD card to something that the camera will recognize.
I fear that the application to accomplish this is not 'sfdisk'.
HTH, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie"
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.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs
RE: __jmp_buf problem in setjmp/longjmp
am 11.08.2005 08:08:59 von mukundjb
It is dependent of the processor type.
The jmp is will an assembly code specific to the processor.
You can find the implementation of the setjmp/longjmp in architecture
specific directories.
For instance, you can find the implementation for PPC in
"arch/ppc/xmon/setjmp.c".
Mukund Jampala
>Can you please tell me why for different platform we are using
different
>__jmp_buf[] size in setjmp/longjmp
>Is that dependent on ARCHitecture (that I think)
>And do we have a good illustration for that???
>
>-----Original Message-----
>From: linux-newbie-owner@vger.kernel.org
>[mailto:linux-newbie-owner@vger.kernel.org]On Behalf Of chuck gelm
>Sent: Tuesday, August 09, 2005 2:16 AM
>To: Mukund JB.
>Cc: linux-newbie@vger.kernel.org
>Subject: Re: Mount the SD card formatted using the DIGITAL CAMREA on
Linux
>box but HOW?
>
>Mukund JB. wrote:
>> Dear all,
>>
>> I have an SD card problem that mounts when formatted on windows but
>> fails when formatted on camera as you all know.
>>
>> Now, I an able mount the SD card formatted using the DIGITAL CAMREA
on
>> Linux box using the windows formatted SD cards first 512 bytes.
>
> Uh, which is it?
>"formatted using the DIGITAL CAMREA"
> or
>"windows formatted SD cards"
>
> Is the SD card formatted by the camera or by windows?
>
>What is the result of "fdisk -l" of this SD card?
>
>I recall that you are using 'sfdisk' and that it reported an error
>in the partitioning scheme of that SD card.
>
>Of less significance: How did the partitioning get corrupted?
>Did it happen after using 'sfdisk' to modify the SD card's partitions?
>If yes, perhaps using 'sfdisk' is not the appropriate application
>to modify the SD card's partitions.
>
> I am guessing that you may need to use a partitioning application
>to restore the SD card to something that the camera will recognize.
>I fear that the application to accomplish this is not 'sfdisk'.
>
>HTH, Chuck
>
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-newbie"
>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.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs
RE: Mount the SD card formatted using the DIGITAL CAMREA on Linux box but HOW?
am 17.08.2005 18:24:53 von mukundjb
>> #fdisk -lV /dev/tfa0 (both camera & windows are same result)
>>
>> 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
>
> Thanks. It seems to me that this partitioning is different or wrong.
>Let us see what filesystems are present on the cards:
>
>fdisk -T /dev/tfa0p1
FAT12 is fs found on both the windows formatted & CAM formatted SD cards
>
>Does your linux system support filesystem type fat12?
Yes, My Linux supports FAT12. It is able to mount the FAT12 windows
formatted SD.
>What filesystem does your windows o/s put on the SD media?
>
FAT12
>What filesystem does your camera put on the media?
>
FAT12
>Does your linux system support the same filesystem as your camera ?
>
Yes it support FAT12.
fdisk -l -u /dev/tfa0:
debdev1:~# fdisk -l -u /dev/tfa0
Disk /dev/tfa0: 14 MB, 14680064 bytes
2 heads, 32 sectors/track, 448 cylinders, total 28672 sectors Units =
sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/ tfa0p1 57 28799 14371+ 1 FAT12
On a keen look on the above fdisk output on my 16MB SD card, you can
find the cylinder information as 448 where as my driver ioctl returns
450.
I have found from the partition table that Total n/o sector for the
primary partition is 28743 (total sectors).
But my ioctl returns total cylinders as 450 i.e. 28800 sectors.
As 28743 is NOT any multiple of 64(2*32)i.e sectors*heads, the fdisk
tried manipulates it to get multiples of 64.
So, finally the best multiple 448 cylinders (i.e. 28672 sector)
So, finally that NOT a BUG in the driver instead is a generalization
made by fdisk command.
Regards,
Mukund Jampala
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs