Jump to content

[HOW TO] Windows entry hidden as if it were auxiliary


miliuco
 Share

4 posts in this topic

Recommended Posts

Note: this thread is related to a previous thread:
[HOW TO] Windows entry after macOS in the OpenCore menu

________________________________

 

There is a way to prevent the Windows entry from being the first in the OpenCore picker without having to add a custom entry. Thanks to the OpenCore .contentVisibility feature.

  • You have to copy a .contentVisibility file with the word Disabled as content into /Volumes/EFI(Windows partition)/EFI(folder)/Boot.
  • You also have to set Misc -> Boot -> HideAuxiliary=True.

In this way, the Windows partition behaves like Auxiliary in the OpenCore picker and is not shown until you press the space bar.

 

OpenCore boot entries
 

The display order of the boot options in the OpenCore picker and the boot process are determined separately from the scanning algorithm. The display order is as follows:

  • Alternate options follow corresponding primary options. That is, Apple recovery options will follow the relevant macOS option whenever possible.
  • Options will be listed in file system handle firmware order to maintain an established order across reboots regardless of the operating system chosen for loading.
  • Custom entries, tools, and system entries will be added after all other options.
  • Auxiliary options will only be displayed upon entering “Extended Mode” in the OpenCore picker (typically by pressing the Space key).

The boot process exclude entries if there is a .contentVisibility file at a relevant location (see below) with Disabled contents (ASCII):

  • Next to the bootloader (such as boot.efi), or in the boot folder. Example locations, as seen from within macOS, are:
    • /System/Volumes/Preboot/{GUID}/System/Library/CoreServices/.contentVisibility
    • /Volumes/EFI(partition)/EFI(folder)/BOOT/.contentVisibility.
  • In addition a .contentVisibility file may be placed in absolute root folders related to a boot entry, for example:
    • /System/Volumes/Preboot/{GUID}/.contentVisibility
    • /System/Volumes/Preboot/.contentVisibility
    • /Volumes/EFI(partition)/.contentVisibility (not recommended).

Note: Remember that .contentVisibility is a hidden file. Also avoid extraneous spaces in its content.

 

Windows entry hidden in the picker as auxiliary

 

1.- Terminal command diskutil list shows the device of the Windows EFI partition:

> diskutil list
/dev/disk0 (internal, physical):
	#:	TYPE NAME						SIZE			IDENTIFIER
	0:	GUID_partition_scheme					*500.1 GB		disk0
	1:	EFI EFI							104.9 MB		disk0s1
	2:	Microsoft Reserved					16.8 MB			disk0s2
	3:	Microsoft Basic Data WINDOWS				499.3 GB		disk0s3
	4:	Windows Recovery					669.0 MB		disk0s4

In this output, it's disk0s1.

 

2.- Terminal command sudo diskutil mount to mount the Windows EFI partition:

> sudo diskutil mount disk0s1  
Volume EFI on disk0s1 mounted

3.- Copy a .contentVisibility file with the word Disabled as content into /Volumes/EFI/EFI/Boot:

/Volumes/EFI/EFI/Boot > tree -a
.
├── .contentVisibility
└── bootx64.efi

Upon startup, the OpenCore picker only shows the entry(s) that are macOS systems. When you press the space bar, the entry with Windows and other auxiliary (Recovery and tools) appears.

In my opinion it is a simpler method than creating a custom entry.
It is valid for those of us who run macOS much more often than Windows and we do not like to see Windows before macOS in the default picker.
It is true that, when showing Auxiliary, we see Windows in the first place but this is usually going to happen when we want to boot Windows.

 

 

Edited by miliuco
  • Like 4
Link to comment
Share on other sites

On 4/2/2024 at 4:55 PM, Cyberdevs said:

Very interesting article, excellent as always.

Thanks!

Absolutely!!! 

I've built up a sort of Library of 'Tips' and 'How To' that I occasionally go to to help my self or another member as the old grey matter doesn't retain much these days.

This very useful article by @miliuco was gratefully added to said Library for future reference.

I echo your Thanks!

  • Like 3
Link to comment
Share on other sites

 Share

×
×
  • Create New...