[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mtools] Formatting large capacity SD cards
From: |
Simon Large |
Subject: |
Re: [Mtools] Formatting large capacity SD cards |
Date: |
Fri, 23 Mar 2007 14:17:24 -0000 |
Hi Alain,
> (values read back from a 256M card)
> sectors per track: 63
> heads: 255
> cylinders: 32
> sector size: 512 bytes
> hidden sectors: 99
>
> mformat command line: mformat -t 32 -h 255 -s 63 -H 99
>
> I think that should be: mformat -t 32 -h 255 -n 63 -H 99 -S 2
Note also the incorrect -s parameter. I think mformat uses -n for
sectors-per-track.
Thanks for your help with the 4GB card. I think now that the problem is
in the kernel, and may be due to overflow of signed 32-bit integers.
Simon
-----Original Message-----
From: Alain Knaff [mailto:address@hidden
Sent: 23 March 2007 14:01
To: Simon Large
Cc: address@hidden
Subject: Re: [Mtools] Formatting large capacity SD cards
Simon Large wrote:
> Hi folks,
>
> I am trying to get a 4GB SD card working on Windows and Linux. At the
> moment a card formatted on Windows will not mount using kernel 2.6.16.
> The help doesn't give many clues about how to pick the right number of
> heads/tracks/sectors/sector-size. Any ideas?
Normally, the vfat FS should mount the card no matter what number of
heads, tracks, sectors are used to format it.
Do you get any error messages when attempting to mount the card? Kernel
error messages are displayed using dmesg.
Also, be aware that I only do mtools. The in-kernel Vfat and Fat
filesystems (that are used for mounting) are handled by Werner
Almesberger, as far as I known.
Also, you should only access cards or disks using one method at a time.
That is, never use mtools on a mounted card.
> I found an error in the output of minfo where it gives an mformat
> command line to use.
>
> (values read back from a 256M card)
> sectors per track: 63
> heads: 255
> cylinders: 32
> sector size: 512 bytes
> hidden sectors: 99
>
> mformat command line: mformat -t 32 -h 255 -s 63 -H 99
>
> I think that should be: mformat -t 32 -h 255 -n 63 -H 99 -S 2
>
> Simon
Yes, indeed. Minfo leaves away the sizecode of the mformat command line.
However, in the common case of 512-byte sectors, the sizecode is
redundant anyways, as it is the default.
However, I'll add the feature in the next patch (display sizecode if
different from 2)
Regards,
Alain