OK first, thank you for rEFInd!
This program fills a much needed gap.
My question:
In addition to allowing volume lables for EFI-mode scans, is it possible for 'dont_scan_volumes' to work with specific partition GUIDs?
My setup:
A MacBookPro4,1 with rEFInd 0.10.7 installed to the ESP, in a software mirrored config running macOS Sierra 10.12.4. I've set 'scanfor' to detect only EFI based loaders.
In such a setup, rEFInd auto-detects each of the mirrored OSX drives as seperate installations, which is to be expected. However, because the two volume labels are identical, adding something like, 'dont_scan_volumes "Boot OS X"' to the config file supresses both entries...
As a work-around, I attempted to use both a specific partition GUID & a filesystem UUID with 'dont_scan_volumes' with no success.
I then suppressed the auto-scanning for both, as mentioned, while trying the following manual stanza:
menuentry "Mac Mirror" {
icon \EFI\BOOT\icons\os_mac.png
volume <guid-of-mirror-partition1></guid-of-mirror-partition1>
loader \System\Library\CoreServices\boot.efi
}
This resulted in an OSX icon, but could not find the OSX boot.efi.
I finally had succuss with the following:
menuentry "Mac Mirror" {
icon \EFI\BOOT\icons\os_mac.png
volume "Boot OS X"
loader \System\Library\CoreServices\boot.efi
}
This resulted in a single rEFInd entry that, when selected, correctly booted. However, it wasn't as seemless as an auto-scanned entry. The screen flickered with some brief output as rEFInd handed off control to macOS.
Do you have any better suggestions? Is there any way that the 'dont_scan_volumes' config entry could be made to work with partition GUIDs, in addition to allowing volume lables? I would assume this to be a much more general/robust way to deal with a mirrored drive setup.
Thanks again Roderick!
Last edit: Tony Johnson 2017-04-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently, rEFInd can't use partition GUIDs with the dont_scan_volumes option. IIRC, the reason is that, when I wrote that functionality, rEFInd did not have access to partitions' GUIDs. It does now, so adding that functionality should be possible. Another possibility is to extend functionality already provided by rEFInd for NTFS, ext2/3/4fs, and ReiserFS: For those filesystems, rEFInd can detect duplicate filesystem serial numbers and exclude the duplicate partition from scans, for reasons similar to the ones you want. Currently, though, rEFInd does not have access to HFS+ serial numbers. (These values are not exposed by the EFI filesystem interfaces, so they need to be extracted from "raw" reads of the partition.)
Either of these approaches would require changes to the rEFInd code; they aren't things you can achieve by tweaking the configuration file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This version adds the ability to use partition GUIDs as dont_scan_volumes values. It worked for me in a quick test under VirtualBox, but I haven't tested it on a Mac. Note that you must specify where the boot loader actually resides. For most recent Mac installations, this will be a volume called Recovery HD, not the OS X root (/) partition; however, it might be the latter on some older installations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delay in response, I was only now able to scape together some free time to test your 0.10.7.1 code. I am pleased to confirm that your changes work great on my mac hardware: dont_scan_volumes now understands partition GUIDs, and the extra drive mirror is correctly suppressed in rEFInd. Thank you!
Fyi, I didn't end up needing to explicitly specify the boot loader location. rEFInd is installed on the ESP volume at EFI/BOOT/bootx64.efi, and the boot loader was picked up automatically at the default location on the OSX root, (Apple_RAID installations never create Recovery HD partitions).
Soft-raid setups are becoming more mainstream, so it would be convenient to have builtin mirrored drive detection for HFS+ volumes. However without EFI exposing these value, this sounds like a pain. I I am perfectly happy to type in a 128-bit GUID to suppress an icon. In the end, I'd file this as a cosmetic issue, so thanks again for the support!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK first, thank you for rEFInd!
This program fills a much needed gap.
My question:
In addition to allowing volume lables for EFI-mode scans, is it possible for 'dont_scan_volumes' to work with specific partition GUIDs?
My setup:
A MacBookPro4,1 with rEFInd 0.10.7 installed to the ESP, in a software mirrored config running macOS Sierra 10.12.4. I've set 'scanfor' to detect only EFI based loaders.
In such a setup, rEFInd auto-detects each of the mirrored OSX drives as seperate installations, which is to be expected. However, because the two volume labels are identical, adding something like, 'dont_scan_volumes "Boot OS X"' to the config file supresses both entries...
As a work-around, I attempted to use both a specific partition GUID & a filesystem UUID with 'dont_scan_volumes' with no success.
I then suppressed the auto-scanning for both, as mentioned, while trying the following manual stanza:
menuentry "Mac Mirror" {
icon \EFI\BOOT\icons\os_mac.png
volume <guid-of-mirror-partition1></guid-of-mirror-partition1>
loader \System\Library\CoreServices\boot.efi
}
This resulted in an OSX icon, but could not find the OSX boot.efi.
I finally had succuss with the following:
menuentry "Mac Mirror" {
icon \EFI\BOOT\icons\os_mac.png
volume "Boot OS X"
loader \System\Library\CoreServices\boot.efi
}
This resulted in a single rEFInd entry that, when selected, correctly booted. However, it wasn't as seemless as an auto-scanned entry. The screen flickered with some brief output as rEFInd handed off control to macOS.
Do you have any better suggestions? Is there any way that the 'dont_scan_volumes' config entry could be made to work with partition GUIDs, in addition to allowing volume lables? I would assume this to be a much more general/robust way to deal with a mirrored drive setup.
Thanks again Roderick!
Last edit: Tony Johnson 2017-04-23
Currently, rEFInd can't use partition GUIDs with the
dont_scan_volumes
option. IIRC, the reason is that, when I wrote that functionality, rEFInd did not have access to partitions' GUIDs. It does now, so adding that functionality should be possible. Another possibility is to extend functionality already provided by rEFInd for NTFS, ext2/3/4fs, and ReiserFS: For those filesystems, rEFInd can detect duplicate filesystem serial numbers and exclude the duplicate partition from scans, for reasons similar to the ones you want. Currently, though, rEFInd does not have access to HFS+ serial numbers. (These values are not exposed by the EFI filesystem interfaces, so they need to be extracted from "raw" reads of the partition.)Either of these approaches would require changes to the rEFInd code; they aren't things you can achieve by tweaking the configuration file.
Could you please try the following test version of rEFInd:
http://www.rodsbooks.com/refind-bin-0.10.7.1.zip
This version adds the ability to use partition GUIDs as
dont_scan_volumes
values. It worked for me in a quick test under VirtualBox, but I haven't tested it on a Mac. Note that you must specify where the boot loader actually resides. For most recent Mac installations, this will be a volume calledRecovery HD
, not the OS X root (/
) partition; however, it might be the latter on some older installations.Sorry for the delay in response, I was only now able to scape together some free time to test your 0.10.7.1 code. I am pleased to confirm that your changes work great on my mac hardware:
dont_scan_volumes
now understands partition GUIDs, and the extra drive mirror is correctly suppressed in rEFInd. Thank you!Fyi, I didn't end up needing to explicitly specify the boot loader location. rEFInd is installed on the ESP volume at
EFI/BOOT/bootx64.efi
, and the boot loader was picked up automatically at the default location on the OSX root, (Apple_RAID installations never createRecovery HD
partitions).Soft-raid setups are becoming more mainstream, so it would be convenient to have builtin mirrored drive detection for HFS+ volumes. However without EFI exposing these value, this sounds like a pain. I I am perfectly happy to type in a 128-bit GUID to suppress an icon. In the end, I'd file this as a cosmetic issue, so thanks again for the support!