'Error message in deleting IO80211Family.kext
I would like to delete IO80211Family.kext from my Mac so as to disable wireless internet. However when I run the following command from the terminal, I get an error message:
sudo rm -rf /System/Library/Extensions/IO80211Family.kext
The error message is:
rm: /System/Library/Extensions/IO80211Family.kext: Operation not permitted
Solution 1:[1]
this is dependent on which operating system you are running. In catalina, you could still mount the root volume read/write
transfer115502:~ root# mount -vw /
transfer115502:~ root# mv /System/Library/Extensions/IO80211Family* /var/root/DISABLED_EXTENSIONS/System/Library/Extensions
mv: /System/Library/Extensions/IO80211Family.kext: unable to copy extended attributes to /var/root/DISABLED_EXTENSIONS/System/Library/Extensions/IO80211Family.kext: Operation not permitted
mv: /System/Library/Extensions/IO80211FamilyV2.kext: unable to copy extended attributes to /var/root/DISABLED_EXTENSIONS/System/Library/Extensions/IO80211FamilyV2.kext: Operation not permitted
transfer115502:~ root# ls -al /var/root/DISABLED_EXTENSIONS/System/Library/Extensions
total 0
drwxr-xr-x 4 root wheel 128 Jan 27 12:05 .
drwxr-xr-x 3 root wheel 96 Jan 24 13:17 ..
drwxr-xr-x 3 root wheel 96 Nov 20 20:29 IO80211Family.kext
drwxr-xr-x 3 root wheel 96 Nov 20 20:05 IO80211FamilyV2.kext
transfer115502:~ root# ls -al /System/Library/Extensions | grep 80211
transfer115502:~ root#
I have not resolved how to do this in Monterey yet. first you must mount the root volume read/write
grant@transfer115503:~[20220502-10:56][#3]% df | head
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s1s1 489620264 29662464 419490472 7% 500637 2097452360 0% /
devfs 380 380 0 100% 659 0 100% /dev
/dev/disk1s5 489620264 40 419490472 1% 0 2097452360 0% /System/Volumes/VM
/dev/disk1s3 489620264 527656 419490472 1% 814 2097452360 0% /System/Volumes/Preboot
/dev/disk1s6 489620264 1504 419490472 1% 22 2097452360 0% /System/Volumes/Update
/dev/disk1s2 489620264 37498768 419490472 9% 304083 2097452360 0% /System/Volumes/Data
map auto_home 0 0 0 100% 0 0 100% /System/Volumes/Data/home
map auto_nfs 0 0 0 100% 0 0 100% /System/Volumes/Data/mnt/san201
map auto_nfs 0 0 0 100% 0 0 100% /System/Volumes/Data/mnt/san202
grant@transfer115503:~[20220502-11:07][#4]% diskutil mountDisk /dev/disk1s1
Volume(s) mounted successfully
grant@transfer115503:~[20220502-11:08][#5]% mount | grep disk1s1
/dev/disk1s1s1 on / (apfs, sealed, local, read-only, journaled)
/dev/disk1s1 on /Volumes/Macintosh HD 1 (apfs, sealed, local, journaled, nobrowse)
grant@transfer115503:~[20220502-11:09][#6]% cd /Volumes/Macintosh\ HD\ 1
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:09][#7]% sudo ln -s /System/Volumes/Data/mnt mnt
Password:
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:10][#8]% ls -1 /Volumes/Macintosh\ HD\ 1/System/Library/Extensions | grep 80211
IO80211Family.kext
IO80211FamilyLegacy.kext
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:11][#9]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/Extensions/IO80211Family.kext
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:11][#10]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/Extensions/IO80211FamilyLegacy.kext
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:11][#11]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/LaunchAgents/com.apple.wifi.WiFiAgent.plist
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:13][#12]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/Extensions/AppleBluetooth*
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:13][#13]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/Extensions/AppleMIDIBluetoothDriver.plugin
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:14][#14]% sudo rm -rf /Volumes/Macintosh\ HD\ 1/System/Library/Extensions/IOBluetooth*
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:14][#15]% ls -1 /Volumes/Macintosh\ HD\ 1/System/Library/Extensions | grep 80211
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:14][#16]%
then create a new snapshot and and commit the tag
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:14][#16]% now
202205021115
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:15][#17]% sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -s "202205021115" -v /Volumes/Macintosh\ HD\ 1
Attempting creation of snapshot 202205021115 on volume: /Volumes/Macintosh HD 1
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:17][#18]% sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -r "202205021115" -v /Volumes/Macintosh\ HD\ 1
Attempting tagging of snapshot 202205021115 on volume: /Volumes/Macintosh HD 1
grant@transfer115503:/Volumes/Macintosh HD 1[20220502-11:18][#19]% sudo reboot
Connection to transfer115503 closed by remote host.
Connection to transfer115503 closed.
grant@grants-EFILM-MacBookPro-M1:~[20220502-11:21][#326584]%
Even though the extensions were removed, after reboot the 80211 extension is loading from somewhere.
grant@transfer115503:~[20220502-11:25][#1]% cd /mnt/
grant@transfer115503:/mnt[20220502-11:25][#2]% ls
san201 san202 san203 san204 san205 san206 san207 san209 san210 san211
grant@transfer115503:/mnt[20220502-11:25][#3]% kextstat | grep 80211 | sed -E "s/[[:space:]]+/ /g" | cut -d " " -f 7
Executing: /usr/bin/kmutil showloaded
No variant specified, falling back to release
com.apple.iokit.IO80211Family
grant@transfer115503:/mnt[20220502-11:26][#4]%
My trip to Monterey is a longer drive than I had anticipated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | grant |