Contribute
Register

Solved > ScanPolicy: OpenCore Windows entry disappears

Joined
Dec 10, 2010
Messages
468
Motherboard
Gigabyte Z390 Aorus Elite
CPU
i9-9900K
Graphics
RX 580
Mobile Phone
  1. iOS
OC 0.6.4 shows an entry for Windows 10 that is automatically generated without adding it to Misc - Entries, it simply detects the Windows disk and creates the entry in the menu, and from there Windows boots fine.

Testing OC 0.6.5 I have seen that this automatically generated entry disappears and I have to create the Windows entry manually from Misc - Entries.

It happens to someone else?
 
Last edited:
Joined
Dec 10, 2010
Messages
468
Motherboard
Gigabyte Z390 Aorus Elite
CPU
i9-9900K
Graphics
RX 580
Mobile Phone
  1. iOS
The problem was in the ScanPolicy key within Misc / Security in config.plist. I changed something when I calculated the value and OC stopped scanning NTFS systems so Windows entry stopped showing up.

ScanPolicy (integer) defines device type and operating system detection policy. In accordance with this value, we can define different file systems and devices that OC scans and can boot. It is calculated by adding hexadecimal values of systems and devices, chosen in the list of the OC configuration PDF, and converting the total sum to their decimal value, which must be noted in config.plist.

From OC configuration PDF, failsafe value is 0x10F0103 corresponding to:
Code:
OC_SCAN_FILE_SYSTEM_LOCK - 1
OC_SCAN_DEVICE_LOCK - 2
OC_SCAN_ALLOW_FS_APFS - 100
OC_SCAN_ALLOW_DEVICE_SATA - 10000
OC_SCAN_ALLOW_DEVICE_SASEX - 20000
OC_SCAN_ALLOW_DEVICE_SCSI - 40000
OC_SCAN_ALLOW_DEVICE_NVME - 80000
OC_SCAN_ALLOW_DEVICE_PCI - 1000000
1 + 2 + 100 + 1000 + 2000 + 4000 + 8000 + 1000000 = 0x10F0103 (17760515 in decimal).

Setting to 0 will allow all sources present to be bootable.

But we may want to customize this. For example, I want to select this items:
Code:
0x00000001 — OC_SCAN_FILE_SYSTEM_LOCK, restricts scanning to only known file systems defined as a part of this policy.
0x00000002 — OC_SCAN_DEVICE_LOCK, restricts scanning to only known device types defined as a part of this policy.
0x00000100 — OC_SCAN_ALLOW_FS_APFS, allows scanning of APFS file system.
0x00000200 — OC_SCAN_ALLOW_FS_HFS, allows scanning of HFS file system.
0x00000800 — OC_SCAN_ALLOW_FS_NTFS, allows scanning of NTFS (Msft Basic Data) file system.
0x00010000 — OC_SCAN_ALLOW_DEVICE_SATA, allow scanning SATA devices.
0x00080000 — OC_SCAN_ALLOW_DEVICE_NVME, allow scanning NVMe devices.
0x00200000 — OC_SCAN_ALLOW_DEVICE_USB, allow scanning USB devices
Corresponding to 0x290B03, that's 2689795 in decimal. This is the value I write in config.plist.

Note: if you check 0x00000400 — OC_SCAN_ALLOW_FS_ESP, allows scanning of EFI System Partition file system
all EFI partitions will be visible which may not be desirable.

As always, in Dortania there is an excellent text about this.
 
Last edited:
Joined
Jul 20, 2014
Messages
754
Motherboard
Asrock X299 Creator
CPU
i9 10900X
Graphics
GT 710
Mac
  1. MacBook
hello
I use Opencore 0.6.5
Only "0" scan policy display my W10 SSD SATA Drive in the picker
I tried to checked almost all checkboxes together but it doesn't work !!
capture 2021-01-14 à 18.46.40.png

What am I doing Wrong ?
Thanks in advance
 
Joined
Jul 20, 2014
Messages
754
Motherboard
Asrock X299 Creator
CPU
i9 10900X
Graphics
GT 710
Mac
  1. MacBook
Take a look here : #347. ;)
Hello Laurent!!!Thanks for the link.
I did understand what it explains.
but it seems not working properly on my computer ...
➧ Scan Policy : 2820355 isn't working for me, or it should
I keep testing
 
Joined
Dec 10, 2010
Messages
468
Motherboard
Gigabyte Z390 Aorus Elite
CPU
i9-9900K
Graphics
RX 580
Mobile Phone
  1. iOS
hello
I use Opencore 0.6.5
Only "0" scan policy display my W10 SSD SATA Drive in the picker
I tried to checked almost all checkboxes together but it doesn't work !!
View attachment 505062
What am I doing Wrong ?
Thanks in advance
But if I create the value according to your image (everything except FS_ESP) I get 0x1FF1B03 in hexadecimal which is 33495811 in decimal, it does not match your value.
 
Last edited:
Joined
Jul 20, 2014
Messages
754
Motherboard
Asrock X299 Creator
CPU
i9 10900X
Graphics
GT 710
Mac
  1. MacBook
But if I create the value according to your image (everything except FS_ESP) I get 0x1FF1B03 in hexadecimal which is 33495811 in decimal, it does not match your value.
Thanks
it is the value in the image ;). I've tried it, it fails
I 've also tried 2820355 ... and it fails too...
 
Last edited:
Joined
Dec 10, 2010
Messages
468
Motherboard
Gigabyte Z390 Aorus Elite
CPU
i9-9900K
Graphics
RX 580
Mobile Phone
  1. iOS
Thanks
it is the value in the image ;). I've tried it, it fails
I 've also tried 2820355 ... and it fails too...
Sorry, I didn't notice the number in your image. I was talking about 2820355 the number I read in your other post.
 
Joined
Dec 10, 2010
Messages
468
Motherboard
Gigabyte Z390 Aorus Elite
CPU
i9-9900K
Graphics
RX 580
Mobile Phone
  1. iOS
Thanks
it is the value in the image ;). I've tried it, it fails
I 've also tried 2820355 ... and it fails too...
I think that there is something else that you are missing. On my PC both 33495811 and 2820355 values work fine, without error, showing or hiding systems according to the value of ScanPolicy.

Try the failsafe value proposed by OpenCore 17760515 or this one that works fine on my system 2687747. These also fail?
Review the DisplayLevel property just in case, I have it like this
XML:
            <key>DisplayLevel</key>
            <integer>2147483650</integer>
 
Joined
Jul 20, 2014
Messages
754
Motherboard
Asrock X299 Creator
CPU
i9 10900X
Graphics
GT 710
Mac
  1. MacBook
Okay
i've checked OC_SCAN_ALLOW_FS_ESP , now I see W10 in the Picker
But of course I also see The EFI partition of the W10 drive

Anyone have the same behaviour ?
 
Top