I want to prepare an SD card for use in an old camera using CHDK. The card needs to be FAT16 formatted. This doesn’t work from Terminal anymore, maybe already for years. Disk Utility provides ''FAT'', but this is FAT32. I have no other (Windows) computer. What do I do?
4 Answers
You can format any drive to FAT16 with newfs_msdos
Command
1) Launch Terminal
2) Find The Drive you Want to Format
#mount
/dev/disk2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk4s1 on /Volumes/USB_Disk (msdos, local, nodev, nosuid, noowners)
In this case, my disk is disk4. Your disk will most likely be different! Be sure to reference the correct disk - you can and will lose your data if you format the wrong drive!!!
3) Unmount the disk
#diskutil unmountDisk disk4
Unmount of all volumes on disk4 was successful
4) Format the drive
#sudo newfs_msdos -F 16 /dev/disk4
After a few moments, your drive will format.
5) Remount the drive (optional)
#diskutil mount /dev/disk4
It will probably show up as "NO NAME"
on your Desktop. You can rename it here or to do it at the time of formatting use -v Type in a Volume Name
when you format the drive.
-
-
2You can also try
newfs_msdos -F 16 /dev/xxxxxx
where xxxxxx is your drive that you want to format. Let me know if that works and I will update the answer.– AllanCommented Feb 10, 2016 at 21:27 -
Thanks, this worked (first it gave me 'resource busy', had to unmount first).– lejonetCommented Feb 10, 2016 at 21:39
-
1
-
In OS X 10.8.5 I didn't have to use
sudo
to havenewfs_msdos
format my disk. Are you saying in 10.11 it's required? Anyway, nice directions. +1 Commented Feb 11, 2016 at 0:04
For what it's worth, this seems to work on High Sierra:
diskutil eraseDisk "MS-DOS FAT16" SOMENAME /dev/disk#
It still needs to be unmounted first.
-
Hi ammulder, and welcome to ask different! On this site, it is preferred that answers explain exactly what you're doing and why it works - especially with terminal commands like this. Thanks, and happy answering! Commented Dec 1, 2017 at 1:31
-
My command looks like below, and it works:
diskutil eraseDisk "MS-DOS FAT16" "WINDOWSXP" MBR disk2
Commented Feb 2, 2018 at 21:30
I spend all evening to understand how to format a USB stick to FAT16 and its so simple and just copy these commands to your terminal:
diskutil unmountDisk disk4
sudo newfs_msdos -F 16 /dev/disk4
diskutil mount /dev/disk4
This works for all sizes of drives.
Note: For other users: the reference to disk4
in the commands above may need to be changed to ensure it refers to the correct drive.
-
This is a duplicate of the accepted answer, except more compact, and lacking the useful
mount
command to see what drives are mounted.– velkoonCommented Oct 2, 2021 at 2:32
Why so hard to explain things, it is the main reason why many new users get away from linux.
Just do mkfs.vfat -F16 /dev/sdb(x) if you want to name the USb, flash, etc... put this in addiction -n (name), then it looks like this:
mkfs.vfat -F16 /dev/sdb(x) -n (name) and hit enter.
-
4OS X/macOS is not Linux and OS X/macOS doesn't have
mkfs.vfat
command. Commented Jan 19, 2017 at 12:31
diskutil
should still be able to do FAT16 up to 2GB, I use it a lot.