Why USB stick formatted with exFAT on Windows is not mounting on Mac OS High Sierra?
I got a 64GB USB Stick formatted as exFAT from Windows containing a lot of files. The stick mounts without any problems on a Windows 10 system. My MacBook Pro running MacOS 10.13.2 cannot mount it. Instead the disk utility tells me it contains kind of Mac OS extended file system (German, sorry) but unable to mount (also information looks strange):
Or from command line:
bb-8:~ arne$ diskutil list
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *62.9 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS 62.6 GB disk2s2
Running fdisk tells:
bb-8:~ arne$ sudo fdisk /dev/disk2
Disk: /dev/disk2 geometry: 7651/255/63 [122915328 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122915327] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
bb-8:~ arne$ sudo fdisk /dev/disk2s1
Disk: /dev/disk2s1 geometry: 812/8/63 [409600 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
bb-8:~ arne$ sudo fdisk /dev/disk2s2
Disk: /dev/disk2s2 geometry: 7609/255/63 [122243504 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: FF 1023 255 63 - 1023 255 63 [4294967295 - 4294967295] Xenix BBT
2: FF 1023 255 63 - 1023 255 63 [4294967295 - 4294967295] Xenix BBT
3: FF 1023 255 63 - 1023 255 63 [4294967295 - 4294967295] Xenix BBT
4: FF 1023 255 63 - 1023 255 63 [4294967295 - 2474929407] Xenix BBT
bb-8:~ arne$
I have no idea why the volume is not mounting correctly. Any idea what to do without reformatting and loosing the data on the stick? Is there any option to manually mount the filesystem as exFAT using command line?
Each partition on a drive is assigned a type. The type indicates what the partition will contain. Usually, but not always, this is a file system. The mapping from a partition type to a file system is not always one-to-one. For example, both the ExFAT and NTFS files systems map to the same partition type. Therefore, Windows generally does not look at the partition type, but rather looks at the content of the partition to determine the file system.
In your question, the output from the diskutil
command shows the ExFAT formatted partition to be Apple_HFS
. What should have appeared is Microsoft Basic Data
. Therefore, the partition table has partition type error. Microsoft Windows will not care, but Apple macOS does.
Although, you do not show this in your question, the GUID for this type of partition is 48465300-0000-11AA-AA11-00306543ECAC
. The correct value should be EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
. You could goto back to your machine running Windows, open a Administrator Command Prompt Window and enter the following commands. This will correct the error in the partition table.
Below I assume the USB stick (flash drive) is disk number 1
. If not, then make the appropriate substitution. The detail partition
command should show the incorrect partition type value of 48465300-0000-11AA-AA11-00306543ECAC
.
diskpart
list disk
select disk 1
select partition 2
detail partition
help set
set id=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
exit
Note: If you are clever, you can cut-and-paste from the output of the
help set
command to enter theset id=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
command. If not, then type carefully.
Issues Regarding Using Windows Partitioning Tools on a Mac Computer.
Below has been referred to as THE GOLDEN RULE.
Never use the Windows
diskpart
ordiskmgmt.msc
commands to change the partitioning on a Mac computer.
Note: The diskmgmt.msc
command displays the "Disk Management" window. An example is shown below.
Originally, Mac computers could only BIOS boot Windows. In order for this to occur, a hybrid MBR/GPT partitioning method was employed. The Golden Rule was created because of this hybrid arrangement. Essentially, the diskpart
and diskmgmt.msc
commands would ignore the GUID partition table (GPT) and only update the MBR partition table. This could (and often did) lead to corruption of the partitions stored on a drive.
Eventually, Apple adopted the newer EFI boot method for Windows. When this method is employed, the hybrid MBR/GPT partitioning scheme is not used. Instead a a pure GPT scheme is employed. One would think this would negate The Golden Rule, but for a different reason, this rule lived on. This reason has to do with bugs introduced by the installation of Apple's Windows Support Software.
Windows Support Software, among may other things, allows Windows read-only access to certain Mac formatted partitions, such as "Mac OS Extended (Journaled)". Since the Windows software can now read these partitions, the software believes the partitions are Microsoft type partitions. When running Windows partitioning software, this can cause many possible side-effects. One is the replacement of the correct GUID partition type with Microsoft's partition type GUID of EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
. So it seemed, The Golden Rule still applied.
Recently, cases have been found where The Golden Rule can be broken. In other words, there are cases where the diskpart
command can be used to edit a drive partition table when a pure GPT scheme is employed.
One such case is when the Windows Recovery Environment is used. This environment can be entered by holding down the shift key while selecting to restart Windows. When you navigate to a Command Prompt window, you can access the diskpart
command. This command, when entered here, is unaffected by the Apple's Windows Support Software. Basically, the Windows Recovery Environment loads the Winre.wim
image file, which was unaltered when the Windows Support Software was installed. This image file contains a copy of the diskpart
command which can be executed safely.
Thanks David Anderson for your detailed answer! It points me to a solution on MacOS.
My situation was the same with Arne's, except:
> sudo fdisk /dev/disk2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *123.0 GB disk2
1: Linux Filesystem 123.0 GB disk2s1
I previously formatted my drive on Linux and then on Windows. Guess Windows did not write the partition type. Let's do it for her on MacOS. First let's find out how our GPT table's laid out:
> sudo gpt -l /dev/disk2
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014
2048 240252895 1 GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
240254943 32 Sec GPT table
240254975 1 Sec GPT header
We want EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
a.k.a. Basic Data Partition
to replace 0FC63DAF-8483-4772-8E79-3D69D8477DE4
a.k.a. Linux Filesystem Data
.
There are 3 numbers to take note of from the output. What the numbers are depends on what was printed on your terminal. Do not copy mine. Do not lose them until you're done.
Look at the line that says about your partition. The 3 numbers are:
2048 240252895 1 GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
^ ^ ^
start size index
First remove the wrong partition. It does not remove our actual data. In this command we use the number index
, in my case 1
:
> sudo gpt remove -i 1 /dev/disk2
/dev/disk2s1 removed
And then we add the correct partition. In this command we use all the 3 numbers: start
, size
and index
. In my case they are 2048
, 240252895
and 1
. Replace with yours where appropriate.
> sudo gpt add -b 2048 -s 240252895 -i 1 -t EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/disk2
/dev/disk2s1 added
Done! Now MacOS sees it as an exFAT partition. Finder happily mounts the partition. Yay.
Reference on GPT GUIDs on Wikipedia:
https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs