Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

5425642

Cancelled
Original poster
Jan 19, 2019
983
554
Hi,
I'm currently trying to uninstall StarTech drivers from my MacBook Pro. The .command file that StarTech has for download that should uninstall the drivers needs to run as admin in the terminal but I can't find out how.

When I'm running the .command file as my ordinary user I get this error:
Code:
touch: /System/Library/Extensions/: Read-only file system

Here is the file, nothing strange in it right?

Code:
#!/bin/sh

KEXT_PATH_ETH_108_179=/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AX88179.kext
KEXT_PATH_ETH_108=/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AX88179_178A.kext
KEXT_PATH_ETH_109=/Library/Extensions/AX88179_178A.kext

echo "AX88179_178A_Uninstall_v150"

if [ -e $KEXT_PATH_ETH_108_179 ]; then
    sudo kextunload "$KEXT_PATH_ETH_108_179"
    sudo rm -rf "$KEXT_PATH_ETH_108_179"
fi

if [ -e $KEXT_PATH_ETH_108 ]; then
    sudo kextunload "$KEXT_PATH_ETH_108"
    sudo rm -rf "$KEXT_PATH_ETH_108"
fi

if [ -e $KEXT_PATH_ETH_109 ]; then
    sudo kextunload "$KEXT_PATH_ETH_109"
    sudo rm -rf "$KEXT_PATH_ETH_109"
fi

pkgutil --pkgs| grep 'AX88179.pkg' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget AX88179.pkg
fi

pkgutil --pkgs| grep 'AX88179_178A.pkg' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget AX88179_178A.pkg
fi

pkgutil --pkgs| grep 'com.asix.tw.ax88179_178a' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.tw.ax88179_178a
fi

pkgutil --pkgs| grep 'com.asix.pkg.ax88179-178a-10.8' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.pkg.ax88179-178a-10.8
fi

pkgutil --pkgs| grep 'com.asix.pkg.ax88179-178a-10.9' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.pkg.ax88179-178a-10.9
fi

sudo touch /System/Library/Extensions/
sudo touch /Library/Extensions/
 

chrfr

macrumors G5
Jul 11, 2009
13,709
7,279
Hi,
I'm currently trying to uninstall StarTech drivers from my MacBook Pro. The .command file that StarTech has for download that should uninstall the drivers needs to run as admin in the terminal but I can't find out how.

When I'm running the .command file as my ordinary user I get this error:
Code:
touch: /System/Library/Extensions/: Read-only file system

Here is the file, nothing strange in it right?

Code:
#!/bin/sh

KEXT_PATH_ETH_108_179=/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AX88179.kext
KEXT_PATH_ETH_108=/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AX88179_178A.kext
KEXT_PATH_ETH_109=/Library/Extensions/AX88179_178A.kext

echo "AX88179_178A_Uninstall_v150"

if [ -e $KEXT_PATH_ETH_108_179 ]; then
    sudo kextunload "$KEXT_PATH_ETH_108_179"
    sudo rm -rf "$KEXT_PATH_ETH_108_179"
fi

if [ -e $KEXT_PATH_ETH_108 ]; then
    sudo kextunload "$KEXT_PATH_ETH_108"
    sudo rm -rf "$KEXT_PATH_ETH_108"
fi

if [ -e $KEXT_PATH_ETH_109 ]; then
    sudo kextunload "$KEXT_PATH_ETH_109"
    sudo rm -rf "$KEXT_PATH_ETH_109"
fi

pkgutil --pkgs| grep 'AX88179.pkg' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget AX88179.pkg
fi

pkgutil --pkgs| grep 'AX88179_178A.pkg' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget AX88179_178A.pkg
fi

pkgutil --pkgs| grep 'com.asix.tw.ax88179_178a' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.tw.ax88179_178a
fi

pkgutil --pkgs| grep 'com.asix.pkg.ax88179-178a-10.8' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.pkg.ax88179-178a-10.8
fi

pkgutil --pkgs| grep 'com.asix.pkg.ax88179-178a-10.9' &> /dev/null
if [ $? == 0 ]; then
   sudo pkgutil --forget com.asix.pkg.ax88179-178a-10.9
fi

sudo touch /System/Library/Extensions/
sudo touch /Library/Extensions/
This script would prompt you for an admin password; it's not necessary to run the .command file as root.
Your actual problem is that you appear to be running Catalina, and the /System/Library/Extensions folder is on a read only volume in Catalina.
The extensions which would have been in /Library/Extensions would have been deleted by this script, but you'd need to remove the files in /System/Library/Extensions while booted from the recovery partition. You'd want to confirm the drivers are actually installed in System/Library/Extensions before going to that trouble.

This is a classic case of the XY Problem, incidentally. http://xyproblem.info
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.