![]() |
#1
|
||||
|
||||
Removing a kext
Hola. I need to remove the Voodoo PS/2 driver from my system to test something. Is it safe to simply rm -r /System/Library/Extensions/VoodooPS2Controller.kext in single-user mode?
EDIT: Answering my own question; yes, it seems safe. I had a little trouble rebooting but that could have been other factors, Leopard is not stable in this VM yet. Actually after the reboot it stayed running for the longest yet. Last edited by OSTwister; 01-30-2010 at 10:55 AM. |
#2
|
||||
|
||||
I would suggest that you backup your extensions folder or at least the kext in question prior to removing it. You will also want to remove the Extensions.mkext cache file so that it is rebuilt without the kext you just removed. (Extensions.mkext is located in the /System/Library folder.)
Other Handy Single User Tips Mount a USB thumb drive in Single User Mode -s You can copy files to a USB thumb drive and then mount the drive in Single User Mode to correct certain issues. Boot into Single User Mode without the USB thumb drive plugged in. You can do this by entering -s on start up. 1. Allow for the modification of files by typing: Code:
/sbin/mount -uw / Code:
mkdir /Volumes/usbdrive Code:
ls /dev/disk* Code:
ls /dev/disk* Code:
mount -t msdos /dev/disk4s1 /Volumes/usbdrive Copy kexts from your mounted USB thumb drive to your Extensions folder Once you have the USB drive mounted you can move files around. For example you can do the following to install a kext stored on the USB thumb drive to your extensions folder. Assuming you followed the steps in the previous section. 1. Change directories to /System/Library This will shorten some of the commands we have to type in. Code:
cd /System/Library Code:
mkdir /backup Code:
cp -r Extensions/ /backup/ Code:
cp /Volumes/usbdrive/MYKEXT.kext Extensions/MYKEXT.kext Code:
chmod -R 755 Extensions/ Code:
chown -R root:wheel Extensions/ Code:
touch Extensions/ Code:
rm -rf Extensions.mkext -v Verbose Mode displays useful information durring the boot process. -f Forces OSX to load kexts from the extensions folder instead of the cache file. We did delete the cache file so this is just a precaution. Install kernel stored on USB thumb drive Once you have the USB drive mounted you can move files around. For example you can do the following to install a kext stored on the USB thumb drive to your extensions folder. Assuming you followed the steps in the previous section. 1. Make a backup copy of your existing kernel and name it mach_kernel.backup Code:
cp -r /mach_kernel /mach_kernel.backup Code:
cp -r /Volumes/usbdrive/mach_kernel /mach_kernel Code:
chown root:wheel /mach_kernel* Code:
chmod 644 /mach_kernel* 5. Change Directories to your /System/Library to shorten the remaining commands. Code:
cd /System/Library Code:
cp -r /Volumes/usbdrive/system.kext Extensions/system.kext Code:
chmod -R 755 Extensions/ Code:
chown -R root:wheel Extensions/ Code:
touch Extensions/ Code:
rm -rf Extensions.mkext -v Verbose Mode displays useful information durring the boot process. -f Forces OSX to load kexts from the extensions folder instead of the cache file. We did delete the cache file so this is just a precaution. 💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers. MOBO: Z77MX-QUO-AOS CPU: Core i7 3770K GPU: MSI N760 TF 2GD5/OC Case: Modded MacPro2,1 Memory: 32GB Corsair Vengeance (CMY32GX3M4A1600C9) Wifi: Airport Extreme bcm94321MCA BIOS: HermitCrab Labs H3A.816M Monitor: AOC Q2963Pm 29" WFHD 2560x1080 21:9 Interests: KDE on Apple Darwin, Keeping it real with the command line, Helping those that help themselves |