I can't write to my flash drive, and it is already in the MS-DOS (FAT) Format. Why?
-
29-04-2021 - |
Pergunta
This is my first question on this website. I am using a Mac Air, and I have a flash drive in which I can read from. I am able to copy files from this onto my Desktop, or anywhere on my computer for that matter. I cannot write to my flash drive, however. I know this is a common problem for some people. I looked into their solutions. There is one difference between the cases I've found, and my case. The flash drive's format is normally a 'NT' format, which is a Window format from my understanding.
My flash drive is formatted in 'MS-DOS (FAT)' according to Disk Utility and the 'Get Info' window from Finder. It did tell me I had removed it wrongly before. I am not sure how to fix the flash drive. Do I reformat it? If so, how and what do I format it to. Please let me know.
Thank you in advance for your help, ~Rane
Screenshot:
I do have the flash drive selected in the Disk Utility picture.
Solução
If you don't need to use this USB disk on a Windows machine, format using Mac OS Extended (Journaled). Should you need to exchange files with Windows machines, then Format as you have with MS-DOS (FAT). ExFAT should work as well.
It is not outside the bounds of possibility that the drive itself has gotten zapped somehow and is damaged, thus not operating correctly. Copy all the files from the flash drive to a folder, reformat with MS-DOS (FAT), then see what happens when you copy back. If it doesn't work, chuck it. Since flash drives are so inexpensive now, get a few more of them in larger capacities.
Lastly, (above) some flashdrives have a physical write-lock (read-only) hardware switch. If your flash drive has such a switch, perhaps it is locked? OS X does not allow the usual file & directory permission on MS-DOS (FAT) disks, so you can't try to make it read/write.
There is also a 4GB limit on a single file in MS-DOS (FAT).
Outras dicas
So, here's what I did after much face-palming and cursing of Apple and their absolute disregard for their users:
From the terminal:
- Identify your USB by NAME and IDENTIFIER:
diskutil list
Output is:
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *2.0 GB disk3
1: DOS_FAT_32 MIXTAPE 2.0 GB disk3s1
In this case, NAME=MIXTAPE
and the IDENTIFIER=/dev/disk3s1
- Now unmount the USB:
sudo diskutil unmount /dev/$IDENTIFIER
Example:
sudo diskutil unmount /dev/disk3s1
Output is:
Volume MIXTAPE on disk3s1 unmounted
- Now create the Volume directory - this appears to be the key!
sudo mkdir /Volumes/$NAME
Example:
sudo mkdir /Volumes/MIXTAPE
No output.
- Now mount the USB to the Volume:
sudo mount -w -t msdos /dev/disk3s1 /Volumes/$NAME
Example:
sudo mount -w -t msdos /dev/disk3s1 /Volumes/MIXTAPE
No output.
- Validate that the USB is now writeable:
touch /Volumes/$NAME/tmp.txt
Example:
touch /Volumes/MIXTAPE/tmp.txt
- You should now be able to see that you were able to create the tmp.txt file on your USB in the Finder app or by:
ls -al /Volumes/$NAME
Example:
ls -al /Volumes/MIXTAPE
This is a stab in the dark, but is your USB drive actually an SD card in a card reader? In this case, I would tend to think the hardware write lock switch is in the on position on the SD card.
Formatting is sure an a option, but what if that flash drive is not yours or you have info on it? IMO, the best possible way is to download something like Paragon NTFS for Mac. Had the same problem, downloaded, installed, no more problems, easy life.
If you want to use on Mac and Windows - Select the USB drive in the left hand pane. From the right hand side, choose Partition, change layout to 1, and format to ExFat, and see if that helps.
Going out on a limb here:
How many files are on the drive? FAT32 has a maximum number of files per volume. Assuming that the drive is formatted with 32KB clusters, only 268,173,300 files can reside on a FAT32 drive at once. Is the 1.09GB comprised of just under 268,173,300 small files?
Additionally, as IconDaemon mentioned briefly, FAT32 has a file size limit of 4GB with large file size support and 2GB without. How big is the file that you are copying to the drive?
Have you tried rebooting with the drive in the USB slot?
I have a similar USB stick in FAT32 format that's 32gb total. I find the (almost) ONLY way I can mount it read-write in 10.12 Sierra or 10.13 High Sierra is to reboot the machine with the drive inserted. If I insert the drive after the machine has booted it will always mount read-only. There's no physical switch for disabling the read, but I suspect that somewhere Mac OS thinks that switch is enabled and somehow it doesn't check when it's booting. I did manage to remount it read-write as shown below, but rebooting (though frustrating) behaves better and feels safer than doing it the other way and getting messages about it being damaged.
The only other odd thing about the USB stick is that it has one USB A side and one Micro-USB OTG side. Only one side can be used at a time, both access the 32Gb FAT32 storage. I'm using the USB A side in the Mac. I wish they made these with A and C sides.
Well, I was able to mount it read-write with the following terminal fun, but after mounting it I got a dialog that said Repair failed, unable to repair this drive, it has been mounted read only for you to retrieve files from it, but you will not be able to write to it.
And then I could write to it. But it was kind of upsetting.
lamblincl5116:~ lamblin$ sudo df
Password:
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s1 976695384 602657408 368466424 63% 2088422 9223372036852687385 0% /
devfs 374 374 0 100% 648 0 100% /dev
/dev/disk1s4 976695384 4194344 368466424 2% 2 9223372036854775805 0% /private/var/vm
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk2s1s10 62980000 15263712 47716288 25% 0 0 100% /Volumes/LAMBLIN
lamblincl5116:~ lamblin$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 500.1 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +500.1 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 308.6 GB disk1s1
2: APFS Volume Preboot 22.9 MB disk1s2
3: APFS Volume Recovery 520.8 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *32.3 GB disk2
1: Windows_FAT_32 32.3 GB disk2s1
lamblincl5116:~ lamblin$ sudo gpt show -l /dev/disk2
start size index contents
0 1 MBR
1 95
96 63012768 1 MBR part 12
lamblincl5116:~ lamblin$ diskutil unmount /dev/disk2s1
disk2s1 was already unmounted
lamblincl5116:~ lamblin$ sudo mount -w -t msdos /dev/disk2s1 /Volumes/LAMBLIN
mount_msdos: /dev/disk2s1 on /Volumes/LAMBLIN: Resource busy
# Here I realized that the device name was unusual.
lamblincl5116:~ lamblin$ sudo umount /dev/disk2s1s10
umount(/Volumes/LAMBLIN): Resource busy -- try 'diskutil unmount'
lamblincl5116:~ lamblin$ diskutil umount /dev/disk2s1s10
Volume LAMBLIN on disk2s1s10 unmounted
lamblincl5116:~ lamblin$ sudo mount -w -t msdos /dev/disk2s1s10 /Volumes/LAMBLIN
mount: realpath /Volumes/LAMBLIN: No such file or directory
lamblincl5116:~ lamblin$ mkdir /Volumes/LAMBLIN
mkdir: /Volumes/LAMBLIN: Permission denied
lamblincl5116:~ lamblin$ sudo mkdir /Volumes/LAMBLIN
lamblincl5116:~ lamblin$ sudo mount -w -t msdos /dev/disk2s1s10 /Volumes/LAMBLIN
mount_msdos: /dev/disk2s1s10 on /Volumes/LAMBLIN: Permission denied
lamblincl5116:~ lamblin$ sudo mount -w -t msdos /dev/disk2s1 /Volumes/LAMBLIN
# This is when I got the Unable to be repaired dialog box
# I wrote files to it in the finder, and pressed eject in the finder.
lamblincl5116:~ lamblin$ sudo umount /dev/disk2s1
umount: /dev/disk2s1: not currently mounted
lamblincl5116:~ lamblin$ ls /Volumes/
Macintosh HD Preboot 13 Preboot 19 Preboot 24 Preboot 3 Preboot 35 Preboot 40 Preboot 46 Preboot 7
Preboot Preboot 14 Preboot 2 Preboot 25 Preboot 30 Preboot 36 Preboot 41 Preboot 47 Preboot 8
Preboot 1 Preboot 15 Preboot 20 Preboot 26 Preboot 31 Preboot 37 Preboot 42 Preboot 48 Preboot 9
Preboot 10 Preboot 16 Preboot 21 Preboot 27 Preboot 32 Preboot 38 Preboot 43 Preboot 49
Preboot 11 Preboot 17 Preboot 22 Preboot 28 Preboot 33 Preboot 39 Preboot 44 Preboot 5
Preboot 12 Preboot 18 Preboot 23 Preboot 29 Preboot 34 Preboot 4 Preboot 45 Preboot 6
I found that the trick was that the volume name cannot have blanks in it. No matter what I tried, when the volume name contained a blank, I could not make the volume read/write.
Sticky tape over the lock switch - sm sq, ~15 mm, diagonally, not over card contacts.