Jump to content

How do I load a kext using etc/rc?


Dr. Hurt
 Share

4 posts in this topic

Recommended Posts

Can anyone here please tell me where do I type the kextload command in the etc/rc?

Some people say that it should be written at the VERY top of the document and others say at the end between fi and exit. Which of these two methods is right?

 

Sorry if this question has already been answered.

Link to comment
Share on other sites

kexts dont neet to be loaded this way

kexts are stored in kextcaches, if the kext has a valid device to attach to then the kernel caches it.

so a kextload would be initiated before reboot then remove /system/library/extensions.mkext and /system/library/extensions.kextcache and reboot. your kext shouild be loaded on boot

also im not sure if the rc scripts can load kexts, i think the kextcache program needs to be run in userland and not before a multiuser boot

Link to comment
Share on other sites

Can anyone here please tell me where do I type the kextload command in the etc/rc?

Some people say that it should be written at the VERY top of the document and others say at the end between fi and exit. Which of these two methods is right?

 

At the end. The filesystem isn't even mounted until 1/3 of the way into the script rc.

 

However, a better way would be to put it into a new file called rc.local. Right near the end, the script rc looks for a user file called rc.local and loads it. If you happen to update your OS software, the script rc can get replaced, so the script rc would have to be edited again. But rc.local is recognized as a user file and is left untouched. Just put it in the same directory as the script rc (ie /etc/rc.local) and repair permissions.

Link to comment
Share on other sites

Can anyone here please tell me where do I type the kextload command in the etc/rc?

Some people say that it should be written at the VERY top of the document and others say at the end between fi and exit. Which of these two methods is right?

 

Sorry if this question has already been answered.

 

open etc/rc with any text app then after the first comment (before any "fi" "if") write

kextload /System/Library/Extension/xxxx.kext

Link to comment
Share on other sites

 Share

×
×
  • Create New...