dakanji / RefindPlus

A Boot Manager for Mac and PC
GNU General Public License v3.0
333 stars 66 forks source link

dont_scan_volumes not always working #136

Closed MarioG-X closed 1 year ago

MarioG-X commented 1 year ago

RefindPlus Version

v0.13.3.AC Release

Device Type

Apple Mac

Problem Description

I have dont_scan_volumes "Ventura" on an iMac which works, it does not show the entry. However, on a Mac MinI have dont_scan_volumes "FS Ventura" which does not work, the "FS Ventura" volume shows up in the RP list. Strange but true. Log below.

Problem Point

Before starting a loader or tool

Affected Items

Other Item

Debug Log

22x15z4032.log

Additional Context

No response

dakanji commented 1 year ago

Please share the config file for the Mac Mini

MarioG-X commented 1 year ago

config.txt

MarioG-X commented 1 year ago

BTW, just search for Ventura to find line in config. Also all but one of the previous logs in other issues is from same machine.

dakanji commented 1 year ago

Thanks ... Will look at this one later

dakanji commented 1 year ago

Cannot replicate the issue. Must be something off with your setup. Could be that you have hidden characters in the volume name string.

MarioG-X commented 1 year ago

Hidden character? Really? 45 years in computers, don't think so. Also, if that were the case my scripts wouldn't work. More info and logs:

I renamed the Mini system volume to just "Ventura" (no hidden characters) and changed the config to match as it is in the iMac and it made no difference other than the name on the RP menu was now "Ventura - Data", looking at the log RP actually uses the "- Data" volume: 22x17s1941.log

So I then renamed the Data volume to "Ventura - Data", and it RP showed "Ventura": 22x17s2317.log

Here is the log from the iMac which excludes volume "Ventura" from the menu and it works. Both machines have the same RP AC and OC, done an hour apart. As I said, strange but true: 22x17s3135.log

I notice there’re 30 hits on "Ventura" in the Mini logs, and only 5 in the iMac log. I renamed the Mini volumes back to "FS Ventura" and the config since it made no difference.

Needless to say this is a very minor issue and I know how you're a perfectionist so thought you would to know. It's a puzzle though.

Edit: Also tried, no luck: dont_scan_volumes "FS Ventura","FS Ventura - Data"

startergo commented 1 year ago

See if rEFInd will give you the same issue. from what I remember rEFInd shows the pre boot volume name and RP actually renamed it to the one found for -DATA. So you might want to include in the do not scan list the preboot volume name for Ventura.

MarioG-X commented 1 year ago

I added this to refind.conf, and refind did not display the Ventura entry, so RP is different: dont_scan_volumes "FS Ventura","FS Ventura - Data"

Preeboot uses the same name, I don't see any difference in the RP log or:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI ⁨EFI0⁩                    209.7 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk2⁩         121.1 GB   disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB     disk1
   1:                        EFI ⁨EFI1⁩                    209.7 MB   disk1s1
   2:                 Apple_APFS ⁨Container disk4⁩         1.0 TB     disk1s2
   3:                 Apple_APFS ⁨Container disk3⁩         542.0 GB   disk1s3
   4:           Linux Filesystem ⁨⁩                        49.9 GB    disk1s4
   5:           Linux Filesystem ⁨⁩                        150.1 GB   disk1s5
   6:           Linux Filesystem ⁨⁩                        258.0 GB   disk1s6

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +121.1 GB   disk2
                                 Physical Store disk0s2
   1:                APFS Volume ⁨FS Monterey - Data⁩      34.4 GB    disk2s1
   2:                APFS Volume ⁨FS Ventura - Data⁩       11.6 GB    disk2s2
   3:                APFS Volume ⁨FS Big Sur - Data⁩       11.9 GB    disk2s3
   4:                APFS Volume ⁨Preboot⁩                 3.1 GB     disk2s4
   5:                APFS Volume ⁨Recovery⁩                2.9 GB     disk2s5
   6:                APFS Volume ⁨FS Ventura⁩              9.0 GB     disk2s6
   7:                APFS Volume ⁨VM⁩                      1.1 MB     disk2s7
   8:                APFS Volume ⁨FS Big Sur⁩              15.3 GB    disk2s9
   9:                APFS Volume ⁨FS Monterey⁩             15.4 GB    disk2s10
  10:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.4 GB    disk2s10s1

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +542.0 GB   disk3
                                 Physical Store disk1s3

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.0 TB     disk4
                                 Physical Store disk1s2
   1:                APFS Volume ⁨FS Monterey Ubiquiti...⁩ 55.3 GB    disk4s1
   2:                APFS Volume ⁨FS Monterey Ubiquiti⁩    15.4 GB    disk4s2
   3:                APFS Volume ⁨Preboot⁩                 862.0 MB   disk4s3
   4:                APFS Volume ⁨Recovery⁩                2.2 GB     disk4s4
   5:                APFS Volume ⁨VM⁩                      1.1 MB     disk4s5
startergo commented 1 year ago

One way to find the preboot volume name with rEFInd is to remove all hide entries. It should then show you the preboot volume name. I forgot whether it started with BS or Monterey.

startergo commented 1 year ago

By the way hidden character could be a space character.

MarioG-X commented 1 year ago

When I uncommented decline_apfs_sync in RP config, the "FS Ventura" volume did not display so that fixed it. However, all the Preboot volumes showed up as "Preboot" so that was not good. So it appears that apfs_sync parm affects the issue. Strange it does not do that on the iMac. But as dakanji said it could be sequence of things. According to everything I have read the Preboot always has that same name. I see that in Disk Utility, diskutil, and all logs.

There is no special characters. No space, nothing. I changed the names at one point, also looked at names in Disk Utility. Don't know what else to say, can't find any special characters that aren't there.

startergo commented 1 year ago

And what is the rEFInd log showing?

MarioG-X commented 1 year ago

Refind loglev 4: refind.log

dakanji commented 1 year ago

Hidden character? Really? 45 years in computers, don't think so. Also, if that were the case my scripts wouldn't work. More info and logs:

Such scripts would not work indeed if hidden characters were in the volume name in Mac OS but that was never likely. Given your vast experience, I would have expected that you would have instead looked at where such characters, if any, are actually likely to be ... the config.conf file. Easy to add such if text is copy/pasted.

So, why not simply run RefindPlus with the working refind.conf file or delete the whole dont_scan_volumes "FS Ventura" line from config.conf and type it out from scratch?

Alternatively, remove the line from the config file and press the minus key in RefindPlus to hide the entry.

MarioG-X commented 1 year ago

A non-existent hidden character can’t be found. I proved it was not the case earlier multiple times:

RP line not working: config.txt

Refind with line copy/paste from RP line above early yesterday, Refind works correctly, it does not display Ventura: refind.txt

This is minor and could be only this computer has the issue since RP hides Ventura on the iMac. I just thought if you find the issue it may uncover some other unknown issue.

I am glad to provide you any information, just not on an imaginary hidden character, or just live with it, it's up to you.

I forgot about the minus key since I never used it. However, it does not work, when I press the minus key while Ventura is selected I get message “Not allowed on synced APFS loader”

dakanji commented 1 year ago

Well, thanks for the feedback which now some previously missing clarity

Not sure why you seem so wound up by a suggestion of what could be an issue but in any case, the status is as earlier mentioned in that the issue cannot be replicated.

At the risk of triggering indignation by suggesting another possible reason, there is one material difference in setups and it might be linked to your multi-instance APFS container setup. If that is the case, I suppose it will become a limitation of that setup.

That is, dont_scan_volumes may possibly cannot be used with APFS volumes when multi-instance APFS containers and SyncAPFS are active:

Was always a fairly difficult hack to get Multi-Item_Container + SyncAPFS working. Will take a look at it at some point ... related to this:

when I press the minus key while Ventura is selected I get message “Not allowed on synced APFS loader”

You cannot use minus key for Multi-Item_Container ... this limitation is logged

MarioG-X commented 1 year ago

Aha! Now onto to a realistic possibility. See if these facts help, iMac works, Mini does not:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:           Linux Filesystem                         50.0 GB    disk0s2
   3:           Linux Filesystem                         150.4 GB   disk0s3
   4:                 Apple_APFS Container disk4         541.3 GB   disk0s4
   5:           Linux Filesystem                         258.1 GB   disk0s5

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                 Apple_APFS Container disk3         61.0 GB    disk1s2
   3:                 Apple_APFS Container disk2         60.1 GB    disk1s3

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +60.1 GB    disk2
                                 Physical Store disk1s3
   1:                APFS Volume Ventura - Data          5.2 GB     disk2s1
   2:                APFS Volume Preboot                 4.5 GB     disk2s2
   3:                APFS Volume Recovery                1.1 GB     disk2s3
   4:                APFS Volume Ventura                 9.1 GB     disk2s4
   5:              APFS Snapshot com.apple.bless.79E6... 9.1 GB     disk2s4s1
   6:                APFS Volume VM                      1.1 MB     disk2s6

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +61.0 GB    disk3
                                 Physical Store disk1s2
   1:                APFS Volume iMac 27 Catalina - Data 21.7 GB    disk3s1
   2:                APFS Volume iMac 27 Catalina        11.4 GB    disk3s2
   3:                APFS Volume Preboot                 25.7 MB    disk3s3
   4:                APFS Volume Recovery                526.8 MB   disk3s4
   5:                APFS Volume VM                      3.2 GB     disk3s5

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +541.3 GB   disk4
                                 Physical Store disk0s4
   1:                APFS Volume iMac 27 Work - Data     50.2 GB    disk4s1
   2:                APFS Volume Preboot                 25.7 MB    disk4s2
   3:                APFS Volume Recovery                526.8 MB   disk4s3
   4:                APFS Volume iMac 27 Work            11.4 GB    disk4s4
   5:                APFS Volume VM                      14.0 GB    disk4s8
dakanji commented 1 year ago

Ack ... my bad. Been sitting there clearly in the log file all along: Screen Shot 2022-12-18 at 20 35 52

Forgot all about it as I do not use this Not Recommended setup

startergo commented 1 year ago

Regardless still the fact remains that rEFInd can hide the volume whereas RP cannot. Something gives.

MarioG-X commented 1 year ago

Both have 1 container in SSD where Ventura is. Both have 2 containers on the HD. Do you think the issue is that there is multiple containers because there are 2 devices. Or , since the iMac works, something to do with the iMac and mini have opposite device assignments for SSD and HD.

dakanji commented 1 year ago

Regardless still the fact remains that rEFInd can hide the volume whereas RP cannot.

It doesn't work under a specific condition that rEFInd does not even have. You cannot jump to a conclusion that it doesn't work under the same limited conditions that rEFind operates under based on this.

In any case, if you had paid attention, you will notice that it worked when SyncAPFS was disabled as this limits things to the rEFInd level.

dakanji commented 1 year ago

Both have 1 container ... etc

Multi-Instance APFS Container is not related to the number of containers on a disk, but to the number of separate Mac OS instances in a single container.

MarioG-X commented 1 year ago

I wonder why it would disable it on the mini but not on the iMac log above.

dakanji commented 1 year ago

I wonder why it would disable it on the mini but not on the iMac log above

Because it did not detect a Multi-Instance Container on the latter.

MarioG-X commented 1 year ago

I see, there is 1 macOS system in the 1 SSD container on the iMac, 3 on the mini.

dakanji commented 1 year ago

It is not a factor of how many Mac OS systems overall, but how many are in a single APFS Container

If you have 10 Mac OS installations with each in a separate APFS container, it will work but if you have 2 and both are in one APFS container, it will not.

MarioG-X commented 1 year ago

Looks like you nailed it down!

MarioG-X commented 1 year ago

Btw, it’s not practical to have multiple containers in this machine. I use it for freeswitch development and keep the last three macOS systems on the SSD, the HD is way to slow. It’s only 128G so need to share space and each one can fluctuate a lot, especially when Apple updates command line tools.

dakanji commented 1 year ago

Unfortunately, cannot always positively separate instances when they are in the same container at this point as they will all have the same PartitionGUID.

It might be possible to tweak things to work if a VolumeUUID is passed to DontScanVolumes instead of a name. This way, it can blindly hide any volume with that UUID without worrying about picking the wrong one. Will probably be easier to set the minus key to do this. Still only a long shot at best.

github-actions[bot] commented 1 year ago

This item is being closed as a fix will not be attempted or the issue could not be replicated or is invalid or is a duplicate/known/cancelled issue.

github-actions[bot] commented 1 year ago

This thread is being locked. Please use the Discussions feature for further related discussion or raise a new issue if appropriate.