Enabling Trim in Lion - terminal commands

Hello All


Thanks in advance for your advice here.



I would like to enable trim on my MacPro 5.1 running Lion 10.7.3. I have just installed a Crucial C4 SSD.


Having looked around the Apple Support discussions and on the web there seems to be some conflicting advice re Trim.


It seems that using the Trim Enabler is not a great idea.


So, Terminal here we come.


There are some copy and paste terminal commands knocking about, but I am totally new to Terminal and the exact key-procedure is eluding me. Where to press Enter (eg) is not clear.


eg http://www.storagereview.com/how_enable_trim_nonapple_ssd



sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage.original




So as above, when I enter the Termnial utility, I first of all enter sudo cp


Should this be: sudo space cp space return? (Sorry not sure how you differentiate between commands and key strokes etc)


I tried the above and was duely warned of the perils of using sudo and prompted for my password, which I entered. I then copied the second two lines of command as one paste but got a 'permission denied' response and then got a bit worried.....!


If someone could run through the correct keystroke procedure I'd really appreciate it.


Thanks again.

Mac Pro, Mac OS X (10.7.2), 3.2 Quad-Core Xeon

Posted on Mar 27, 2012 8:58 AM

Reply
7 replies

Mar 27, 2012 9:14 AM in response to msphoto

Terminal can be a tricky beast indeed.

A good thing to remember is that the command structure you use when entering commands looks like this:

command, modifier, subject1, subject2... Each string should be separated by a space.

In the case of the cp command:


cp - the command

there is no modifier in this case since you're not asking it to do anything other than a straight copy

and the subject which is IOAHCIBlockStorage file.


So... cp *space* path-to-file *space* path-to-where-you-want-the-copied-file-to-be


The sudo command at the beginning is there to run the command as a 'super user'

The computer warned you because the sudo command when run in front of a command can really mess up your computer.

Copying and pasting the command that you have above will work just fine.

-Graham

Mar 27, 2012 9:26 AM in response to gracoat

Thanks Graham.


So if I understand you correctly all of the below should be pasted in at once (making sure not to add any spaces at the beginning or end!)


sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage.original



is that right?

Mar 27, 2012 9:30 AM in response to msphoto

That's right. Copy and paste all the lines starting with sudo and ending with original.


I copied and pasted it into a text editor on my compy here. It looks like the syntax will work properly.

Note that terminal, after you enter your password will not tell you that it's successfully completed the task.

It'll just do it and wait for your next command.

You can verify your work by copying and pasting this:

ls /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/

Read through the output and see if you can find the file you copied. It'll be called IOAHCIBlockStorage.original

In fact, you should see both IOAHCIBlockStorage, and IOAHCIBlockStorage.original in there.


HTH

-Graham

Mar 27, 2012 10:45 AM in response to gracoat

OK, great.


One last q re the commands as per storage review


http://www.storagereview.com/how_enable_trim_nonapple_ssd




The last step loads the newly patched file into the kernel. On a few systems this particular command takes a bit to complete. Expect to see the terminal window wait for 10-15 seconds before a new line appears.

sudo kextcache -system-prelinked-kernel

sudo kextcache -system-caches

So, is that two commands or one? ie press Return after the end of the first line? Spaces?!?


Many thanks

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Enabling Trim in Lion - terminal commands

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.