Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active September 3, 2019 19:16
Show Gist options
  • Select an option

  • Save githubutilities/012ba9970a45b2bdca72 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/012ba9970a45b2bdca72 to your computer and use it in GitHub Desktop.
Mac first aid

Mac first aid

Kext Manual Installation

# Show loaded kext and check kext dependencies
kextstat

# Unload kext with identifier
kextunload -b <your-identifier>

# change kext to correct permisstion
sudo chmod -R 755 <kext-file>
sudo chown -R root:wheel <kext-file>

# Clear some kext caches
sudo rm -R Extensions.kextcache
sudo rm -R Extensions.mkext

if kext can't be unloaded, check its dependencies

If you encounter classes have instances error when you unload kext, try to close apps or system menu bars or other things that uses that kexts. e.g. For unloading VoodooHDA.kext, deselect Show volume in menu bar option in Sound in System Preferences and run sudo kextunload -b org.voodoo.driver.VoodooHDA again.

Mounting in single user mode

# -u update the mounted file system
# -w read-write access
mount -u -w /dev/disk /mnt/point

mount_hfs /dev/disk /mnt/point

# mount root file system as read-write
mount -uw /

file system check

# search the device
df -lh
# check it
fsck_hfs -l /dev/disk0s2

Check the file system

# -r rebuild catalog file
fsck_hfs -fyr

Backup with status bar in terminal

rsync -r --progress /copy/from /copy/to

rsync maybe faster than cp

you can also use <ctrl>+t to check the status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment