Sample Partition Scheme driver kext can't load at boot time.

We are implementing a Sample Partition Scheme driver.

this is the info.plist

<key>IOKitPersonalities</key>
<dict>
	<key>SamplePartitionScheme</key>
	<dict>
		<key>IOKitDebug</key>
		<integer>0</integer>
		<key>IOProbeScore</key>
		<integer>80000</integer>
		....
		<key>IOProviderClass</key>
		<string>IOMedia</string>
		<key>IOPropertyMatch</key>
		<dict>
			<key>Whole</key>
			<true/>
		</dict>
	</dict>
</dict>

our driver match a whole disk IOMedia, If it's our disk, perform read/write on this disk.

When we test our driver in macOS12.

if the IOMedia is a blank RAW disk, our driver will be loaded at boot time.

if the IOMedia has partitions, system partition scheme driver will be loaded at boot time.

Pluging in a GUID partition disk on a booted Mac always load our kext.

how can our driver match GUID partition disks and load at boot time?

Your driver can't match and out-score an Apple supplied driver until around 120 seconds after startup. Since there is an Apple supplied driver which recognizes IOMedia objects with GPT partition maps, that driver will always load, and IOKit will not load your driver, until after the 120 second time window. This behavior was introduced in macOS 10.14 - I believe for security reasons.

Sample Partition Scheme driver kext can't load at boot time.
 
 
Q