Results 1 to 6 of 6

Thread: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

  1. #1
    Join Date
    Sep 2007
    Location
    Hull, England
    Beans
    69

    Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    I am an avid user of Nintendo DS Flashcard technology; and have learned that "Larger FAT(32) Cluster sizes result in quicker random-access". Slow Random-Access causes some DS applications/games to freeze. In these circumstances, since the smallest files I'm dealing with are 512KB save files (40% of files, and 99% of space, is occupied by 5-to-100MB+ Files), "wasted space" isn't an issue.

    I know that in Windows, the command to format a device to FAT32 with the largest available (to my knowledge) cluster size is:
    Code:
    FORMAT X: /FS:FAT32 /A:64K
    Here in Linux-Land, things are different (and in almost all cases, better). But one thing snags me on the mkdosfs man page:
    There are two options, -s, and -S. -s is sectors-per-cluster. -S is logical sector size.

    My question is this: What command in linux is equivelant to the DOS command above: would it suffice/be reccommended to disregard the -s and set -S to 65536 ?

    Thanks for the input: I don't have access to a Windows/DOS machine when I have access to my DS or my MicroSDHC.
    Last edited by aphirst; August 28th, 2008 at 06:07 PM.
    ArchLinux | x86_64 | linux-ck-ivybridge
    ThinkPad X230 | 12.5" | i5-3320M | HD 4000 | 16GB | 256GB mSATA SSD | 2TB HDD
    ThinkPad T430 | 14.1" | i7-3520M | GF108M (NVS 5400M) | 16GB | 256GB mSATA SSD

  2. #2
    Join Date
    Oct 2004
    Location
    Kingston, On
    Beans
    Hidden!

    Re: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    Quote Originally Posted by aphirst View Post
    I am an avid user of Nintendo DS Flashcard technology; and have learned that "Larger FAT(32) Cluster sizes result in quicker random-access". Slow Random-Access causes some DS applications/games to freeze. In these circumstances, since the smallest files I'm dealing with are 512KB save files (40% of files, and 99% of space, is occupied by 5-to-100MB+ Files), "wasted space" isn't an issue.

    I know that in Windows, the command to format a device to FAT32 with the largest available (to my knowledge) cluster size is:
    Code:
    FORMAT X: /FS:FAT32 /A:64K
    Here in Linux-Land, things are different (and in almost all cases, better). But one thing snags me on the mkdosfs man page:
    There are two options, -s, and -S. -s is sectors-per-cluster. -S is logical sector size.

    My question is this: What command in linux is equivelant to the DOS command above: would it suffice/be reccommended to disregard the -s and set -S to 65536 ?

    Thanks for the input: I don't have access to a Windows/DOS machine when I have access to my DS or my MicroSDHC.
    Well, I don't know about performance, but the quote you mention only refers to cluster size and not block size. Is would make sense that the command you want to try is:

    sudo mkdosfs /dev/sdc1 -s 64 -F 32

    Be sure to specify the correct device instead of "sdc1"
    I lost a "z". Anyone seen it around here?

  3. #3
    Join Date
    Sep 2007
    Location
    Hull, England
    Beans
    69

    Re: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    Thank you very much (!).
    I had tried, funnily enough, this exact command (except for the -I that was needed to format the entire drive as FAT32); and it seemed to work smashing (even the random-access problems went away magically). It was just my "was that the correct way around the problem/would that have caused problems later on" uncertainty. At least now I have some confirmation that I did the right thing.

    Again, thanks ( ^_^ ), and just in case you care: 'Proof' that I had tried this command, and of my uncertainty as to its 'correctness'
    ArchLinux | x86_64 | linux-ck-ivybridge
    ThinkPad X230 | 12.5" | i5-3320M | HD 4000 | 16GB | 256GB mSATA SSD | 2TB HDD
    ThinkPad T430 | 14.1" | i7-3520M | GF108M (NVS 5400M) | 16GB | 256GB mSATA SSD

  4. #4
    Join Date
    Jul 2006
    Beans
    36

    Re: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    I would think that the proper command should be:
    Code:
    sudo mkdosfs /dev/sdc1 -s 128 -F 32
    since the author wanted 64KB clusters.

    And because -s means sectors-per-cluster and the sector is usually is 512 bytes, so that's why 128 sectors. And I guess the above command is equally the same as:
    Code:
    sudo mkdosfs /dev/sdc1 -s 128 -S 512 -F 32
    And I'd like ask what tool can give me the information about FAT type (12, 16 or 32) and cluster sizes used on already formatted FAT partition.

  5. #5
    Join Date
    Mar 2007
    Beans
    7

    Re: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    Late answer, I know but maybe helpful for other people: minfo is what you're looking for, you first need to assign a drive letter to your device in /etc/mtools.conf, after that you can use it for example like this:
    $ sudo minfo -v d:
    Last edited by Dwaalspoor98; April 28th, 2009 at 08:23 PM. Reason: added -v flag

  6. #6
    Join Date
    Oct 2008
    Beans
    2

    Re: Set FAT32 Cluster Size with mkdosfs/mkfs.fvfat/mkfs.dosfs ?

    I've tested my DS Lite v5 + Acekard v2.1 + Akaio v1.5.1
    with sector size (-S parameter) from 1024 bytes to 8192 bytes neither worked, only 512 byte sector worked.
    Maximum cluster size of 64 sectors works.
    So maximum cluster size is 32768 bytes instead of the desired 524288 bytes (at which ~12MB Akaio took up 100MB).
    Last edited by moli; January 10th, 2010 at 02:26 AM. Reason: bold+case

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •