Hardware working with a SDMMC 2GB trying to get cluster size to 32000 Debian Linux

JimKirk

Active Member
OP
Newcomer
Joined
Jan 24, 2019
Messages
29
Trophies
0
Age
42
XP
185
Country
Canada
hey everyone so i have my mmc on my laptop running debian 9. Before you say go install windows or get a mmc reader on my desktop i have very low funds living on disability. If any of you have any ideas on how to get this working this is the command I am running.

mkfs.vfat -n WII -s 32000 /dev/mmcblk0p1 mkfs.vfat -n WII -s 32768 /dev/mmcblk0p1

both state that invalid cluster sizes. I tried googling the cluster size and every post i get says 32k nothing with the entire amount of sectors this is preventing me from downloading dlc content to my sd card as it will get just to the end and hang where i can download it to my wii no problem.

TIA
 

JimKirk

Active Member
OP
Newcomer
Joined
Jan 24, 2019
Messages
29
Trophies
0
Age
42
XP
185
Country
Canada
I noticed you live in Canada, if you live in Ottawa I have a windows desktop you could use for this.
I live 10 hours northwest in Sault Ste Marie

--------------------- MERGED ---------------------------

I forgot to add right now it is currently set to 512 bytes per sector

--------------------- MERGED ---------------------------

I am also getting a 32GB SD card this Friday so I hope I can figure out a permanent solution then finding a windows machmachbr is there a windows app I can use to format that might work in wine?
 
  • Like
Reactions: Tizm

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
mkfs.vfat -n WII -s 64 /dev/mmcblk0p1

Sectors are nominally 512 bytes--real sector size may be different, but it's irrelevant to the calculation used. Presuming you want to force FAT32, you can also add -F 32 but normally mkfs.vfat does a good job of automatically choosing based on size.
 

JimKirk

Active Member
OP
Newcomer
Joined
Jan 24, 2019
Messages
29
Trophies
0
Age
42
XP
185
Country
Canada
mkfs.vfat -n WII -s 64 /dev/mmcblk0p1

Sectors are nominally 512 bytes--real sector size may be different, but it's irrelevant to the calculation used. Presuming you want to force FAT32, you can also add -F 32 but normally mkfs.vfat does a good job of automatically choosing based on size.

Ok but with it being 512 sectors per byte when i try to download media from games onto my sd card it just hangs at the very end. When I use the save to Wii option it downloads no problem any idea on what the actual 32k is in numbers so I can see if this will now allow me to save downloadable data.
 

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
Ok but with it being 512 sectors per byte when i try to download media from games onto my sd card it just hangs at the very end.

Um, it's 512 bytes per sector. Groups of sectors are called clusters. AFAIK virtually all hardware supports reading/write 512 byte sectors*, include HDDs, SSDs, and SD cards, regardless of whether the underlying hardware actually uses 512 byte sectors or not. Some Googling suggests SD cards may have 512 or 1024 byte sectors, but that information seems rather old so I have no idea what the real logical sector size. Regardless, nothing about sector size should result in there being issues. The only things I can imagine being issues is either the partition starting at something that's not a multiple of the real sector size resulting in really poor performance or for some odd reason using FAT32 on such a small SD is causing it to stall for a long time. What does "fdisk -l /dev/mmcblk0" report as far as the start sector for partition 1? If you want, you could try formatting with -F 16 instead to see if it helps.

When I use the save to Wii option it downloads no problem any idea on what the actual 32k is in numbers so I can see if this will now allow me to save downloadable data.

32k = 32768 = 64 x 512-byte sectors. Honestly, just "mkfs.vfat -n WII /dev/mmcblk0p1" would likely automatically choose 32KB clusters with FAT16 as ~2GB is the largest partition possible for FAT16 and anything over 1GB requires 32KB clusters. This stems from FAT16 using 16-bit numbers for FAT entries, there being slightly less than 16-bit (65536) entries available, and ~65536 fat entries x 16384 clusters per fat entry only allowing slightly less than 1GB of space that can be referenced. Ie, either clusters with more sectors have to be used or large FAT entries have to be used (FAT32 actually only uses 28-bit sized (268435456) FAT entries for whatever reason).

* AFAIK this is all to maintain MS-DOS compatibility as the first versions of MS-DOS were hard coded to use BIOS functions that read in 512 byte sectors, so it became something of a hard coded standard in almost everything you'd use with a PC.
 

JimKirk

Active Member
OP
Newcomer
Joined
Jan 24, 2019
Messages
29
Trophies
0
Age
42
XP
185
Country
Canada
Fdisk -l start is 32130

32k = 32768 = 64 x 512-byte sectors. Honestly, just "mkfs.vfat -n WII /dev/mmcblk0p1" would likely automatically choose 32KB clusters with FAT16 as ~2GB is the largest partition possible for FAT16 and anything over 1GB requires 32KB clusters. This stems from FAT16 using 16-bit numbers for FAT entries, there being slightly less than 16-bit (65536) entries available, and ~65536 fat entries x 16384 clusters per fat entry only allowing slightly less than 1GB of space that can be referenced. Ie, either clusters with more sectors have to be used or large FAT entries have to be used (FAT32 actually only uses 28-bit sized (268435456) FAT entries for whatever reason).

* AFAIK this is all to maintain MS-DOS compatibility as the first versions of MS-DOS were hard coded to use BIOS functions that read in 512 byte sectors, so it became something of a hard coded standard in almost everything you'd use with a PC.[/QUOTE]

I tried 32768 invalid sector size as per my original post
 

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
Fdisk -l start is 32130

Well, that's 1K aligned which I presume should be good enough.

I tried 32768 invalid sector size as per my original post

Uh, no. You tried 32768 sectors per cluster. Since the default is 512 byte sectors, that'd work out to be 16MB clusters which is wholly invalid. Further, unless you have specific knowledge of something requiring you specify a different sector size, you shouldn't change that default. Hence "-s 64" will force 32KB clusters. So, the only real question left is if "-F 16" works better or not.
 

JimKirk

Active Member
OP
Newcomer
Joined
Jan 24, 2019
Messages
29
Trophies
0
Age
42
XP
185
Country
Canada
root@EVE:/home/tlgl# mkfs.vfat -n WII -s 64 /dev/mmcblk0p1
mkfs.fat 4.1 (2017-01-24)
WARNING: Not enough clusters for a 32 bit FAT!
mkfs.vfat: Too many clusters for filesystem - try more sectors per cluster
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/4M3E1Lz6l9E?si=fSYNJxYTa0czXVow