soluzioni informatiche

SSD Solid State Drive

Attivare TRIM su SSD non Apple da Mac OS X 10.9 in avanti

Comando da terminale:

sudo trimforce enable

 

 

Se su un Mac con un SSD viene abilitato il comando di TRIM con Chameleon di Alessandro Boschini

e successivamente viene avviato in modalità recupero o safe boot, all'avvio successivo potrebbe non avviarsi + e mostrare il simbolo di divieto, ecco come rimediare:

HOW TO: YOSEMITE and restore to original

 

We will boot from recovery partition with cmd + r at startup, then manually in terminal:

"rm -rf /Volumes/<YOUR DISK>/System/Library/Extensions/IOAHCIFamily.kext"

than

 

"cp -r /System/Library/Extensions/IOAHCIFamily.kext /Volumes/<YOUR DISK>/System/Library/Extensions/IOAHCIFamily.kext"

and

 

"touch /Volumes/<YOUR DISK>/System/Library/Extensions"

and

 

" kextcache -u /Volumes/<YOUR DISK>"

 

NB*

an encrypted volume (FileVault) must before be unlocked and mounted with the Disk Utility, available in the recovery volume, otherwise it will not appear in /Volumes/

 

NB**

If your disk name is spelled in two words like <Your Disk>, then the bash syntax would be: Your\ Disk or 'Your Disk' If it is <YourDisk> in a single word then it is simply YourDisk.

 

 

HOW TO: YOSEMITE and kext sign control

 

If you encounter a block sign on boot after appling patch for trim try this way to force disable kext sign:

boot from recovery with cmd + r at startup, then manually in terminal:

"touch /Volumes/<YOUR DISK>/System/Library/Extensions"

than

 

"kextcache -u /Volumes/<YOUR DISK>"

 

HOW TO: enabling Trim on OSX 10.10.4

 

Apple finally opened to allows users to enable TRIM functionality on third-party, the trimforce command must be entered into Terminal

 

"sudo trimforce enable"

 

 

HOW TO: enabling Trim on OSX 10.9 and 10.8

 

Copy and paste the code snippets through the terminal window (Applications->Utilities->terminal).

Backup the file we're patching

 

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.backup

Patch the file to enable TRIM support for any SSDs (from 10.9.4 to 10.9.5)

 

sudo perl -pi -e 's|(^\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

 

Patch the file to enable TRIM support for any SSDs (from 10.8.3 to 10.9.3)

 

sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

 

or patch the file for 10.7.5 to 10.8.2

 

sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

 

Finalize the patch:

 

sudo kextcache -system-prelinked-kernel

 

sudo kextcache -system-caches

 

sudo touch /System/Library/Extensions/

 

Now reboot your system and verify that TRIM is enabled through the System Information.

 

HOW TO: enabling Trim manually in OSX 10.6.8

 

Copy and paste the code snippets through the terminal window (Applications->Utilities->terminal).

Backup the file we're patching

 

"sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.backup"

Patch the file to enable TRIM support for any SSDs

 

"sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage"

 

flush the kext caches

 

"sudo kextcache -system-prelinked-kernel"

 

"sudo kextcache -system-caches"

 

Now reboot your system and verify that TRIM is enabled through the System Information.

 

 

If you want to disable TRIM support

 

"sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage"

"sudo kextcache -system-prelinked-kernel"

"sudo kextcache -system-caches"

 

If you want restore the backup

 

"sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.backup /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage"

 

HOW TO: set/unset SMS in OSX

 

In the terminal window

 

to check status:

 

"sudo pmset -g"

 

if return 1 is enabled, if return 0 is disabled

 

to disable:

 

"sudo pmset -a sms 0"

 

to re-enable:

 

"sudo pmset -a sms 1"

 

HOW TO: set NOATIME

 

In the terminal window

 

"cd Library"

 

"cd LaunchDaemons"

 

"sudo pico com.ssd.noatime.plist"

 

then paste this:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"

"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.noatime.root</string>

<key>ProgramArguments</key>

<array>

<string>mount</string>

<string>-uwo</string>

<string>noatime</string>

<string>/</string>

</array>

<key>RunAtLoad</key>

<true/>

</dict>

</plist>

now save and reboot

 

to check

 

mount | grep " / "

 

you should see something like "/dev/disk0s2 on / (hfs, local, journaled, noatime)"

 

to restore with no-noatime delete the file created at /Library/LaunchDaemons

MUBIt Sagl

Via Sac. G. Caroni 2

CH-6862 Rancate  (Switzerland)

 

Mobile +41 79 845 83 07

Mobile +39 335 21 07 35

email info@mubit.ch

URL www.mubit.ch

MUBit è rivenditore

certificato Adobe

per la Svizzera

Copyright 2014. All Rights Reserved

socialize with us on Twitter or Facebook