Formatting An Sd Card To 4096 Block Size

carpetman

Registered
Hi all. After making the switch to an Mac, I'm getting on very well with it. Until the Terminal has to be used, then I'm stuck.

My problem is that I need to format an SD card to have a block size of 4096 bytes. This is because I'd like to install Rockbox on a DAP, namely the Xduoo X3. After following instructions on how to do this, and getting nowhere but a hung DAP, I wad told that the block size of the SD card needed to be 4096, rather than its current 512. I can use the terminal to read the details of the card, but not having used it beyond that, I need a bit of hand-holding.

Anyone know how to do it?

Cheers

Screen Shot 2017-04-02 at 22.56.26.png
 
Still no further forwards with this, I can understand how to get Terminal to tell me the /dev/disk etc, 5 in my case. So thats
diskutil unmount disk5s1
I understand the card needs to be unmounted.

sudo newfs_msdos -F 32 -c 128 disk5s1

What do I need to change to achieve the 40976 bytes? is it the -F 32 or the -c 128

Again, many thanks.
 
The default block size is 32k.
So, if you want 4096 as your block size, here's your command, with some explanation (as if I know what I am talking about :D The explanation that I give here might not be 100% technically correct, but should give you the correct results, which is your goal, eh?)
Code:
sudo newfs_msdos -F 32 -c 16 disk5s1
sudo - running command as superuser.
newfs_msdos - the command, which is used to manipulate a disk to create (in this instance) a fat partition.
-F 32 - makes a fat partition, the 32 determines that it will be FAT32
now for the important part:
-c 16 - specifying the sector size on the volume with a ratio of the total block allocation to the block size that you want to use. FAT32 disk has 65536 sectors, divided by your desired block size of 4096 = 16 (!)
disk5s1 - your actual disk
You can copy and paste that command to your terminal, should work as is. If you type it yourself, be careful about caps. -F is a different option from -f :D
 
The default block size is 32k.
So, if you want 4096 as your block size, here's your command, with some explanation (as if I know what I am talking about :D The explanation that I give here might not be 100% technically correct, but should give you the correct results, which is your goal, eh?)
Code:
sudo newfs_msdos -F 32 -c 16 disk5s1
sudo - running command as superuser.
newfs_msdos - the command, which is used to manipulate a disk to create (in this instance) a fat partition.
-F 32 - makes a fat partition, the 32 determines that it will be FAT32
now for the important part:
-c 16 - specifying the sector size on the volume with a ratio of the total block allocation to the block size that you want to use. FAT32 disk has 65536 sectors, divided by your desired block size of 4096 = 16 (!)
disk5s1 - your actual disk
You can copy and paste that command to your terminal, should work as is. If you type it yourself, be careful about caps. -F is a different option from -f :D


Many thanks Delta. I get this message after entering that....

512 bytes per physical sector

newfs_msdos: 25573 clusters too few clusters for FAT32, need 65525

I'm using a 128gb card, which I presume has some effect on which sizes are entered?
 
Not sure. Some of this stuff is above my pay grade. :D
try
Code:
sudo newfs_msdos -F 32 -b 4096 disk5s1
or
Code:
sudo newfs_msdos -F 32 -c 8 disk5s1
 
Back
Top