I recently formatted my early 2015 13'' MacBook to install Ubuntu and dual
boot. To do this, I wanted to install rEFInd, and I just cannot get it to
work. I am using 0.11.5 and nothing changes whether I try to do it manually
or not, or whether I disable SIP or not.
When I run ./refind-install this is the output:
Not running as root; attempting to elevate privileges via sudo....
ShimSource is none
Installing rEFInd on OS X....
mount_msdos: Unsupported sector size (0)
mount: /Volumes/ESP failed with 71
mount_hfs: error on mount(): error = -1.
mount_hfs: Invalid argument
mount: /Volumes/ESP failed with 1
Installing rEFInd to the partition mounted at /Volumes/ESP
Copied rEFInd binary files
Copying sample configuration file as refind.conf; edit this file to
configure
Could not load apfs.efi data from
/System/Volumes/Data/usr/standalone/i386/apfs.efi
This follows the general pattern found for all other option (manual &
with/without SIP). It says mount_msdos has an unsupported sector size and
then cannot mount the ESP volume. I thought it might also have something to
do with APFS, but I really don't know...
Any idea what is going on and how I can fix it?
Thank you so much in advance. I have used refind before and not had any
problems, so I do not know what is going on here...
--
Best wishes,
Andreas Kisling Harris
Mobile: +44 (0) 7789643530
Skype Username: awkh88
This sounds like your EFI System Partition (ESP) may be damaged, or perhaps even not have a filesystem on it. I suggest you identify your ESP with diskutil list (it'll be of type EFI), my gdisk (it'll have a type code of EF00), or some other method, then check it with fsck_msdos. In most cases, the ESP is /dev/disk0s1, but that's not set in stone. Also, some computers have multiple ESPs, usually one per hard disk. rEFInd doesn't really care to which ESP it's installed; refind-install just uses the first one it finds. If you find multiple ESPs, check and fix all of them, so that rEFInd can use whichever one is convenient. Unfortunately, Apple's GUI Disk Utility hides ESPs from view, so you can't use it to do the job, AFAIK.
If there's no filesystem at all on the ESP, or if the filesystem is hopelessly corrupted, then you'll need to create one with newfs_msdos. If there's no ESP at all on any of your disks, then you'll need to shrink an existing partition by a small amount (I recommend 550 MiB, but that value is flexible; Apple uses 200 MiB, for instance) and create a new partition to serve as the ESP.
Note that Apple doesn't use the ESP except for firmware updates, IIRC, and perhaps for some other obscure functions. As a general rule, though, most EFI boot loaders and third-party boot managers, including rEFInd, install to the ESP. If you've previously installed a non-Apple OS in EFI mode, it will probably have installed its boot loader to the ESP, so you should avoid wiping that out if at all possible. OTOH, if you haven't yet installed any non-Apple OS, or if you've done so only in BIOS/CSM/legacy mode, then your ESP may be effectively unused right now, so you can create a fresh filesystem on it without causing any problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Roderick,
I recently formatted my early 2015 13'' MacBook to install Ubuntu and dual
boot. To do this, I wanted to install rEFInd, and I just cannot get it to
work. I am using 0.11.5 and nothing changes whether I try to do it manually
or not, or whether I disable SIP or not.
When I run ./refind-install this is the output:
Not running as root; attempting to elevate privileges via sudo....
ShimSource is none
Installing rEFInd on OS X....
mount_msdos: Unsupported sector size (0)
mount: /Volumes/ESP failed with 71
mount_hfs: error on mount(): error = -1.
mount_hfs: Invalid argument
mount: /Volumes/ESP failed with 1
Installing rEFInd to the partition mounted at /Volumes/ESP
Copied rEFInd binary files
Copying sample configuration file as refind.conf; edit this file to
configure
rEFInd.
Can't load /System/Volumes/Data/usr/standalone/i386/apfs.efi
Could not load apfs.efi data from
/System/Volumes/Data/usr/standalone/i386/apfs.efi
This follows the general pattern found for all other option (manual &
with/without SIP). It says mount_msdos has an unsupported sector size and
then cannot mount the ESP volume. I thought it might also have something to
do with APFS, but I really don't know...
Any idea what is going on and how I can fix it?
Thank you so much in advance. I have used refind before and not had any
problems, so I do not know what is going on here...
--
Best wishes,
Andreas Kisling Harris
Mobile: +44 (0) 7789643530
Skype Username: awkh88
This sounds like your EFI System Partition (ESP) may be damaged, or perhaps even not have a filesystem on it. I suggest you identify your ESP with
diskutil list
(it'll be of typeEFI
), mygdisk
(it'll have a type code ofEF00
), or some other method, then check it withfsck_msdos
. In most cases, the ESP is/dev/disk0s1
, but that's not set in stone. Also, some computers have multiple ESPs, usually one per hard disk. rEFInd doesn't really care to which ESP it's installed;refind-install
just uses the first one it finds. If you find multiple ESPs, check and fix all of them, so that rEFInd can use whichever one is convenient. Unfortunately, Apple's GUI Disk Utility hides ESPs from view, so you can't use it to do the job, AFAIK.If there's no filesystem at all on the ESP, or if the filesystem is hopelessly corrupted, then you'll need to create one with
newfs_msdos
. If there's no ESP at all on any of your disks, then you'll need to shrink an existing partition by a small amount (I recommend 550 MiB, but that value is flexible; Apple uses 200 MiB, for instance) and create a new partition to serve as the ESP.Note that Apple doesn't use the ESP except for firmware updates, IIRC, and perhaps for some other obscure functions. As a general rule, though, most EFI boot loaders and third-party boot managers, including rEFInd, install to the ESP. If you've previously installed a non-Apple OS in EFI mode, it will probably have installed its boot loader to the ESP, so you should avoid wiping that out if at all possible. OTOH, if you haven't yet installed any non-Apple OS, or if you've done so only in BIOS/CSM/legacy mode, then your ESP may be effectively unused right now, so you can create a fresh filesystem on it without causing any problems.