Pages

Friday, September 27, 2013

Formatting a microSD card for use with MiniSD Adapter for EZ Flash IV

On the EZ-Flash forums, there are plenty of people who have had trouble using microSD cards with microSD -> miniSD adapters. The most common problem is the dreaded (and poorly capitalized) “FAT filesystem Error”. There are people who have had other, more intermittent problems, and I can’t account for those. But, at least in my case, the FAT filesystem Error was fixable.
You’ll need Linux. A live CD will do just fine (if you don’t have one, grab Porteus, which is about 235MB and has a bunch of nice stuff.)
Flash memory (USB disks, SD cards, and the like) can be formatted in one of two ways: with a filesystem on the card itself (like a floppy disk), or with a partition table, which contains one large partition that holds the filesystem (like a hard drive.)
Windows and Linux both recognize both types of formatting. However, the EZ-Flash IV only recognizes floppy-style formatting. This is unfortunate, because many microSD cards use the other method. But with Linux, this can be changed.
The first step is to boot up Linux, then open a terminal (command prompt). In the terminal, become root (in Porteus, you already are; in Ubuntu, try “sudo -i”.) Run the command:
fdisk -l
This should show a list of devices. One of them is your SD card. It will usually look something like this:
Disk /dev/sdb: 2032 MB, 2032664576 bytes
62 heads, 63 sectors/track, 1016 cylinders
Units = cylinders of 3906 * 512 = 1999872 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d7f1d7e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1016     1983996    6  FAT16
Once you’re confident that it is your SD card and not your hard drive or a USB drive (be careful - look at the size in MB on the top line, and unplug USB drives before running “fdisk -l” to be safe), you can format the card. Of course, this will erase all files on the disk you are formatting.
In this example, fdisk shows “/dev/sdb” as the disk, and “/dev/sdb1” as the only partition. Right now /dev/sdb1 has a FAT filesystem, but we want /dev/sdb to have a FAT filesystem. This can be done with: (as root)
mkdosfs -F 16 -I /dev/sdX
Replace /dev/sdX with your SD card path (in this example, /dev/sdb).

No comments:

Post a Comment