I am trying to multiboot Windows, Linux and macOS Catalina all installed on the same drive. I can get it working quite easily if macOS is the first OS on the drive.
However I have problems if my drive partition layout is like this:
- Windows EFI
- Windows OS
- Linux Root
- Linux Home
- macOS EFI
- macOS
- exFAT share partition
I read that it is safer to format an exFAT partition from macOS disk Utility if that partition is to be used to share data between macOS and other OSs.
So I repartitioned the "share partition" in macOS disk utility to format it again as exFAT. But when I did this my Windows EFI partition was deleted and I can no longer boot in to Windows or Linux.
I know how to rebuild the Win 10 boot files and Grub bootloader config and I also know what I am doing is not good practice.
I am only asking what is going on such that a simply change to a drive partiton in Disk Utility causes the Windows EFI partition to become deleted? This didn't happen on my other multiboot set up when the macOS EFI partition is the first partition on the drive followed my macOS then Windows EFI/WindowsOS/LinuxOS.
From testing the same thing happens when I use disk utility to clone a macOS installation into a container on a drive that already has Windows on it… the Windows EFI gets nuked.
Cheers,
Flex
Best Answer
I do not understand your justification for having two EFI partitions. Since you have stated both Windows and Linux are using the first EFI partition to boot, then there is no reason for having the second EFI partition. Most likely if you eliminated the second EFI partition, then the Disk Utility would not be deleting the first EFI partition.
Both the Disk Utility application and
diskutil
command are complex software developed by Apple to simplify the most disk management tasks. (Here a disk could be a HDD, SSD, USB drive, image file such as.dmg
or.sparseimage
, image folder such as.sparsebundle
, etc...) Using either is a learned experience. In your case, you learned something the Disk Utility application can not do as expected. Or, can not do as expected with your version of macOS. I suppose in the future you should avoid this problem by usingnewfs_exfat
command instead.Update Regarding Your Triple Boot
When the Boot Camp Assistant is used to install UEFI booting Windows for a dual boot arrangement, the existing EFI partition is used for the Windows boot files. This EFI partition is 209.7 MB (409,600 sectors) when the sector size is 512 bytes and 314.6 MB (76,800 sectors) when the sector size is 4096 bytes. Since you are also installing an UEFI booting Linux and have a sector size of 512 bytes, an EFI partition of around 300 MB should be sufficient. I feel an increase to 300 MB is more that enough, since the boot files in the EFI partition for Ubuntu on my iMac only use about 9.8 MB.
Update Regarding the Behavior of Disk Utility and
diskutil
Below is the
diskutil list disk1
output from a disk image. If you do not know, a disk image is a file or folder which can be mounted as drive.If I try to use the Disk Utility to format
disk0s3
as ExFAT, I will get the following error message. I have learned this is caused by the first EFI partition being to small.If the
diskutil
command is used to formatdisk1s3
as ExFAT, a similar message appears, as shown below.Next, the first EFI partition is removed, as shown below.
Now the Disk Utility works, as shown below. Since first EFI partition is now large enough, the operation succeeds.
If the same also succeeds with using the
diskutil
command, as shown below.Next, the remaining EFI partition is removed, as shown below.
Now, there are no EFI partitions. One would expect both the Disk Utility and
diskutil
to fail when trying to format this last partition. However both succeed, as shown below.Note, the output below shows the Disk Utility also created a new EFI partition.
Before trying the
diskutil erasevolume exfat MyExFAT disk1s3
command, this new EFI partition is removed, as shown below.Note, a new EFI partition was also created. Clearly, both the Disk Utility and
diskutil
are doing more thinking that simply formatting a partition.In all of the above cases, the
newfs_exfat -v MyExFAT /dev/rdisk1s3
command would have succeeded on an unmounteddisk1s3
, since this command does require the existence of any EFI partitions.