Most USB keys use the FAT format (more precisely FAT32), which is a simple format native to older versions of Windows and almost universally supported.
If you formatted the key using HFS(+) or UFS, and you now want to format it as ext3, first find out if there is a partition on the key. Run ls /dev/sdb*
. If this shows only /dev/sdb
, there is no partition, so create the filesystem directly onto /dev/sdb
. If this shows one partition (probably /dev/sdb1
but it could be a different number), create the filesystem there. If there are several partitions, you can put different filesystems on them, or repartition the disk.
Run file - </dev/sdb1
to check what filesystem is currently on that partition (maybe use a different number or no number as determined above). If you're sure you want to make a new filesystem, run mkfs.ext3 /dev/sdb1
. For removable media, you probably don't want any reserved block, so run
mkfs.ext3 -m 0 /dev/sdb1
If your Linux is recent enough, you may want ext4 or btrfs, as they are supposed to be better for flash devices (though I don't know if this applies to low-end flash media as found on USB keys).
But again, there's rarely a reason not to use FAT on a USB key.